Scippy

UG

Ubiquity Generator framework

ParaSolverState Class Referenceabstract

class ParaSolverState (ParaSolver state object for notification message) More...

#include <paraSolverState.h>

+ Inheritance diagram for ParaSolverState:

Public Member Functions

 ParaSolverState ()
 default constructor More...
 
 ParaSolverState (const ParaSolverState &paraSolverState)
 copy constructor More...
 
 ParaSolverState (int inRacingStage, unsigned int inNotificationId, int inLcId, int inGlobalSubtreeIdInLc, double inDetTime)
 constructor More...
 
virtual ~ParaSolverState ()
 destractor More...
 
bool isRacingStage ()
 getter of isRacingStage More...
 
unsigned int getNotificaionId ()
 getter of notification id More...
 
int getLcId ()
 getter of LoadCoordintor id More...
 
int getGlobalSubtreeId ()
 getter of global subtree id More...
 
double getDeterministicTime ()
 getter of deterministic time More...
 
virtual std::string toString ()=0
 stringfy ParaSolverState 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...
 

Protected Attributes

int racingStage
 if this value is 1, solver is in racing stage More...
 
unsigned int notificationId
 id for this notification More...
 
int lcId
 lc id of current ParaTask More...
 
int globalSubtreeIdInLc
 global subtree id of current ParaTask More...
 
double detTime
 deterministic time, -1: should be non-deterministic More...
 

Detailed Description

class ParaSolverState (ParaSolver state object for notification message)

Definition at line 50 of file paraSolverState.h.

Constructor & Destructor Documentation

◆ ParaSolverState() [1/3]

default constructor

Definition at line 66 of file paraSolverState.h.

◆ ParaSolverState() [2/3]

ParaSolverState ( const ParaSolverState paraSolverState)

copy constructor

Definition at line 79 of file paraSolverState.h.

◆ ParaSolverState() [3/3]

ParaSolverState ( int  inRacingStage,
unsigned int  inNotificationId,
int  inLcId,
int  inGlobalSubtreeIdInLc,
double  inDetTime 
)

constructor

Parameters
inRacingStageif this value is 1, solver is in racing stage
inNotificationIdid for this notification
inLcIdlc id of current ParaTask
inGlobalSubtreeIdInLcglobal subtree id of current ParaTask
inDetTimedeterministic time, -1: should be non-deterministic

Definition at line 93 of file paraSolverState.h.

◆ ~ParaSolverState()

virtual ~ParaSolverState ( )
virtual

destractor

Definition at line 111 of file paraSolverState.h.

Member Function Documentation

◆ getDeterministicTime()

double getDeterministicTime ( )

getter of deterministic time

Returns
deterministic time

Definition at line 160 of file paraSolverState.h.

References comm, ParaSolverState::detTime, ParaSolverState::receive(), ParaSolverState::send(), and ParaSolverState::toString().

◆ getGlobalSubtreeId()

int getGlobalSubtreeId ( )

getter of global subtree id

Returns
global subtree id

Definition at line 150 of file paraSolverState.h.

References ParaSolverState::globalSubtreeIdInLc.

◆ getLcId()

int getLcId ( )

getter of LoadCoordintor id

Returns
LoadCoordinator id

Definition at line 140 of file paraSolverState.h.

References ParaSolverState::lcId.

◆ getNotificaionId()

unsigned int getNotificaionId ( )

getter of notification id

Returns
notification id

Definition at line 130 of file paraSolverState.h.

References ParaSolverState::notificationId.

◆ isRacingStage()

bool isRacingStage ( )

getter of isRacingStage

Returns
true if the Solver notified this message is in racing stage, false otherwise

Definition at line 120 of file paraSolverState.h.

◆ receive()

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

receive this object

Returns
always 0 (for future extensions)
Parameters
commcommunicator used
sourcesource rank
tagTagSolverState

Implemented in BbParaSolverStateMpi, and BbParaSolverStateTh.

Referenced by ParaSolverState::getDeterministicTime(), BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ send()

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

send this object

Returns
always 0 (for future extensions)
Parameters
commcommunicator used
destinationdestination rank
tagTagSolverState

Implemented in BbParaSolverStateMpi, and BbParaSolverStateTh.

Referenced by ParaSolverState::getDeterministicTime(), and BbParaSolver::sendSolverState().

◆ toString()

virtual std::string toString ( )
pure virtual

stringfy ParaSolverState

Returns
string to show inside of ParaSolverState

Implemented in BbParaSolverState.

Referenced by ParaSolverState::getDeterministicTime().

Member Data Documentation

◆ detTime

double detTime
protected

◆ globalSubtreeIdInLc

◆ lcId

◆ notificationId

◆ racingStage