Scippy

UG

Ubiquity Generator framework

bbParaSolverTerminationStateTh.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and software framework */
4/* UG --- Ubquity Generator Framework */
5/* */
6/* Copyright Written by Yuji Shinano <shinano@zib.de>, */
7/* Copyright (C) 2021-2024 by Zuse Institute Berlin, */
8/* licensed under LGPL version 3 or later. */
9/* Commercial licenses are available through <licenses@zib.de> */
10/* */
11/* This code is free software; you can redistribute it and/or */
12/* modify it under the terms of the GNU Lesser General Public License */
13/* as published by the Free Software Foundation; either version 3 */
14/* of the License, or (at your option) any later version. */
15/* */
16/* This program is distributed in the hope that it will be useful, */
17/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19/* GNU Lesser General Public License for more details. */
20/* */
21/* You should have received a copy of the GNU Lesser General Public License */
22/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
23/* */
24/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25
26/**@file bbParaSolverTerminationStateTh.h
27 * @brief BbParaSolverTerminationState extension for threads communication.
28 * @author Yuji Shinano
29 *
30 *
31 *
32 */
33
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35
36
37#ifndef __BB_PARA_SOLVER_TERMINATION_STATE_TH_H__
38#define __BB_PARA_SOLVER_TERMINATION_STATE_TH_H__
39
41
42namespace UG
43{
44
45///
46/// class BbParaSolverTerminationStateMpi
47/// (Solver termination state in a ParaSolver communicated by thread)
48///
50{
51
52 ///
53 /// create BbParaSolverTerminationStateTh datatype
54 /// @return MPI_Datatype for BbParaSolverTerminationStateTh
55 ///
57 );
58
59public:
60
61 ///
62 /// default constructor
63 ///
65 )
66 {
67 }
68
69 ///
70 /// constructor
71 ///
73 int inInterrupted, ///< indicate that this solver is interrupted or not.
74 ///< 0: not interrupted,
75 ///< 1: interrupted
76 ///< 2: checkpoint,
77 ///< 3: racing-ramp up
78 int inRank, ///< rank of this solver
79 int inTotalNSolved, ///< accumulated number of nodes solved in this ParaSolver
80 int inMinNSolved, ///< minimum number of subtree nodes rooted from ParaNode
81 int inMaxNSolved, ///< maximum number of subtree nodes rooted from ParaNode
82 int inTotalNSent, ///< accumulated number of nodes sent from this ParaSolver
83 int inTotalNImprovedIncumbent, ///< accumulated number of improvements of incumbent value in this ParaSolver
84 int inNParaNodesReceived, ///< number of ParaNodes received in this ParaSolver
85 int inNParaNodesSolved, ///< number of ParaNodes solved ( received ) in this ParaSolver
86 int inNParaNodesSolvedAtRoot, ///< number of ParaNodes solved at root node before sending
87 int inNParaNodesSolvedAtPreCheck, ///< number of ParaNodes solved at pre-checking of root node solvability
88 int inNTransferredLocalCutsFromSolver, ///< number of local cuts transferred from this Solver
89 int inMinTransferredLocalCutsFromSolver, ///< minimum number of local cuts transferred from this Solver
90 int inMaxTransferredLocalCutsFromSolver, ///< maximum number of local cuts transferred from this Solver
91 int inNTransferredBendersCutsFromSolver, ///< number of benders cuts transferred from this Solver
92 int inMinTransferredBendersCutsFromSolver, ///< minimum number of benders cuts transferred from this Solver
93 int inMaxTransferredBendersCutsFromSolver, ///< maximum number of benders cuts transferred from this Solver
94 int inNTotalRestarts, ///< number of total restarts
95 int inMinRestarts, ///< minimum number of restarts
96 int inMaxRestarts, ///< maximum number of restarts
97 int inNTightened, ///< number of tightened variable bounds during racing stage
98 int inNTightenedInt, ///< number of tightened integral variable bounds during racing stage
99 int inCalcTerminationState, ///< termination sate of a calculation in a Solver
100 double inRunningTime, ///< this solver running time
101 double inIdleTimeToFirstParaNode, ///< idle time to start solving the first ParaNode
102 double inIdleTimeBetweenParaNodes, ///< idle time between ParaNodes processing
103 double inIdleTimeAfterLastParaNode, ///< idle time after the last ParaNode was solved
104 double inIdleTimeToWaitNotificationId, ///< idle time to wait notification Id messages
105 double inIdleTimeToWaitAckCompletion, ///< idle time to wait ack completion message
106 double inIdleTimeToWaitToken, ///< idle time to wait token
107 double inTotalRootNodeTime, ///< total time consumed by root node processes
108 double inMinRootNodeTime, ///< minimum time consumed by root node processes
109 double inMaxRootNodeTime, ///< maximum time consumed by root node processes
110 double inDetTime ///< deterministic time, -1: should be non-deterministic
111 )
113 inInterrupted,
114 inRank,
115 inTotalNSolved,
116 inMinNSolved,
117 inMaxNSolved,
118 inTotalNSent,
119 inTotalNImprovedIncumbent,
120 inNParaNodesReceived,
121 inNParaNodesSolved,
122 inNParaNodesSolvedAtRoot,
123 inNParaNodesSolvedAtPreCheck,
124 inNTransferredLocalCutsFromSolver,
125 inMinTransferredLocalCutsFromSolver,
126 inMaxTransferredLocalCutsFromSolver,
127 inNTransferredBendersCutsFromSolver,
128 inMinTransferredBendersCutsFromSolver,
129 inMaxTransferredBendersCutsFromSolver,
130 inNTotalRestarts,
131 inMinRestarts,
132 inMaxRestarts,
133 inNTightened,
134 inNTightenedInt,
135 inCalcTerminationState,
136 inRunningTime,
137 inIdleTimeToFirstParaNode,
138 inIdleTimeBetweenParaNodes,
139 inIdleTimeAfterLastParaNode,
140 inIdleTimeToWaitNotificationId,
141 inIdleTimeToWaitAckCompletion,
142 inIdleTimeToWaitToken,
143 inTotalRootNodeTime,
144 inMinRootNodeTime,
145 inMaxRootNodeTime,
146 inDetTime )
147 {
148 }
149
150 ///
151 /// send this object
152 ///
153 void send(
154 ParaComm *comm, ///< communicator used
155 int destination, ///< destination rank
156 int tag ///< TagTerminated
157 );
158
159 ///
160 /// receive this object
161 ///
162 void receive(
163 ParaComm *comm, ///< communicator used
164 int source, ///< source rank
165 int tag ///< TagTerminated
166 );
167
168};
169
170}
171
172#endif // __BB_PARA_SOLVER_TERMINATION_STATE_TH_H__
173
This class contains solver termination state which is transferred form Solver to LC.
class BbParaSolverTerminationStateMpi (Solver termination state in a ParaSolver communicated by threa...
void send(ParaComm *comm, int destination, int tag)
send this object
BbParaSolverTerminationStateTh(int inInterrupted, int inRank, int inTotalNSolved, int inMinNSolved, int inMaxNSolved, int inTotalNSent, int inTotalNImprovedIncumbent, int inNParaNodesReceived, int inNParaNodesSolved, int inNParaNodesSolvedAtRoot, int inNParaNodesSolvedAtPreCheck, int inNTransferredLocalCutsFromSolver, int inMinTransferredLocalCutsFromSolver, int inMaxTransferredLocalCutsFromSolver, int inNTransferredBendersCutsFromSolver, int inMinTransferredBendersCutsFromSolver, int inMaxTransferredBendersCutsFromSolver, int inNTotalRestarts, int inMinRestarts, int inMaxRestarts, int inNTightened, int inNTightenedInt, int inCalcTerminationState, double inRunningTime, double inIdleTimeToFirstParaNode, double inIdleTimeBetweenParaNodes, double inIdleTimeAfterLastParaNode, double inIdleTimeToWaitNotificationId, double inIdleTimeToWaitAckCompletion, double inIdleTimeToWaitToken, double inTotalRootNodeTime, double inMinRootNodeTime, double inMaxRootNodeTime, double inDetTime)
constructor
BbParaSolverTerminationStateTh * createDatatype()
create BbParaSolverTerminationStateTh datatype
void receive(ParaComm *comm, int source, int tag)
receive this object
class BbParaSolverTerminationState (Solver termination state in a ParaSolver)
Base class of communicator object.
Definition: paraComm.h:102
static ScipParaCommTh * comm
Definition: fscip.cpp:73