Scippy

UG

Ubiquity Generator framework

bbParaSolverTerminationStateTh.cpp
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.cpp
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#include "bbParaComm.h"
38
39using namespace UG;
40
42BbParaSolverTerminationStateTh::createDatatype(
43 )
44{
47 rank,
80 );
81
82}
83
84void
87 int destination,
88 int tag
89 )
90{
91 DEF_PARA_COMM( commTh, comm);
92
94 commTh->uTypeSend((void *)createDatatype(), ParaSolverTerminationStateType, destination, tag)
95 );
96}
97
98void
100 ParaComm *comm,
101 int source,
102 int tag
103 )
104{
105 DEF_PARA_COMM( commTh, comm);
106
109 commTh->uTypeReceive((void **)&received, ParaSolverTerminationStateType, source, tag)
110 );
111 interrupted = received->interrupted;
112 rank = received->rank;
113 totalNSolved = received->totalNSolved;
114 minNSolved = received->minNSolved;
115 maxNSolved = received->maxNSolved;
116 totalNSent = received->totalNSent;
129 minRestarts= received->minRestarts;
130 maxRestarts= received->maxRestarts;
131 nTightened = received->nTightened;
132 nTightenedInt = received->nTightenedInt;
134 runningTime = received->runningTime;
144 detTime = received->detTime;
145
146 delete received;
147}
Base class of communicator for UG Framework.
BbParaSolverTerminationState extension for threads communication.
class BbParaSolverTerminationStateMpi (Solver termination state in a ParaSolver communicated by threa...
void send(ParaComm *comm, int destination, int tag)
send this object
BbParaSolverTerminationStateTh * createDatatype()
create BbParaSolverTerminationStateTh datatype
void receive(ParaComm *comm, int source, int tag)
receive this object
int minNSolved
minimum number of subtree nodes rooted from ParaNode
int maxNSolved
maximum number of subtree nodes rooted from ParaNode
int nTransferredLocalCutsFromSolver
number of local cuts transferred from this Solver
int nTightened
number of tightened variable bounds during racing stage
int maxRestarts
maximum number of restarts
int totalNSolved
accumulated number of nodes solved in this ParaSolver
int nParaNodesSolvedAtRoot
number of ParaNodes solved at root node before sending
double maxRootNodeTime
maximum time consumed by root node processes
int totalNSent
accumulated number of nodes sent from this ParaSolver
int minRestarts
minimum number of restarts
int nTightenedInt
number of tightened integral variable bounds during racing stage
int nTransferredBendersCutsFromSolver
number of benders cuts transferred from this Solver
double minRootNodeTime
minimum time consumed by root node processes
int minTransferredLocalCutsFromSolver
minimum number of local cuts transferred from this Solver
int minTransferredBendersCutsFromSolver
minimum number of benders cuts transferred from this Solver
int nParaNodesSolvedAtPreCheck
number of ParaNodes solved at pre-checking of root node solvability
int maxTransferredBendersCutsFromSolver
maximum number of benders cuts transferred from this Solver
int maxTransferredLocalCutsFromSolver
maximum number of local cuts transferred from this Solver
double totalRootNodeTime
total time consumed by root node processes
int totalNImprovedIncumbent
accumulated number of improvements of incumbent value in this ParaSolver
int nTotalRestarts
number of total restarts
Base class of communicator object.
Definition: paraComm.h:102
double idleTimeToWaitNotificationId
idle time to wait notification Id messages
double detTime
deterministic time, -1: should be non-deterministic
double runningTime
this solver running time
int nParaTasksReceived
number of ParaTasks received in this ParaSolver
double idleTimeBetweenParaTasks
idle time between ParaTasks processing
int interrupted
indicate that this solver is interrupted or not. 0: not interrupted, 1: interrupted,...
double idleTimeToWaitAckCompletion
idle time to wait ack completion message
double idleTimeAfterLastParaTask
idle time after the last ParaTask was solved
double idleTimeToFirstParaTask
idle time to start solving the first ParaTask
static ScipParaCommTh * comm
Definition: fscip.cpp:73
static const int ParaSolverTerminationStateType
#define DEF_PARA_COMM(para_comm, comm)
#define PARA_COMM_CALL(paracommcall)
Definition: paraComm.h:47