Scippy

UG

Ubiquity Generator framework

BbParaSolverTerminationStateTh Class Reference

class BbParaSolverTerminationStateMpi (Solver termination state in a ParaSolver communicated by thread) More...

#include <bbParaSolverTerminationStateTh.h>

Inheritance diagram for BbParaSolverTerminationStateTh:
BbParaSolverTerminationState ParaSolverTerminationState

Public Member Functions

 BbParaSolverTerminationStateTh ()
 default constructor More...
 
 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 More...
 
void send (ParaComm *comm, int destination, int tag)
 send this object More...
 
void receive (ParaComm *comm, int source, int tag)
 receive this object More...
 
- Public Member Functions inherited from BbParaSolverTerminationState
 BbParaSolverTerminationState ()
 default constructor More...
 
 BbParaSolverTerminationState (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 inIddleTimeAfterLastParaNode, double inIdleTimeToWaitNotificationId, double inIdleTimeToWaitAckCompletion, double inIdleTimeToWaitToken, double inTotalRootNodeTime, double inMinRootNodeTime, double inMaxRootNodeTime, double inDetTime)
 constructor More...
 
virtual ~BbParaSolverTerminationState ()
 destructor More...
 
int getCalcTerminationState ()
 getter of calcTermination state More...
 
std::string toString (ParaInitiator *initiator)
 stringfy BbParaSolverTerminationState object More...
 
void write (gzstream::ogzstream &out)
 write BbParaSolverTerminationState to checkpoint file More...
 
bool read (ParaComm *comm, gzstream::igzstream &in)
 read BbParaSolverTerminationState from checkpoint file More...
 
- Public Member Functions inherited from ParaSolverTerminationState
 ParaSolverTerminationState ()
 default constructor More...
 
 ParaSolverTerminationState (int inInterrupted, int inRank, int inNParaTasksReceived, int inNParaTasksSolved, double inRunningTime, double inIdleTimeToFirstParaTask, double inIdleTimeBetweenParaTasks, double inIddleTimeAfterLastParaTask, double inIdleTimeToWaitNotificationId, double inIdleTimeToWaitAckCompletion, double inIdleTimeToWaitToken, double inDetTime)
 constructor More...
 
virtual ~ParaSolverTerminationState ()
 destructor More...
 
virtual std::string toString (ParaInitiator *initiator)=0
 stringfy ParaSolverTerminationState object More...
 
int getInterruptedMode ()
 getter of interrupted flag More...
 
double getDeterministicTime ()
 getter of deterministic time More...
 
virtual void write (gzstream::ogzstream &out)=0
 write ParaSolverTerminationState to checkpoint file More...
 
virtual bool read (ParaComm *comm, gzstream::igzstream &in)=0
 read ParaSolverTerminationState from checkpoint file More...
 
virtual void send (ParaComm *comm, int destination, int tag)=0
 send this object More...
 
virtual void receive (ParaComm *comm, int source, int tag)=0
 receive this object More...
 

Private Member Functions

BbParaSolverTerminationStateThcreateDatatype ()
 create BbParaSolverTerminationStateTh datatype More...
 

Additional Inherited Members

- Protected Attributes inherited from BbParaSolverTerminationState
int totalNSolved
 accumulated number of nodes solved in this ParaSolver More...
 
int minNSolved
 minimum number of subtree nodes rooted from ParaNode More...
 
int maxNSolved
 maximum number of subtree nodes rooted from ParaNode More...
 
int totalNSent
 accumulated number of nodes sent from this ParaSolver More...
 
int totalNImprovedIncumbent
 accumulated number of improvements of incumbent value in this ParaSolver More...
 
int nParaNodesSolvedAtRoot
 number of ParaNodes solved at root node before sending More...
 
int nParaNodesSolvedAtPreCheck
 number of ParaNodes solved at pre-checking of root node solvability More...
 
int nTransferredLocalCutsFromSolver
 number of local cuts transferred from this Solver More...
 
int minTransferredLocalCutsFromSolver
 minimum number of local cuts transferred from this Solver More...
 
int maxTransferredLocalCutsFromSolver
 maximum number of local cuts transferred from this Solver More...
 
int nTransferredBendersCutsFromSolver
 number of benders cuts transferred from this Solver More...
 
int minTransferredBendersCutsFromSolver
 minimum number of benders cuts transferred from this Solver More...
 
int maxTransferredBendersCutsFromSolver
 maximum number of benders cuts transferred from this Solver More...
 
int nTotalRestarts
 number of total restarts More...
 
int minRestarts
 minimum number of restarts More...
 
int maxRestarts
 maximum number of restarts More...
 
int nTightened
 number of tightened variable bounds during racing stage More...
 
int nTightenedInt
 number of tightened integral variable bounds during racing stage More...
 
