Scippy

UG

Ubiquity Generator framework

ParaRacingSolverPool Class Referenceabstract

class ParaRacingSolverPool (Racing Solver Pool) More...

#include <paraSolverPool.h>

Inheritance diagram for ParaRacingSolverPool:
BbParaRacingSolverPool

Public Member Functions

 ParaRacingSolverPool (int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer, ParaDeterministicTimer *inParaDetTimer)
 constructor More...
 
virtual ~ParaRacingSolverPool ()
 destructor More...
 
virtual ParaTaskgetCurrentTask (int rank)=0
 get root ParaTask object of the Solver specified More...
 
virtual std::size_t getNumActiveSolvers ()=0
 get number of active Solvers More...
 
virtual std::size_t getNumInactiveSolvers ()=0
 get number of inactive Solvers More...
 
virtual bool isSolverActive (int rank)=0
 check if the specified Solver is active or not More...
 
int getWinner ()
 get winner Solver rank More...
 
std::size_t getNSolvers ()
 get number of Solvers in this Solver pool More...
 

Protected Attributes

int winnerRank
 winner rank of racing ramp-up, -1: not decided yet More...
 
int originRank
 origin rank of Solvers managed by this Solver pool More...
 
int nSolvers
 number of Solvers More...
 
ParaCommparaComm
 communicator More...
 
ParaParamSetparaParams
 runtime parameters for parallelization More...
 
ParaTimerparaTimer
 timer used More...
 
ParaDeterministicTimerparaDetTimer
 deterministic timer used More...
 

Detailed Description

class ParaRacingSolverPool (Racing Solver Pool)

Definition at line 189 of file paraSolverPool.h.

Constructor & Destructor Documentation

◆ ParaRacingSolverPool()

ParaRacingSolverPool ( int  inOriginRank,
ParaComm inParaComm,
ParaParamSet inParaParams,
ParaTimer inParaTimer,
ParaDeterministicTimer inParaDetTimer 
)

constructor

Parameters
inOriginRankorigin rank of Solvers managed by this Solver pool
inParaCommcommunicator used
inParaParamsparaParamSet used
inParaTimertimer used
inParaDetTimerdeterministic timer used

Definition at line 207 of file paraSolverPool.h.

References ParaComm::getSize(), ParaRacingSolverPool::nSolvers, and ParaRacingSolverPool::paraComm.

◆ ~ParaRacingSolverPool()

virtual ~ParaRacingSolverPool ( )
virtual

destructor

Definition at line 227 of file paraSolverPool.h.

Member Function Documentation

◆ getCurrentTask()

virtual ParaTask * getCurrentTask ( int  rank)
pure virtual

get root ParaTask object of the Solver specified

Parameters
rankrank of the Solver

Implemented in BbParaRacingSolverPool.

Referenced by ParaLoadCoordinator::writeTransferLogInRacing().

◆ getNSolvers()

std::size_t getNSolvers ( )

get number of Solvers in this Solver pool

Returns
number of Solvers

Definition at line 277 of file paraSolverPool.h.

References ParaRacingSolverPool::nSolvers.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), BbParaLoadCoordinator::sendInterruptRequest(), and BbParaLoadCoordinator::terminateAllSolvers().

◆ getNumActiveSolvers()

◆ getNumInactiveSolvers()

virtual std::size_t getNumInactiveSolvers ( )
pure virtual

◆ getWinner()

int getWinner ( )

get winner Solver rank

Returns
rank of the winner Solver

Definition at line 266 of file paraSolverPool.h.

References ParaRacingSolverPool::winnerRank.

Referenced by BbParaLoadCoordinator::run().

◆ isSolverActive()

Member Data Documentation

◆ nSolvers

◆ originRank

int originRank
protected

◆ paraComm

ParaComm* paraComm
protected

◆ paraDetTimer

ParaDeterministicTimer* paraDetTimer
protected

deterministic timer used

Definition at line 200 of file paraSolverPool.h.

Referenced by BbParaRacingSolverPool::isWinnerDecided().

◆ paraParams

ParaParamSet* paraParams
protected

runtime parameters for parallelization

Definition at line 198 of file paraSolverPool.h.

Referenced by BbParaRacingSolverPool::isWinnerDecided(), and BbParaRacingSolverPool::updateSolverStatus().

◆ paraTimer

ParaTimer* paraTimer
protected

timer used

Definition at line 199 of file paraSolverPool.h.

Referenced by BbParaRacingSolverPool::isWinnerDecided().

◆ winnerRank

int winnerRank
protected

winner rank of racing ramp-up, -1: not decided yet

Definition at line 194 of file paraSolverPool.h.

Referenced by ParaRacingSolverPool::getWinner(), and BbParaRacingSolverPool::isWinnerDecided().