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-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 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"
51#include "ug_bb/bbParaNode.h"
53#include "ug_bb/bbParaTagDef.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
67namespace 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
93public:
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
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
Base class for calculation state.
Base class for a container which has difference between instance and subproblem.
Base class of initiator that maintains original problem and incumbent solution.
Base class for instance data.
Load coordinator termination state.
Load Coordinator.
BbParaNode Pool.
Base class for BbParaNode.
Parameter set for UG framework.
Base class for solution.
Solver pool.
This class has solver state to be transferred.
ug_bb Tag definitions
int processTagInitialStat(int source, int tag)
Message handlers.
ScipParaLoadCoordinator(UG::ParaComm *inComm, UG::ParaParamSet *inParaParamSet, UG::ParaInitiator *inParaInitiator, bool *inRacingSolversExist, UG::ParaTimer *inParaTimer, UG::ParaDeterministicTimer *inDetTimer)
constructor
int(ScipParaLoadCoordinator::* ScipMessageHandlerFunctionPointer)(int, int)
Class for LoadCoordinator.
Base class of communicator object.
Definition: paraComm.h:102
class for deterministic timer
Class for initiator.
Definition: paraInitiator.h:63
bool * racingSolversExist
indicate if racing solver exits or not, true: exists
ParaInitiator * paraInitiator
initiator
ParaTimer * paraTimer
Timers for LoadCoordinator.
class ParaParamSet
Definition: paraParamSet.h:850
class ParaTimer
Definition: paraTimer.h:49
static const int N_SCIP_TAGS
Defines for UG Framework.
Base class for deterministic timer.
Base class for Timer.
ParaComm extension for SCIP solver.