int calcTerminationState
 
double totalRootNodeTime
 total time consumed by root node processes More...
 
double minRootNodeTime
 minimum time consumed by root node processes More...
 
double maxRootNodeTime
 maximum time consumed by root node processes More...
 
- Protected Attributes inherited from ParaSolverTerminationState
int interrupted
 indicate that this solver is interrupted or not. 0: not interrupted, 1: interrupted, 2: checkpoint, 3: racing-ramp up More...
 
int rank
 
int nParaTasksReceived
 number of ParaTasks received in this ParaSolver More...
 
int nParaTasksSolved
 
double runningTime
 this solver running time More...
 
double idleTimeToFirstParaTask
 idle time to start solving the first ParaTask More...
 
double idleTimeBetweenParaTasks
 idle time between ParaTasks processing More...
 
double idleTimeAfterLastParaTask
 idle time after the last ParaTask was solved More...
 
double idleTimeToWaitNotificationId
 idle time to wait notification Id messages More...
 
double idleTimeToWaitAckCompletion
 idle time to wait ack completion message More...
 
double idleTimeToWaitToken
 
double detTime
 deterministic time, -1: should be non-deterministic More...
 

Detailed Description

class BbParaSolverTerminationStateMpi (Solver termination state in a ParaSolver communicated by thread)

Definition at line 49 of file bbParaSolverTerminationStateTh.h.

Constructor & Destructor Documentation

◆ BbParaSolverTerminationStateTh() [1/2]

◆ BbParaSolverTerminationStateTh() [2/2]

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

Parameters
inInterruptedindicate that this solver is interrupted or not. 0: not interrupted, 1: interrupted 2: checkpoint, 3: racing-ramp up
inRankrank of this solver
inTotalNSolvedaccumulated number of nodes solved in this ParaSolver
inMinNSolvedminimum number of subtree nodes rooted from ParaNode
inMaxNSolvedmaximum number of subtree nodes rooted from ParaNode
inTotalNSentaccumulated number of nodes sent from this ParaSolver
inTotalNImprovedIncumbentaccumulated number of improvements of incumbent value in this ParaSolver
inNParaNodesReceivednumber of ParaNodes received in this ParaSolver
inNParaNodesSolvednumber of ParaNodes solved ( received ) in this ParaSolver
inNParaNodesSolvedAtRootnumber of ParaNodes solved at root node before sending
inNParaNodesSolvedAtPreChecknumber of ParaNodes solved at pre-checking of root node solvability
inNTransferredLocalCutsFromSolvernumber of local cuts transferred from this Solver
inMinTransferredLocalCutsFromSolverminimum number of local cuts transferred from this Solver
inMaxTransferredLocalCutsFromSolvermaximum number of local cuts transferred from this Solver
inNTransferredBendersCutsFromSolvernumber of benders cuts transferred from this Solver
inMinTransferredBendersCutsFromSolverminimum number of benders cuts transferred from this Solver
inMaxTransferredBendersCutsFromSolvermaximum number of benders cuts transferred from this Solver
inNTotalRestartsnumber of total restarts
inMinRestartsminimum number of restarts
inMaxRestartsmaximum number of restarts
inNTightenednumber of tightened variable bounds during racing stage
inNTightenedIntnumber of tightened integral variable bounds during racing stage
inCalcTerminationStatetermination sate of a calculation in a Solver
inRunningTimethis solver running time
inIdleTimeToFirstParaNodeidle time to start solving the first ParaNode
inIdleTimeBetweenParaNodesidle time between ParaNodes processing
inIdleTimeAfterLastParaNodeidle time after the last ParaNode was solved
inIdleTimeToWaitNotificationIdidle time to wait notification Id messages
inIdleTimeToWaitAckCompletionidle time to wait ack completion message
inIdleTimeToWaitTokenidle time to wait token
inTotalRootNodeTimetotal time consumed by root node processes
inMinRootNodeTimeminimum time consumed by root node processes
inMaxRootNodeTimemaximum time consumed by root node processes
inDetTimedeterministic time, -1: should be non-deterministic

Definition at line 72 of file bbParaSolverTerminationStateTh.h.

Member Function Documentation

◆ createDatatype()

BbParaSolverTerminationStateTh * createDatatype ( )
private

create BbParaSolverTerminationStateTh datatype

Returns
MPI_Datatype for BbParaSolverTerminationStateTh

Definition at line 42 of file bbParaSolverTerminationStateTh.cpp.

