Scippy

UG

Ubiquity Generator framework

scipParaLoadCoordinator.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 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 paraLoadCoordinator.h
27  * @brief Load Coordinator.
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 __SCIP_PARA_LOADCOORDINATOR_H__
38 #define __SCIP_PARA_LOADCOORDINATOR_H__
39 
40 #include <fstream>
41 #include <list>
42 #include <queue>
43 #include "ug/paraDef.h"
44 #include "ug/paraTimer.h"
47 #include "ug_bb/bbParaNodePool.h"
48 #include "ug_bb/bbParaInitiator.h"
51 #include "ug_bb/bbParaNode.h"
52 #include "ug_bb/bbParaParamSet.h"
53 #include "ug_bb/bbParaTagDef.h"
55 #include "ug_bb/bbParaSolverPool.h"
56 #include "ug_bb/bbParaSolution.h"
57 #include "ug_bb/bbParaInstance.h"
59 #include "scipParaTagDef.h"
60 #include "scipParaComm.h"
61 
62 #ifdef UG_WITH_UGS
63 #include "ugs/ugsDef.h"
64 #include "ugs/ugsParaCommMpi.h"
65 #endif
66 
67 namespace ParaSCIP
68 {
69 
70 ///
71 /// Class for LoadCoordinator
72 ///
74 {
75 
77 
78  ///////////////////////
79  ///
80  /// Message handlers
81  ///
82  ///////////////////////
83 
84  ///
85  /// function to process TagInitialStat message
86  /// @return always 0 (for extension)
87  ///
89  int source, ///< source solver rank
90  int tag ///< TagInitialStat
91  );
92 
93 public:
94 
95  ///
96  /// constructor
97  ///
99 #ifdef UG_WITH_UGS
100  UGS::UgsParaCommMpi *inComUgs, ///< communicator used for UGS
101 #endif
102  UG::ParaComm *inComm, ///< communicator used
103  UG::ParaParamSet *inParaParamSet, ///< UG parameter set used
104  UG::ParaInitiator *inParaInitiator, ///< ParaInitiator for initialization of solving algorithm
105  bool *inRacingSolversExist, ///< indicate racing solver exits or not
106  UG::ParaTimer *inParaTimer, ///< ParaTimer used
107  UG::ParaDeterministicTimer *inDetTimer ///< DeterministicTimer used
109 #ifdef UG_WITH_UGS
110  inComUgs, ///< communicator used for UGS
111 #endif
112  N_SCIP_TAGS,
113  inComm, inParaParamSet, inParaInitiator, inRacingSolversExist, inParaTimer, inDetTimer
114  )
115  {
116  }
117 
118  ///
119  /// constructor
120  ///
122 #ifdef UG_WITH_UGS
123  UGS::UgsParaCommMpi *inComUgs, ///< communicator used for UGS
124 #endif
125  int inNhanders, ///< number of valid message handlers
126  UG::ParaComm *inComm, ///< communicator used
127  UG::ParaParamSet *inParaParamSet, ///< UG parameter set used
128  UG::ParaInitiator *paraInitiator, ///< ParaInitiator for initialization of solving algorithm
129  bool *racingSolversExist, ///< indicate racing solver exits or not
130  UG::ParaTimer *paraTimer, ///< ParaTimer used
131  UG::ParaDeterministicTimer *detTimer ///< DeterministicTimer used
132  );
133 
134  ///
135  /// destructor
136  ///
138  )
139  {
140  }
141 
142 };
143 
144 }
145 
146 #endif // __SCIP_PARA_LOADCOORDINATOR_H__
147 
ParaTimer * paraTimer
Timers for LoadCoordinator.
int(ScipParaLoadCoordinator::* ScipMessageHandlerFunctionPointer)(int, int)
ParaInitiator * paraInitiator
initiator
Base class for deterministic timer.
Defines for UG Framework.
ug_bb Tag definitions
bool * racingSolversExist
indicate if racing solver exits or not, true: exists
Class for initiator.
Definition: paraInitiator.h:62
class for deterministic timer
int processTagInitialStat(int source, int tag)
Message handlers.
Base class for Timer.
ScipParaLoadCoordinator(UG::ParaComm *inComm, UG::ParaParamSet *inParaParamSet, UG::ParaInitiator *inParaInitiator, bool *inRacingSolversExist, UG::ParaTimer *inParaTimer, UG::ParaDeterministicTimer *inDetTimer)
constructor
class ParaParamSet
Definition: paraParamSet.h:850
ParaComm extension for SCIP solver.
Class for LoadCoordinator.
class ParaTimer
Definition: paraTimer.h:48
Base class of communicator object.
Definition: paraComm.h:101