Base class of Calculation state in a ParaSolver. More...
#include <paraCalculationState.h>
Public Member Functions | |
ParaCalculationState () | |
Default Constructor. More... | |
ParaCalculationState (double inCompTime, int inNSolved, int inTerminationState) | |
Constructor. More... | |
virtual | ~ParaCalculationState () |
Destructor. More... | |
double | getCompTime () |
getter of computing time of a subproblem More... | |
int | getNSolved () |
geeter of the number of tasks solved in a subproblem More... | |
int | getTerminationState () |
getter of the termination state for solving the subproblem More... | |
virtual std::string | toString ()=0 |
stringfy ParaCalculationState More... | |
virtual std::string | toSimpleString ()=0 |
stringfy ParaCalculationState (simple string version) More... | |
virtual void | send (ParaComm *comm, int destination, int tag)=0 |
send this object to destination More... | |
virtual void | receive (ParaComm *comm, int source, int tag)=0 |
send this object to destination More... | |
Protected Attributes | |
double | compTime |
computation time of this ParaTask More... | |
int | nSolved |
the number of tasks solved More... | |
int | terminationState |
indicate whether if this computation is terminationState or not. 0: no, 1: terminationState meaning can be defined in derived class More... | |
Base class of Calculation state in a ParaSolver.
Definition at line 51 of file paraCalculationState.h.
Default Constructor.
Definition at line 63 of file paraCalculationState.h.
ParaCalculationState | ( | double | inCompTime, |
int | inNSolved, | ||
int | inTerminationState | ||
) |
Constructor.
inCompTime | computation time of this ParaTask |
inNSolved | the number of tasks solved |
inTerminationState | indicate whether if this computation is terminationState or not. 0: no, 1: terminationState |
Definition at line 74 of file paraCalculationState.h.
|
virtual |
Destructor.
Definition at line 89 of file paraCalculationState.h.
double getCompTime | ( | ) |
getter of computing time of a subproblem
Definition at line 99 of file paraCalculationState.h.
References ParaCalculationState::compTime.
Referenced by BbParaLoadCoordinator::processRacingRampUpTagCompletionOfCalculation(), BbParaLoadCoordinator::processTagCompletionOfCalculation(), and BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
int getNSolved | ( | ) |
geeter of the number of tasks solved in a subproblem
Definition at line 109 of file paraCalculationState.h.
References ParaCalculationState::nSolved.
Referenced by BbParaLoadCoordinator::processRacingRampUpTagCompletionOfCalculation(), BbParaLoadCoordinator::processTagCompletionOfCalculation(), and BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
int getTerminationState | ( | ) |
getter of the termination state for solving the subproblem
Definition at line 118 of file paraCalculationState.h.
References ParaCalculationState::terminationState.
|
pure virtual |
send this object to destination
comm | communicator used to receive this object |
source | source rank to receive this object |
tag | tag to show this object |
Implemented in BbParaCalculationStateMpi, and BbParaCalculationStateTh.
Referenced by BbParaLoadCoordinator::processRacingRampUpTagCompletionOfCalculation(), BbParaLoadCoordinator::processTagCompletionOfCalculation(), and BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
pure virtual |
send this object to destination
comm | communicator used to send this object |
destination | destination rank to send |
tag | tag to show this object |
Implemented in BbParaCalculationStateMpi, and BbParaCalculationStateTh.
Referenced by BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::sendCompletionOfCalculationWithoutSolving().
|
pure virtual |
stringfy ParaCalculationState (simple string version)
Implemented in BbParaCalculationState.
Referenced by BbParaLoadCoordinator::writeSubtreeInfo().
|
pure virtual |
stringfy ParaCalculationState
Implemented in BbParaCalculationState.
Referenced by ParaLoadCoordinator::writeTransferLog(), and ParaLoadCoordinator::writeTransferLogInRacing().
|
protected |
computation time of this ParaTask
Definition at line 54 of file paraCalculationState.h.
Referenced by BbParaCalculationStateMpi::createDatatype(), BbParaCalculationStateTh::createDatatype(), BbParaCalculationState::getAverageNodeCompTimeExcpetRoot(), ParaCalculationState::getCompTime(), BbParaCalculationStateMpi::receive(), BbParaCalculationStateTh::receive(), BbParaCalculationStateMpi::send(), BbParaCalculationState::toSimpleString(), and BbParaCalculationState::toString().
|
protected |
the number of tasks solved
Definition at line 55 of file paraCalculationState.h.
Referenced by BbParaCalculationStateMpi::createDatatype(), BbParaCalculationStateTh::createDatatype(), BbParaCalculationState::getAverageNodeCompTimeExcpetRoot(), ParaCalculationState::getNSolved(), BbParaCalculationStateTh::receive(), BbParaCalculationState::toSimpleString(), and BbParaCalculationState::toString().
|
protected |
indicate whether if this computation is terminationState or not. 0: no, 1: terminationState meaning can be defined in derived class
Definition at line 56 of file paraCalculationState.h.
Referenced by BbParaCalculationStateMpi::createDatatype(), BbParaCalculationStateTh::createDatatype(), ParaCalculationState::getTerminationState(), BbParaCalculationState::getTerminationState(), BbParaCalculationStateTh::receive(), and BbParaCalculationState::toString().