37 #ifndef __PARA_COMM_H__ 38 #define __PARA_COMM_H__ 47 #define PARA_COMM_CALL( paracommcall ) \ 49 int _status = paracommcall; \ 52 std::ostringstream s_; \ 53 s_ << "[PARA_COMM_CALL ERROR: " << __FILE__ << "] func = " \ 54 << __func__ << ", line = " << __LINE__ << ": " \ 55 << "error_code = " << _status << std::endl; \ 56 throw std::logic_error( s_.str() ); \ 66 static const int ParaINT = TYPE_FIRST + 2;
350 const int datatypeId,
361 const int datatypeId,
373 const int datatypeId,
422 #endif // __PARA_COMM_H__ static const int ParaSHORT
class ParaSolverState (ParaSolver state object for notification message)
static const int ParaCHAR
virtual void lcInit(ParaParamSet *paraParamSet)=0
special initializer when this object is used in LoadCoordinator
virtual ParaSolverTerminationState * createParaSolverTerminationState()=0
create ParaSolverTerminationState object by default constructor
static const int TYPE_FIRST
standard transfer data types
static ScipParaParamSet * paraParamSet
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 va...
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 val...
virtual ParaRacingRampUpParamSet * createParaRacingRampUpParamSet()=0
create ParaRacingRampUpParamSet object
virtual void unlockApp()=0
unlock UG application to synchronize with other threads
static const int ParaUNSIGNED_LONG
static const int ParaLONG_LONG
virtual void setToken(int rank, int *token)
set received token to this communicator
virtual void lockApp(char const *f, int l)
lock UG application to synchronize with other threads (for debug)
static const int NumMaxWorkers
Base class of Calculation state in a ParaSolver.
static const int ParaBOOL
static const int TYPE_LIST_SIZE
Defines for UG Framework.
virtual ParaSolverState * createParaSolverState()=0
create ParaSolverState object by default constructor
virtual void setLocalRank(int inRank)
virtual void abort()=0
abort function for this communicator (how to abort depends on which library used for communication) ...
virtual ~ParaComm()
destructor of ParaComm
virtual bool waitToken(int rank)
wait token when UG runs with deterministic mode
static const int TYPE_LAST
static const int ParaUNSIGNED
virtual void passToken(int rank)
pass token to from the rank to the next
virtual int getRank()=0
get rank of this process or this thread depending on run-time environment
static const int ParaLONG
static const int ParaLONG_DOUBLE
static const int ParaDOUBLE
virtual ParaInstance * createParaInstance()=0
create ParaInstance object by default constructor
static const int ParaSIGNED_CHAR
virtual void lockApp()=0
lock UG application to synchronize with other threads
virtual bool waitTerminatedMessage()=0
function to wait Terminated message (This function is not used currently)
Parameter set for UG framework.
#define THROW_LOGICAL_ERROR1(msg1)
class ParaSolverTerminationState (Solver termination state in a ParaSolver)
virtual int receive(void *bufer, int count, const int datatypeId, int source, const int tag)=0
receive function for standard ParaData types
virtual ParaSolution * createParaSolution()=0
create ParaSolution object by default constructor
static const int ParaUNSIGNED_CHAR
virtual ParaDiffSubproblem * createParaDiffSubproblem()
create ParaDiffSubproblem object by default constructor
ParaComm()
default constructor of ParaComm
Class for the difference between instance and subproblem.
virtual ParaTask * createParaTask()=0
create ParaTask object by default constructor
static const int ParaBYTE
Fundamental Tag definitions.
virtual bool passTermToken(int rank)
pass termination token from the rank to the next
virtual bool iProbe(int *source, int *tag)=0
iProbe function which checks if a new message is arrived or not
virtual void unlockApp(char const *f, int l)
unlock UG application to synchronize with other threads (for debug)
virtual int getNumOfMessagesWaitingToSend(int dest)=0
get size of the messageQueueTable
static const int ParaUNSIGNED_LONG_LONG
virtual const char * getTagString(int tag)=0
get Tag string for debugging
static const int ParaFLOAT
class for initial statistics collecting after racing
virtual void solverInit(ParaParamSet *paraParamSet)=0
special initializer when this object is used in Solver
virtual ParaCalculationState * createParaCalculationState()=0
transfer object factory
virtual int send(void *bufer, int count, const int datatypeId, int dest, const int tag)=0
send function for standard ParaData types
virtual void init(int argc, char **argv)=0
initializer of this object
virtual int getSize()=0
get number of UG processes or UG threads depending on run-time environment
virtual ParaTimer * createParaTimer()=0
create ParaTimer object
class ParaRacingRampUpParamSet (parameter set for racing ramp-up)
static const int ParaUNSIGNED_SHORT
Base class of communicator object.
virtual void waitSpecTagFromSpecSource(const int source, const int tag, int *receivedTag)=0
wait function for a specific tag from a specific source coming from
virtual ParaParamSet * createParaParamSet()=0
create ParaParamSet object