Base class of communicator object. More...
#include <paraComm.h>
Public Member Functions | |
ParaComm () | |
default constructor of ParaComm More... | |
virtual | ~ParaComm () |
destructor of ParaComm More... | |
virtual void | init (int argc, char **argv)=0 |
initializer of this object More... | |
virtual int | getRank ()=0 |
get rank of this process or this thread depending on run-time environment More... | |
virtual int | getSize ()=0 |
get number of UG processes or UG threads depending on run-time environment More... | |
virtual int | getNumOfMessagesWaitingToSend (int dest)=0 |
get size of the messageQueueTable More... | |
virtual void | lcInit (ParaParamSet *paraParamSet)=0 |
special initializer when this object is used in LoadCoordinator More... | |
virtual void | solverInit (ParaParamSet *paraParamSet)=0 |
special initializer when this object is used in Solver More... | |
virtual void | setLocalRank (int inRank) |
virtual void | abort ()=0 |
abort function for this communicator (how to abort depends on which library used for communication) More... | |
virtual bool | waitTerminatedMessage ()=0 |
function to wait Terminated message (This function is not used currently) More... | |
virtual bool | waitToken (int rank) |
wait token when UG runs with deterministic mode More... | |
virtual void | passToken (int rank) |
pass token to from the rank to the next More... | |
virtual bool | passTermToken (int rank) |
pass termination token from the rank to the next More... | |
virtual void | setToken (int rank, int *token) |
set received token to this communicator More... | |
virtual void | lockApp ()=0 |
lock UG application to synchronize with other threads More... | |
virtual void | lockApp (char const *f, int l) |
lock UG application to synchronize with other threads (for debug) More... | |
virtual void | unlockApp ()=0 |
unlock UG application to synchronize with other threads More... | |
virtual void | unlockApp (char const *f, int l) |
unlock UG application to synchronize with other threads (for debug) More... | |
virtual ParaCalculationState * | createParaCalculationState ()=0 |
transfer object factory More... | |
virtual ParaRacingRampUpParamSet * | createParaRacingRampUpParamSet ()=0 |
create ParaRacingRampUpParamSet object More... | |
virtual ParaTask * | createParaTask ()=0 |
create ParaTask object by default constructor More... | |
virtual ParaParamSet * | createParaParamSet ()=0 |
create ParaParamSet object More... | |
virtual ParaSolverState * | createParaSolverState ()=0 |
create ParaSolverState object by default constructor More... | |
virtual ParaSolverTerminationState * | createParaSolverTerminationState ()=0 |
create ParaSolverTerminationState object by default constructor More... | |
virtual ParaTimer * | createParaTimer ()=0 |
create ParaTimer object More... | |
virtual ParaInstance * | createParaInstance ()=0 |
create ParaInstance object by default constructor More... | |
virtual ParaSolution * | createParaSolution ()=0 |
create ParaSolution object by default constructor More... | |
virtual ParaDiffSubproblem * | createParaDiffSubproblem () |
create ParaDiffSubproblem object by default constructor More... | |
virtual int | bcast (void *buffer, int count, const int datatypeId, int root)=0 |
Some action need to be taken for fault tolerant, when the functions return. So, they rerun status value. More... | |
virtual int | send (void *bufer, int count, const int datatypeId, int dest, const int tag)=0 |
send function for standard ParaData types More... | |
virtual int | receive (void *bufer, int count, const int datatypeId, int source, const int tag)=0 |
receive function for standard ParaData types More... | |
virtual void | waitSpecTagFromSpecSource (const int source, const int tag, int *receivedTag)=0 |
wait function for a specific tag from a specific source coming from More... | |
virtual bool | probe (int *source, int *tag)=0 |
No need to take action for fault tolerant, when the functions return. So, they do not rerun status value. More... | |
virtual bool | iProbe (int *source, int *tag)=0 |
iProbe function which checks if a new message is arrived or not More... | |
virtual const char * | getTagString (int tag)=0 |
get Tag string for debugging More... | |
Base class of communicator object.
Definition at line 101 of file paraComm.h.
ParaComm | ( | ) |
default constructor of ParaComm
Definition at line 108 of file paraComm.h.
|
virtual |
destructor of ParaComm
Definition at line 116 of file paraComm.h.
|
pure virtual |
abort function for this communicator (how to abort depends on which library used for communication)
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
|
pure virtual |
Some action need to be taken for fault tolerant, when the functions return. So, they rerun status value.
broadcast function for standard ParaData types
buffer | point to the head of sending message |
count | the number of data in the message |
datatypeId | data type in the message |
root | root rank for broadcasting |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by ScipParaInitiator::init(), ScipParaSolver::ScipParaSolver(), and ScipParaInitiator::sendSolverInitializationMessage().
|
pure virtual |
transfer object factory
create ParaCalculationState object by default constructor
Implemented in BbParaCommCPP11, BbParaCommMpi, and BbParaCommPth.
Referenced by BbParaLoadCoordinator::processRacingRampUpTagCompletionOfCalculation(), BbParaLoadCoordinator::processTagCompletionOfCalculation(), and BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
create ParaDiffSubproblem object by default constructor
Reimplemented in ScipParaCommMpi, and ScipParaCommTh.
Definition at line 332 of file paraComm.h.
References THROW_LOGICAL_ERROR1.
|
pure virtual |
create ParaInstance object by default constructor
Implemented in ScipParaCommMpi, and ScipParaCommTh.
Referenced by ScipParaSolver::reinitialize().
|
pure virtual |
create ParaParamSet object
Implemented in ScipParaCommMpi, and ScipParaCommTh.
|
pure virtual |
create ParaRacingRampUpParamSet object
Implemented in BbParaCommCPP11, BbParaCommMpi, BbParaCommPth, ScipParaCommMpi, and ScipParaCommTh.
Referenced by BbParaSolver::processTagWinnerRacingRampUpParamSet(), and BbParaLoadCoordinator::warmStart().
|
pure virtual |
create ParaSolution object by default constructor
Implemented in ScipParaCommMpi, and ScipParaCommTh.
Referenced by BbParaLoadCoordinator::processTagSolution(), BbParaSolver::processTagSolution(), ScipParaInitiator::readSolutionFromCheckpointFile(), and ScipParaSolver::ScipParaSolver().
|
pure virtual |
create ParaSolverState object by default constructor
Implemented in BbParaCommCPP11, BbParaCommMpi, and BbParaCommPth.
Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().
|
pure virtual |
create ParaSolverTerminationState object by default constructor
Implemented in BbParaCommCPP11, BbParaCommMpi, and BbParaCommPth.
Referenced by BbParaLoadCoordinator::processRacingRampUpTagCompletionOfCalculation(), BbParaLoadCoordinator::processTagSelfSplitTermStateForInterruption(), ParaLoadCoordinator::processTagTerminated(), BbParaLoadCoordinator::processTagTermStateForInterruption(), and BbParaLoadCoordinator::writePreviousStatisticsInformation().
|
pure virtual |
create ParaTask object by default constructor
Implemented in BbParaCommCPP11, BbParaCommMpi, and BbParaCommPth.
Referenced by BbParaLoadCoordinator::processTagNewSubtreeRootNode(), BbParaLoadCoordinator::processTagReassignSelfSplitSubtreeRootNode(), BbParaLoadCoordinator::processTagSubtreeRootNodeStartComputation(), BbParaLoadCoordinator::processTagSubtreeRootNodeToBeRemoved(), BbParaLoadCoordinator::processTagTask(), BbParaInitiator::readParaNodeFromCheckpointFile(), BbParaSolver::restartRacing(), and BbParaSolver::run().
|
pure virtual |
create ParaTimer object
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by ParaSolver::ParaSolver().
|
pure virtual |
get size of the messageQueueTable
dest | destination of message |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
|
pure virtual |
get rank of this process or this thread depending on run-time environment
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaLoadCoordinator::BbParaLoadCoordinator(), ScipParaSolver::checkVarsAndIndex(), ScipParaSolver::createSubproblem(), ScipParaSolver::dropSettingsForVariableBoundsExchnage(), ParaSolver::getRank(), BbParaSolver::getRank(), ScipParaInitiator::init(), BbParaSolver::iReceiveMessages(), BbParaSolver::keepParaNode(), ParaLoadCoordinator::ParaLoadCoordinator(), ParaSolver::ParaSolver(), BbParaSolver::processTagRampUp(), BbParaLoadCoordinator::processTagSolution(), BbParaLoadCoordinator::processTagTask(), BbParaSolver::processTagToken(), BbParaSolver::processTagWinnerRacingRampUpParamSet(), BbParaSolver::receiveNewTaskAndReactivate(), ScipParaSolver::recoverOriginalSettings(), BbParaSolver::run(), ScipParaSolver::saveOriginalSettings(), ScipParaObjCommPointHdlr::scip_exec(), ScipParaInterruptMsgMonitor::ScipParaInterruptMsgMonitor(), ScipParaSolver::ScipParaSolver(), BbParaSolver::sendCompletionOfCalculation(), BbParaSolver::sendCompletionOfCalculationWithoutSolving(), ScipParaObjCommPointHdlr::sendNode(), BbParaSolver::sendParaNode(), BbParaSolver::sendSolverTerminationState(), ScipParaSolver::setBakSettings(), ScipParaSolver::solve(), BbParaLoadCoordinator::updateCheckpointFiles(), ScipParaSolver::writeSubproblem(), and ScipParaSolver::~ScipParaSolver().
|
pure virtual |
get number of UG processes or UG threads depending on run-time environment
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaLoadCoordinator::BbParaLoadCoordinator(), BbParaSolverPool::BbParaSolverPool(), ScipParaInitiator::init(), BbParaLoadCoordinator::newRacing(), ScipParaInitiator::outputFinalSolverStatistics(), ParaRacingSolverPool::ParaRacingSolverPool(), ParaSolver::ParaSolver(), ParaSolverPool::ParaSolverPool(), ParaLoadCoordinator::processTagToken(), BbParaLoadCoordinator::restartInRampDownPhase(), BbParaLoadCoordinator::run(), ScipParaSolver::ScipParaSolver(), BbParaLoadCoordinator::sendCutOffValue(), BbParaLoadCoordinator::sendIncumbentValue(), BbParaLoadCoordinator::sendInterruptRequest(), ParaLoadCoordinator::sendRampUpToAllSolvers(), BbParaLoadCoordinator::sendRetryRampUpToAllSolvers(), ParaLoadCoordinator::sendTagToAllSolvers(), ParaLoadCoordinator::terminateAllSolvers(), BbParaLoadCoordinator::terminateAllSolvers(), BbParaSolverPool::updateDualBoundsForSavingNodes(), BbParaLoadCoordinator::warmStart(), BbParaSolverPool::writeParaNodesToCheckpointFile(), and BbParaSolverPool::writeSolverStatisticsToCheckpointFile().
|
pure virtual |
get Tag string for debugging
tag | tag to be converted to string |
Implemented in ParaCommCPP11, ParaCommMpi, ParaCommPth, BbParaCommCPP11, BbParaCommMpi, BbParaCommPth, ScipParaCommMpi, and ScipParaCommTh.
|
pure virtual |
initializer of this object
argc | number of arguments |
argv | pointers to the arguments |
Implemented in ParaCommCPP11, ParaCommMpi, ParaCommPth, and ScipParaCommMpi.
|
pure virtual |
iProbe function which checks if a new message is arrived or not
source | source rank of the message arrived |
tag | tag of the message arrived |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaSolver::iReceiveMessages().
|
pure virtual |
special initializer when this object is used in LoadCoordinator
paraParamSet | UG parameter set |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
|
pure virtual |
lock UG application to synchronize with other threads
Implemented in ParaCommCPP11, ParaCommMpi, ParaCommPth, and ParaCommMpi.
Referenced by ParaComm::lockApp(), ScipParaSolver::ScipParaSolver(), and ScipParaInitiator::tryToSetIncumbentSolution().
|
virtual |
lock UG application to synchronize with other threads (for debug)
f | string to indicate what is locked |
l | a number to show something |
Reimplemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Definition at line 238 of file paraComm.h.
References ParaComm::lockApp().
|
virtual |
pass termination token from the rank to the next
rank | from this rank, the termination token is passed |
Reimplemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Definition at line 211 of file paraComm.h.
Referenced by ScipParaSolver::~ScipParaSolver().
|
virtual |
pass token to from the rank to the next
rank | from this rank, the token is passed |
Reimplemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Definition at line 201 of file paraComm.h.
Referenced by BbParaSolver::passToken().
|
pure virtual |
No need to take action for fault tolerant, when the functions return. So, they do not rerun status value.
probe function which waits a new message
source | source rank of the message arrived |
tag | tag of the message arrived |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaSolver::receiveNewTaskAndReactivate(), BbParaLoadCoordinator::restartInRampDownPhase(), BbParaLoadCoordinator::run(), BbParaSolver::sendCompletionOfCalculation(), and BbParaLoadCoordinator::~BbParaLoadCoordinator().
|
pure virtual |
receive function for standard ParaData types
bufer | point to the head of receiving message |
count | the number of data in the message |
datatypeId | data type in the message |
source | source of the message coming from |
tag | tag of the message |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaSolver::iReceiveMessages(), ScipParaSolver::lbBoundTightened(), BbParaLoadCoordinator::processTagAllowToBeInCollectingMode(), BbParaLoadCoordinator::processTagAnotherNodeRequest(), BbParaSolver::processTagBreaking(), BbParaSolver::processTagCollectAllNodes(), BbParaSolver::processTagCutOffValue(), BbParaSolver::processTagGivenGapIsReached(), BbParaSolver::processTagGlobalBestDualBoundValueAtWarmStart(), ParaLoadCoordinator::processTagHardTimeLimit(), BbParaSolver::processTagInCollectingMode(), BbParaSolver::processTagIncumbentValue(), BbParaSolver::processTagInterruptRequest(), BbParaSolver::processTagKeepRacing(), BbParaLoadCoordinator::processTagLbBoundTightened(), BbParaSolver::processTagLCBestBoundValue(), BbParaSolver::processTagLightWeightRootNodeProcess(), BbParaSolver::processTagNoNodes(), BbParaSolver::processTagNoTestDualBoundGain(), BbParaSolver::processTagNotificationId(), BbParaSolver::processTagNoWaitModeSend(), BbParaSolver::processTagOutCollectingMode(), BbParaSolver::processTagRampUp(), BbParaSolver::processTagRestart(), BbParaSolver::processTagRetryRampUp(), BbParaLoadCoordinator::processTagSelfSplitFinished(), BbParaSolver::processTagTaskReceived(), BbParaSolver::processTagTerminateRequest(), BbParaSolver::processTagTerminateSolvingToRestart(), BbParaSolver::processTagTestDualBoundGain(), ParaLoadCoordinator::processTagToken(), BbParaSolver::processTagToken(), BbParaLoadCoordinator::processTagUbBoundTightened(), BbParaSolver::processTagWinner(), ScipParaSolver::ubBoundTightened(), and BbParaSolver::waitAckCompletion().
|
pure virtual |
send function for standard ParaData types
bufer | point to the head of sending message |
count | the number of data in the message |
datatypeId | data type in the message |
dest | destination to send the message |
tag | tag of this message |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaSolverPool::activateSolver(), BbParaSolverPool::enforcedSwitchOutCollectingMode(), BbParaLoadCoordinator::newRacing(), BbParaSolver::notifySelfSplitFinished(), BbParaLoadCoordinator::processRacingRampUpTagCompletionOfCalculation(), BbParaLoadCoordinator::processRacingRampUpTagSolverState(), BbParaLoadCoordinator::processTagAnotherNodeRequest(), BbParaLoadCoordinator::processTagCompletionOfCalculation(), BbParaLoadCoordinator::processTagLbBoundTightened(), BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState(), BbParaLoadCoordinator::processTagSelfSplitTermStateForInterruption(), BbParaLoadCoordinator::processTagSolverState(), BbParaLoadCoordinator::processTagTask(), ParaLoadCoordinator::processTagTerminated(), BbParaLoadCoordinator::processTagTermStateForInterruption(), ParaLoadCoordinator::processTagToken(), BbParaLoadCoordinator::processTagUbBoundTightened(), BbParaLoadCoordinator::restartInRampDownPhase(), BbParaLoadCoordinator::run(), ScipParaObjCommPointHdlr::scip_exec(), BbParaSolver::sendAnotherNodeRequest(), BbParaLoadCoordinator::sendCutOffValue(), BbParaLoadCoordinator::sendIncumbentValue(), BbParaLoadCoordinator::sendInterruptRequest(), BbParaLoadCoordinator::sendParaTasksToIdleSolvers(), ParaLoadCoordinator::sendRampUpToAllSolvers(), BbParaLoadCoordinator::sendRetryRampUpToAllSolvers(), BbParaSolverPool::sendSwitchOutCollectingModeIfNecessary(), ParaLoadCoordinator::sendTagToAllSolvers(), BbParaSolverPoolForMinimization::switchInCollectingMode(), BbParaSolverPool::switchInCollectingToSolver(), BbParaSolverPool::switchOutCollectingMode(), ParaLoadCoordinator::terminateAllSolvers(), BbParaLoadCoordinator::terminateAllSolvers(), BbParaSolverPoolForMinimization::updateSolverStatus(), and BbParaLoadCoordinator::warmStart().
|
virtual |
Reimplemented in ParaCommCPP11.
Definition at line 166 of file paraComm.h.
Referenced by ScipParaInterruptMsgMonitor::run().
|
virtual |
set received token to this communicator
rank | rank to set the token |
token | token to be set |
Reimplemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Definition at line 221 of file paraComm.h.
Referenced by ParaLoadCoordinator::processTagToken(), and BbParaSolver::processTagToken().
|
pure virtual |
special initializer when this object is used in Solver
paraParamSet | UG parameter set |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
|
pure virtual |
unlock UG application to synchronize with other threads
Implemented in ParaCommCPP11, ParaCommMpi, ParaCommPth, and ParaCommMpi.
Referenced by ScipParaSolver::ScipParaSolver(), ScipParaInitiator::tryToSetIncumbentSolution(), and ParaComm::unlockApp().
|
virtual |
unlock UG application to synchronize with other threads (for debug)
f | string to indicate what is locked |
l | a number to show something |
Reimplemented in ParaCommCPP11, and ParaCommMpi.
Definition at line 253 of file paraComm.h.
References ParaComm::unlockApp().
|
pure virtual |
wait function for a specific tag from a specific source coming from
source | source rank which the message should come from |
tag | tag which the message should wait |
receivedTag | tag of the message which is arrived |
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Referenced by BbParaSolver::sendParaNode(), BbParaSolver::waitAckCompletion(), and BbParaSolver::waitNotificationIdMessage().
|
pure virtual |
function to wait Terminated message (This function is not used currently)
Implemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
|
virtual |
wait token when UG runs with deterministic mode
rank | rank to check if token is arrived |
Reimplemented in ParaCommCPP11, ParaCommMpi, and ParaCommPth.
Definition at line 191 of file paraComm.h.
Referenced by BbParaSolver::waitToken().