Scippy

UG

Ubiquity Generator framework

ParaSolverPool Class Referenceabstract

class ParaSolverPool (Solver Pool base class) More...

#include <paraSolverPool.h>

Inheritance diagram for ParaSolverPool:
BbParaSolverPool BbParaSolverPoolForMinimization

Public Member Functions

 ParaSolverPool (int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer)
 constructor More...
 
virtual ~ParaSolverPool ()
 destructor More...
 
std::size_t getNSolvers ()
 get number of Solvers in this Solver pool 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 Solver specified by rank is active or not More...
 
virtual ParaTaskgetCurrentTask (int rank)=0
 get current solving ParaTask in the Solver specified by rank More...
 
virtual void interruptRequested (int rank)=0
 set the Solver specified by rank is interrupt requested More...
 
virtual bool isInterruptRequested (int rank)=0
 check if the Solver specified by rank is interrupt requested or not More...
 
virtual void terminateRequested (int rank)=0
 set the Solver specified by rank is terminate requested More...
 
virtual bool isTerminateRequested (int rank)=0
 check if the Solver specified by rank is terminate requested or not More...
 
virtual void terminated (int rank)=0
 set the Solver specified by rank is terminated More...
 
virtual bool isTerminated (int rank)=0
 check if the Solver specified by rank is terminated or not More...
 

Protected Attributes

int originRank
 origin rank of Solvers managed by this Solver pool More...
 
std::size_t nSolvers
 number of Solvers More...
 
ParaCommparaComm
 communicator More...
 
ParaParamSetparaParams
 runtime parameters for parallelization More...
 
ParaTimerparaTimer
 timer More...
 

Detailed Description

class ParaSolverPool (Solver Pool base class)

Definition at line 61 of file paraSolverPool.h.

Constructor & Destructor Documentation

◆ ParaSolverPool()

ParaSolverPool ( int  inOriginRank,
ParaComm inParaComm,
ParaParamSet inParaParams,
ParaTimer inParaTimer 
)

constructor

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

Definition at line 76 of file paraSolverPool.h.

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

◆ ~ParaSolverPool()

virtual ~ParaSolverPool ( )
virtual

destructor

Definition at line 93 of file paraSolverPool.h.

Member Function Documentation

◆ getCurrentTask()

virtual ParaTask * getCurrentTask ( int  rank)
pure virtual

◆ getNSolvers()

◆ getNumActiveSolvers()

◆ getNumInactiveSolvers()

virtual std::size_t getNumInactiveSolvers ( )
pure virtual

◆ interruptRequested()

virtual void interruptRequested ( int  rank)
pure virtual

◆ isInterruptRequested()

virtual bool isInterruptRequested ( int  rank)
pure virtual

check if the Solver specified by rank is interrupt requested or not

Returns
return true if the Solver is interrupt requested, false otherwise
Parameters
rankrank of the Solver

Implemented in BbParaSolverPool.

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

◆ isSolverActive()

virtual bool isSolverActive ( int  rank)
pure virtual

check if the Solver specified by rank is active or not

Returns
true if the Solver is active, false otherwise
Parameters
rankrank of the Solver to be checked

Implemented in BbParaSolverPool.

Referenced by BbParaLoadCoordinator::inactivateRacingSolverPool(), BbParaLoadCoordinator::processTagSolverState(), BbParaLoadCoordinator::sendInterruptRequest(), ParaLoadCoordinator::terminateAllSolvers(), and BbParaLoadCoordinator::terminateAllSolvers().

◆ isTerminated()

virtual bool isTerminated ( int  rank)
pure virtual

check if the Solver specified by rank is terminated or not

Returns
return true if the Solver is terminated, false otherwise
Parameters
rankrank of the Solver

Implemented in BbParaSolverPool.

Referenced by ParaLoadCoordinator::processTagToken().

◆ isTerminateRequested()

virtual bool isTerminateRequested ( int  rank)
pure virtual

check if the Solver specified by rank is terminate requested or not

Returns
return true if the Solver is terminate requested, false otherwise
Parameters
rankrank of the Solver

Implemented in BbParaSolverPool.

Referenced by BbParaLoadCoordinator::processTagSelfSplitTermStateForInterruption(), BbParaLoadCoordinator::processTagTermStateForInterruption(), ParaLoadCoordinator::terminateAllSolvers(), and BbParaLoadCoordinator::terminateAllSolvers().

◆ terminated()

virtual void terminated ( int  rank)
pure virtual

set the Solver specified by rank is terminated

Parameters
rankrank of the Solver

Implemented in BbParaSolverPool.

Referenced by ParaLoadCoordinator::processTagTerminated().

◆ terminateRequested()

virtual void terminateRequested ( int  rank)
pure virtual

Member Data Documentation

◆ nSolvers

◆ originRank

◆ paraComm

◆ paraParams

◆ paraTimer