Scippy

UG

Ubiquity Generator framework

paraCommPth.h File Reference

ParaComm extension for Pthreads communication. More...

#include <pthread.h>
#include <stdexcept>
#include <iostream>
#include <ostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iomanip>
#include <cassert>
#include "paraDef.h"
#include "paraComm.h"
#include "paraSysTimer.h"
#include "paraParamSetTh.h"
#include "paraTimerTh.h"
#include "paraPthLock.h"
#include "paraPthCondVar.h"

Go to the source code of this file.

Classes

class  MessageQueueElement
 Class for message queue element. More...
 
class  MessageQueueTableElement
 Class of MessageQueueTableElement. More...
 
class  ThreadsTableElement
 Class of ThreadsTableElement. More...
 
class  ParaCommPth
 Communicator object for pthreads thread communications. More...
 

Namespaces

namespace  UG
 

Macros

#define HashEntry(tid)   ( hashCode(tid) % UG::HashTableSize )
 
#define TAG_TRACE(call, fromTo, sourceDest, tag)
 
#define DEF_PARA_COMM(para_comm, comm)   ParaCommPth *para_comm = dynamic_cast< ParaCommPth* >(comm)
 
#define LOCK_APP(comm)   comm->lockApp(__FILE__, __LINE__)
 
#define LOCK_RANK(comm)   comm->lockRank(__FILE__, __LINE__)
 
#define UNLOCK_RANK(comm)   comm->unlockRank(__FILE__, __LINE__)
 

Variables

static const int UG_USER_TYPE_FIRST = TYPE_LAST + 1
 user defined transfer data types More...
 
static const int ParaInstanceType = UG_USER_TYPE_FIRST + 0
 
static const int ParaSolutionType = UG_USER_TYPE_FIRST + 1
 
static const int ParaParamSetType = UG_USER_TYPE_FIRST + 2
 
static const int ParaTaskType = UG_USER_TYPE_FIRST + 3
 
static const int ParaSolverStateType = UG_USER_TYPE_FIRST + 4
 
static const int ParaCalculationStateType = UG_USER_TYPE_FIRST + 5
 
static const int ParaSolverTerminationStateType = UG_USER_TYPE_FIRST + 6
 
static const int ParaRacingRampUpParamType = UG_USER_TYPE_FIRST + 7
 
static const int UG_USER_TYPE_LAST = UG_USER_TYPE_FIRST + 7
 
static const int HashTableSize = 751
 size of thread table : this limits the number of threads More...
 

Detailed Description

ParaComm extension for Pthreads communication.

Author
Yuji Shinano

Definition in file paraCommPth.h.

Macro Definition Documentation

◆ DEF_PARA_COMM

#define DEF_PARA_COMM (   para_comm,
  comm 
)    ParaCommPth *para_comm = dynamic_cast< ParaCommPth* >(comm)

Definition at line 1154 of file paraCommPth.h.

◆ HashEntry

#define HashEntry (   tid)    ( hashCode(tid) % UG::HashTableSize )

Definition at line 57 of file paraCommPth.h.

◆ LOCK_APP

#define LOCK_APP (   comm)    comm->lockApp(__FILE__, __LINE__)

Definition at line 1155 of file paraCommPth.h.

◆ LOCK_RANK

#define LOCK_RANK (   comm)    comm->lockRank(__FILE__, __LINE__)

Definition at line 1156 of file paraCommPth.h.

◆ TAG_TRACE

#define TAG_TRACE (   call,
  fromTo,
  sourceDest,
  tag 
)
Value:
if( tagTraceFlag ) \
{ \
if( tag >= 0 ) \
{ \
/* std::cout << " call = " << #call << ", Rank = " << getRank() << ", tag = " << tag << ", " << tagStringTable[tag] << std::endl; */ \
*getOstream() << timer.getRTimeInterval() << " [Rank = " << getRank() << "] " << #call << " " << #fromTo \
<< " " << sourceDest << " with Tag = " << getTagString(tag) << std::endl; \
} \
else \
{ \
/* std::cout << " call = " << #call << ", Rank = " << getRank() << ", tag = " << tag << std::endl; */ \
*getOstream() << timer.getRTimeInterval() << " [Rank = " << getRank() << "] " << #call << " " << #fromTo \
<< " " << sourceDest << " as broadcast" << std::endl; \
} \
}

Definition at line 59 of file paraCommPth.h.

◆ UNLOCK_RANK

#define UNLOCK_RANK (   comm)    comm->unlockRank(__FILE__, __LINE__)

Definition at line 1157 of file paraCommPth.h.