61 TAG_STR(TagRacingRampUpParamSets),
84 ofs.open(s.str().c_str());
109 std::ostringstream s;
111 ofs.open(s.str().c_str());
121 MPI_Abort(MPI_COMM_WORLD, 0);
143 int previousRank =
myRank - 1;
144 if( previousRank == 0 )
152 MPI_Status mpiStatus;
154 MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG,
myComm, &mpiStatus)
156 receivedTag = mpiStatus.MPI_TAG;
157 TAG_TRACE (Probe, From, mpiStatus.MPI_SOURCE, receivedTag);
241 MPI_Init( &argc, &argv );
263 int provided, claimed;
265 MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided)
267 MPI_Query_thread( &claimed );
269 assert(provided == MPI_THREAD_MULTIPLE);
270 if (provided < MPI_THREAD_MULTIPLE)
272 std::cerr <<
"Error: the MPI library doesn't provide the required thread level" << std::endl;
273 MPI_Abort(MPI_COMM_WORLD, 0);
281 MPI_Get_processor_name(pprocName, &
namelen)
333 assert( tag >= 0 && tag < N_MPI_TAGS );
341 const int datatypeId,
355 const int datatypeId,
371 const int datatypeId,
378 MPI_Isend( buffer, count,
datatypes[datatypeId], dest, tag,
myComm, req )
388 const int datatypeId,
393 MPI_Status mpiStatus;
395 MPI_Recv( buffer, count,
datatypes[datatypeId], source, tag,
myComm, &mpiStatus )
408 MPI_Status mpiStatus;
412 MPI_Probe(source, MPI_ANY_TAG,
myComm, &mpiStatus)
418 MPI_Probe(source, tag,
myComm, &mpiStatus)
423 (*receivedTag) = mpiStatus.MPI_TAG;
424 TAG_TRACE (Probe, From, source, (*receivedTag));
429 assert( tag == mpiStatus.MPI_TAG );
430 (*receivedTag) = mpiStatus.MPI_TAG;
431 TAG_TRACE (Probe, From, source, (*receivedTag));
442 MPI_Status mpiStatus;
444 MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG,
myComm, &mpiStatus)
446 *source = mpiStatus.MPI_SOURCE;
447 *tag = mpiStatus.MPI_TAG;
459 MPI_Status mpiStatus;
463 MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG,
myComm, &flag, &mpiStatus)
470 MPI_Iprobe(MPI_ANY_SOURCE, *tag,
myComm, &flag, &mpiStatus)
475 *source = mpiStatus.MPI_SOURCE;
476 *tag = mpiStatus.MPI_TAG;
486 MPI_Datatype datatype,
491 MPI_Bcast( buffer, count, datatype, root,
myComm )
500 MPI_Datatype datatype,
506 MPI_Send( buffer, count, datatype, dest, tag,
myComm )
517 MPI_Datatype datatype,
524 MPI_Isend( buffer, count, datatype, dest, tag,
myComm, req )
535 MPI_Datatype datatype,
540 MPI_Status mpiStatus;
542 MPI_Recv( buffer, count, datatype, source, tag,
myComm, &mpiStatus )
static const int ParaSHORT
pthread_mutex_t tokenAccessLock
mutex for pthread thread
void lcInit(ParaParamSet *paraParamSet)
initializer for LoadCoordinator
static const int TagNotificationId
#define THROW_LOGICAL_ERROR4(msg1, msg2, msg3, msg4)
static const int ParaCHAR
static const int TagIncumbentValue
static const char * tagStringTable[]
table for tag name string
static ScipParaParamSet * paraParamSet
virtual void init(int argc, char **argv)
initializer of this communicator
static const int TagTerminateRequest
bool tagTraceFlag
indicate if tags are traced or not
int myCommSize
communicator size : number of processes joined in this system
std::ofstream ofs
output file stream for tag trace
int ureceive(void *bufer, int count, MPI_Datatype datatype, int source, int tag)
User type receive for created data type.
int getRank()
get rank of caller's thread
static const int TagRampUp
static const int ParaLONG_LONG
static const int ParaUNSIGNED_LONG
static const int TagHardTimeLimit
virtual ~ParaCommMpi()
destructor of this communicator
static const int ParaBOOL
static const int TYPE_LIST_SIZE
void waitSpecTagFromSpecSource(const int source, const int tag, int *receivedTag)
wait function for a specific tag from a specific source coming from
std::deque< ParaIsendRequest * > iSendRequestDeque
double startTime
start time of this communicator
static const int ParaUNSIGNED
static const int Deterministic
static const int ParaLONG
static const int TagTraceFileName
static const int ParaLONG_DOUBLE
static const int ParaDOUBLE
ParaComm extension for MPI communication.
static const int TagTaskReceived
static const int TagSolverState
static const int ParaSIGNED_CHAR
static const int TagSolution
virtual int send(void *bufer, int count, const int datatypeId, int dest, const int tag)
send function for standard ParaData types
static const int TagToken
static const int TagTrace
bool isStringParamDefaultValue(int param)
check if string parameter is default value or not
bool probe(int *source, int *tag)
probe function which waits a new message
static const int ParaUNSIGNED_CHAR
MPI_Comm myComm
MPI communicator.
char procName[MPI_MAX_PROCESSOR_NAME]
process name
int token[2]
index 0: token index 1: token color -1: green > 0: yellow ( termination origin solver number ) -2: re...
const char * getStringParamValue(int param)
for char parameters
virtual const char * getTagString(int tag)
get Tag string for debugging
virtual bool waitToken(int rank)
wait token when UG runs with deterministic mode
static const int ParaBYTE
static const int TagTerminated
Fundamental Tag definitions.
int iUsend(void *bufer, int count, MPI_Datatype datatype, int dest, int tag, MPI_Request *req)
User type send for created data type.
static MPI_Datatype datatypes[TYPE_LIST_SIZE]
data type mapping table to MPI data type
static const int ParaUNSIGNED_LONG_LONG
#define TAG_TRACE(call, fromTo, sourceDest, tag)
static const int TagDiffSubproblem
virtual bool passTermToken(int rank)
pass termination token from the rank to the next
static const int ParaFLOAT
int receive(void *bufer, int count, const int datatypeId, int source, const int tag)
receive function for standard ParaData types
int bcast(void *buffer, int count, const int datatypeId, int root)
broadcast function for standard ParaData types
static const int TagInterruptRequest
void abort()
abort. How it works sometimes depends on communicator used
int ubcast(void *buffer, int count, MPI_Datatype datatype, int root)
User type bcast for created data type.
virtual void passToken(int rank)
pass token to from the rank to the next
std::ostream * tos
output file stream for tag trace to change file name
static const int ParaUNSIGNED_SHORT
static const int TagCompletionOfCalculation
int namelen
length of this process name
virtual bool tagStringTableIsSetUpCoorectly()
check if tag string table (for debugging) set up correctly
#define MPI_CALL(mpicall)
int myRank
rank of this process
int usend(void *bufer, int count, MPI_Datatype datatype, int dest, int tag)
User type send for created data type.
int iSend(void *bufer, int count, const int datatypeId, int dest, const int tag, MPI_Request *req)
send function for standard ParaData types
static const int TagWinner
bool iProbe(int *source, int *tag)
iProbe function which checks if a new message is arrived or not
static const int TagAckCompletion
void solverInit(ParaParamSet *paraParamSet)
initializer for Solvers
bool getBoolParamValue(int param)
for bool parameters