References BbParaSolverTerminationStateTh::BbParaSolverTerminationStateTh(), BbParaSolverTerminationState::calcTerminationState, ParaSolverTerminationState::detTime, ParaSolverTerminationState::idleTimeAfterLastParaTask, ParaSolverTerminationState::idleTimeBetweenParaTasks, ParaSolverTerminationState::idleTimeToFirstParaTask, ParaSolverTerminationState::idleTimeToWaitAckCompletion, ParaSolverTerminationState::idleTimeToWaitNotificationId, ParaSolverTerminationState::idleTimeToWaitToken, ParaSolverTerminationState::interrupted, BbParaSolverTerminationState::maxNSolved, BbParaSolverTerminationState::maxRestarts, BbParaSolverTerminationState::maxRootNodeTime, BbParaSolverTerminationState::maxTransferredBendersCutsFromSolver, BbParaSolverTerminationState::maxTransferredLocalCutsFromSolver, BbParaSolverTerminationState::minNSolved, BbParaSolverTerminationState::minRestarts, BbParaSolverTerminationState::minRootNodeTime, BbParaSolverTerminationState::minTransferredBendersCutsFromSolver, BbParaSolverTerminationState::minTransferredLocalCutsFromSolver, BbParaSolverTerminationState::nParaNodesSolvedAtPreCheck, BbParaSolverTerminationState::nParaNodesSolvedAtRoot, ParaSolverTerminationState::nParaTasksReceived, ParaSolverTerminationState::nParaTasksSolved, BbParaSolverTerminationState::nTightened, BbParaSolverTerminationState::nTightenedInt, BbParaSolverTerminationState::nTotalRestarts, BbParaSolverTerminationState::nTransferredBendersCutsFromSolver, BbParaSolverTerminationState::nTransferredLocalCutsFromSolver, ParaSolverTerminationState::rank, ParaSolverTerminationState::runningTime, BbParaSolverTerminationState::totalNImprovedIncumbent, BbParaSolverTerminationState::totalNSent, BbParaSolverTerminationState::totalNSolved, and BbParaSolverTerminationState::totalRootNodeTime.

Referenced by BbParaSolverTerminationStateTh::send().

◆ receive()

void receive ( ParaComm comm,
int  source,
int  tag 
)
virtual

receive this object

Parameters
commcommunicator used
sourcesource rank
tagTagTerminated

Implements ParaSolverTerminationState.

Definition at line 99 of file bbParaSolverTerminationStateTh.cpp.

References BbParaSolverTerminationState::calcTerminationState, comm, DEF_PARA_COMM, ParaSolverTerminationState::detTime, ParaSolverTerminationState::idleTimeAfterLastParaTask, ParaSolverTerminationState::idleTimeBetweenParaTasks, ParaSolverTerminationState::idleTimeToFirstParaTask, ParaSolverTerminationState::idleTimeToWaitAckCompletion, ParaSolverTerminationState::idleTimeToWaitNotificationId, ParaSolverTerminationState::idleTimeToWaitToken, ParaSolverTerminationState::interrupted, BbParaSolverTerminationState::maxNSolved, BbParaSolverTerminationState::maxRestarts, BbParaSolverTerminationState::maxRootNodeTime, BbParaSolverTerminationState::maxTransferredBendersCutsFromSolver, BbParaSolverTerminationState::maxTransferredLocalCutsFromSolver, BbParaSolverTerminationState::minNSolved, BbParaSolverTerminationState::minRestarts, BbParaSolverTerminationState::minRootNodeTime, BbParaSolverTerminationState::minTransferredBendersCutsFromSolver, BbParaSolverTerminationState::minTransferredLocalCutsFromSolver, BbParaSolverTerminationState::nParaNodesSolvedAtPreCheck, BbParaSolverTerminationState::nParaNodesSolvedAtRoot, ParaSolverTerminationState::nParaTasksReceived, ParaSolverTerminationState::nParaTasksSolved, BbParaSolverTerminationState::nTightened, BbParaSolverTerminationState::nTightenedInt, BbParaSolverTerminationState::nTotalRestarts, BbParaSolverTerminationState::nTransferredBendersCutsFromSolver, BbParaSolverTerminationState::nTransferredLocalCutsFromSolver, PARA_COMM_CALL, UG::ParaSolverTerminationStateType, ParaSolverTerminationState::rank, ParaSolverTerminationState::runningTime, BbParaSolverTerminationState::totalNImprovedIncumbent, BbParaSolverTerminationState::totalNSent, BbParaSolverTerminationState::totalNSolved, and BbParaSolverTerminationState::totalRootNodeTime.

◆ send()

void send ( ParaComm comm,
int  destination,
int  tag 
)
virtual

send this object

Parameters
commcommunicator used
destinationdestination rank
tagTagTerminated

Implements ParaSolverTerminationState.

Definition at line 85 of file bbParaSolverTerminationStateTh.cpp.

References comm, BbParaSolverTerminationStateTh::createDatatype(), DEF_PARA_COMM, PARA_COMM_CALL, and UG::ParaSolverTerminationStateType.