PPL Logo

arch/mpi/machine.C File Reference

MPI based machine layer. More...

Go to the source code of this file.

Data Structures

struct  mpiPostRecvList
struct  IRecvListEntry
struct  crashedrank
struct  msg_list
struct  ProcState
enum  mpiMsgTypes {
  REGULAR, ONESIDED_BUFFER_SEND, ONESIDED_BUFFER_RECV, ONESIDED_BUFFER_DIRECT_RECV,
  ONESIDED_BUFFER_DIRECT_SEND, POST_DIRECT_RECV, POST_DIRECT_SEND
}
static int CMI_DYNAMIC_OUTGOING_THRESHOLD = 4
static int CMI_DYNAMIC_SEND_CAPSIZE = 4
static int CMI_DYNAMIC_RECV_CAPSIZE = 3
static int dynamicSendCap = CMI_DYNAMIC_MAXCAPSIZE
static int dynamicRecvCap = CMI_DYNAMIC_MAXCAPSIZE
MPI_Comm charmComm
int tagUb
static int SEND_CAP = 3
static int RECV_CAP = 2
static int MPI_POST_RECV_COUNT = 10
static int MPI_POST_RECV_LOWERSIZE = 8000
static int MPI_POST_RECV_UPPERSIZE = 64000
static int MPI_POST_RECV_INC = 1000
static int MPI_POST_RECV_MSG_INC = 400
static int MPI_POST_RECV_MSG_CNT_THRESHOLD = 200
static int MPI_POST_RECV_FREQ = 1000
static int MPI_POST_RECV_SIZE
static int MSG_HISTOGRAM_BINSIZE = 1000
static int MAX_HISTOGRAM_BUCKETS = 2000
static int IRECV_MSG_THRESHOLD = 8000
static IRecvList freedIrecvList = NULL
static IRecvList waitIrecvListHead = NULL
static IRecvList waitIrecvListTail = NULL
static int checksum_flag = 0
struct sigaction signal_int
static int _thread_provided = -1
static int idleblock = 0
int srcRank
static CmiNodeLock rdmaTagLock = 0
int rdmaTag = RDMA_BASE_TAG
static int request_max
static int no_outstanding_sends = 0
int inside_comm = 0
static ProcStateprocState
PCQueue postMsgBuf
static CmiNodeLock postMsgBufLock = NULL
int num_workpes
int total_pes
intpetorank = NULL
int nextrank
typedef struct mpiPostRecvList MPIPostRecvList
typedef struct IRecvListEntryIRecvList
typedef struct crashedrank crashedRankList
typedef struct msg_list SMSG_LIST
static char * strsignal (int sig)
 CpvStaticDeclare (double, projTraceStart)
 CpvDeclare (MPIPostRecvList *, postRecvListHdr)
 CpvDeclare (MPIPostRecvList *, curPostRecvPtr)
 CpvDeclare (int, msgRecvCnt)
 CpvDeclare (unsigned long long, Cmi_posted_recv_total)
 CpvDeclare (unsigned long long, Cmi_unposted_recv_total)
 CpvDeclare (MPI_Request *, CmiPostedRecvRequests)
 CpvDeclare (char **, CmiPostedRecvBuffers)
 CpvDeclare (int *, MSG_HISTOGRAM_ARRAY)
static void recordMsgHistogramInfo (int size)
static void reportMsgHistogramInfo (void)
static IRecvList irecvListEntryAllocate (void)
static void irecvListEntryFree (IRecvList used)
void CmiSetupMachineRecvBuffers (void)
unsigned char computeCheckSum (unsigned char *data, int len)
void(*) signal_int (int)
 CpvDeclare (crashedRankList *, crashedRankHdr)
 CpvDeclare (crashedRankList *, crashedRankPtr)
int isRankDie (int rank)
 CpvDeclare (SMSG_LIST *, sent_msgs)
 CpvDeclare (SMSG_LIST *, end_sent)
 CpvDeclare (int, MsgQueueLen)
void mpi_end_spare (void)
static size_t CheckAllAsyncMsgsSent (void)
static void ReleasePostedMessages (void)
static int PumpMsgs (void)
static void PumpMsgsBlocking (void)
static int MsgQueueEmpty (void)
static int RecvQueueEmpty (void)
static int SendMsgBuf (void)
static void EnqueueMsg (void *m, int size, int node, int mode, int type, void *ref)
void CmiNotifyIdleForMPI (void)
SMSG_LISTallocateSmsgList (char *msg, int destNode, int size, int mode, int type, void *ref)
static CmiCommHandle MPISendOneMsg (SMSG_LIST *smsg)
CmiCommHandle LrtsSendFunc (int destNode, int destPE, int size, char *msg, int mode)
int CheckAsyncMsgSent (CmiCommHandle c)


Detailed Description

MPI based machine layer.

Definition in file machine.C.


Typedef Documentation

typedef struct IRecvListEntry* IRecvList

typedef struct crashedrank crashedRankList

typedef struct msg_list SMSG_LIST


Enumeration Type Documentation

Enumerator:
REGULAR 
ONESIDED_BUFFER_SEND 
ONESIDED_BUFFER_RECV 
ONESIDED_BUFFER_DIRECT_RECV 
ONESIDED_BUFFER_DIRECT_SEND 
POST_DIRECT_RECV 
POST_DIRECT_SEND 

Definition at line 54 of file machine.C.


Function Documentation

static char* strsignal ( int  sig  )  [static]

Definition at line 28 of file machine.C.

References outbuf.

Referenced by SendMsgBuf().

Here is the caller graph for this function:

CpvStaticDeclare ( double  ,
projTraceStart   
)

CpvDeclare ( MPIPostRecvList ,
postRecvListHdr   
)

CpvDeclare ( MPIPostRecvList ,
curPostRecvPtr   
)

CpvDeclare ( int  ,
msgRecvCnt   
)

CpvDeclare ( unsigned long  long,
Cmi_posted_recv_total   
)

CpvDeclare ( unsigned long  long,
Cmi_unposted_recv_total   
)

CpvDeclare ( MPI_Request ,
CmiPostedRecvRequests   
)

CpvDeclare ( char **  ,
CmiPostedRecvBuffers   
)

CpvDeclare ( int ,
MSG_HISTOGRAM_ARRAY   
)

static void recordMsgHistogramInfo ( int  size  )  [static]

Referenced by PumpMsgs(), and SendMsgBuf().

Here is the caller graph for this function:

static void reportMsgHistogramInfo ( void   )  [static]

Referenced by SendMsgBuf().

Here is the caller graph for this function:

static IRecvList irecvListEntryAllocate ( void   )  [static]

Definition at line 240 of file machine.C.

References malloc(), and IRecvListEntry::next.

Referenced by PumpMsgs(), recvViaCtrlMsg(), and SendMsgBuf().

Here is the call graph for this function:

Here is the caller graph for this function:

static void irecvListEntryFree ( IRecvList  used  )  [static]

Definition at line 251 of file machine.C.

References IRecvListEntry::next.

Referenced by PumpMsgs().

Here is the caller graph for this function:

void CmiSetupMachineRecvBuffers ( void   ) 

void(*) signal_int ( int   ) 

CpvDeclare ( crashedRankList ,
crashedRankHdr   
)

CpvDeclare ( crashedRankList ,
crashedRankPtr   
)

int isRankDie ( int  rank  ) 

Referenced by CheckAllAsyncMsgsSent(), ReleasePostedMessages(), and SendMsgBuf().

Here is the caller graph for this function:

CpvDeclare ( SMSG_LIST ,
sent_msgs   
)

CpvDeclare ( SMSG_LIST ,
end_sent   
)

CpvDeclare ( int  ,
MsgQueueLen   
)

void mpi_end_spare ( void   ) 

Referenced by SendMsgBuf().

Here is the caller graph for this function:

static size_t CheckAllAsyncMsgsSent ( void   )  [static]

Definition at line 561 of file machine.C.

References CmiAbort(), CpuTopoDetails::done, msg_list::dstrank, isRankDie(), msg_list::next, and msg_list::req.

Referenced by SendMsgBuf().

Here is the call graph for this function:

Here is the caller graph for this function:

static void ReleasePostedMessages ( void   )  [static]

static int PumpMsgs ( void   )  [static]

static void PumpMsgsBlocking ( void   )  [static]

Definition at line 994 of file machine.C.

References buf, CdsFifo_Empty(), charmComm, CmiAbort(), CmiAlloc(), CmiGetState(), CmiMyPe(), CmiNodeFirst(), CmiPrintf(), CmiWallTimer(), CqsEmpty(), handleOneRecvedMsg(), msg, PCQueueEmpty(), and traceUserSuppliedBracketedNote().

Referenced by SendMsgBuf().

Here is the call graph for this function:

Here is the caller graph for this function:

static int MsgQueueEmpty ( void   )  [static]

Referenced by SendMsgBuf().

Here is the caller graph for this function:

static int RecvQueueEmpty ( void   )  [static]

Referenced by SendMsgBuf().

Here is the caller graph for this function:

static int SendMsgBuf ( void   )  [static]

Obtain the number of nodes, my node id, and consuming machine layer specific arguments

Since the timerLock is never created, and is always NULL, then all the if-condition inside the timer functions could be disabled right now in the case of SMP. --Chao Mei

Definition at line 1042 of file machine.C.

References _absoluteTime, _Cmi_mynode, _Cmi_mynodesize, _thread_provided, argc, argv, mpiPostRecvList::bufCnt, charmComm, CharmLibInterOperate, CheckAllAsyncMsgsSent(), checksum_flag, CkDieNow(), CMI_DYNAMIC_OUTGOING_THRESHOLD, CMI_DYNAMIC_RECV_CAPSIZE, CMI_DYNAMIC_SEND_CAPSIZE, Cmi_smp_mode_setting, CmiAbort(), CmiAbortHelper(), CmiAlloc(), CmiBarrier(), CmiBarrierZero(), CmiCpuTimer(), CmiCreateLock(), CmiFree(), CmiGetArgc(), CmiGetArgFlag(), CmiGetArgFlagDesc(), CmiGetArgInt(), CmiHandleImmediate(), CmiInitTime(), CmiLock(), CmiMachineProgressImpl(), CmiMyPe(), CmiMyRank(), CmiNodeAllBarrier(), CmiNodeFirst(), CmiNotifyIdleForMPI(), CmiPrintf(), CmiStartTimer(), CmiTimer(), CmiTimerAbsolute(), CmiTimerInit(), CmiTimerIsSynchronized(), CmiUnlock(), CmiWallTimer(), COMM_THREAD_ONLY_RECV, COMM_THREAD_SEND_RECV, CommunicationServerThread(), count, createCtrlMsgIrecvBufs(), debug, CpuTopoDetails::done, dynamicSendCap, find_spare_mpirank(), flag, free(), handleOneRecvedMsg(), high, idleblock, idx, IRECV_MSG_THRESHOLD, irecvListEntryAllocate(), isRankDie(), LrtsAbort(), LrtsAdvanceCommunication(), LrtsBarrier(), LrtsBeginIdle(), LrtsDrainResources(), LrtsExit(), LrtsInit(), LrtsNotifyIdle(), LrtsPostCommonInit(), LrtsPostNonLocal(), LrtsPreCommonInit(), LrtsStillIdle(), PUP::m, malloc(), MAX_HISTOGRAM_BUCKETS, message, MPI_Abort, MPI_Allreduce, MPI_Barrier, MPI_Bcast, MPI_Cancel, MPI_Comm_dup, MPI_Comm_get_attr, MPI_Comm_rank, MPI_CTRL_MSG_CNT, mpi_end_spare(), MPI_Finalize, MPI_Get_version, MPI_Init, MPI_Irecv, MPI_POST_RECV_COUNT, MPI_POST_RECV_FREQ, MPI_POST_RECV_INC, MPI_POST_RECV_LOWERSIZE, MPI_POST_RECV_MSG_CNT_THRESHOLD, MPI_POST_RECV_MSG_INC, MPI_POST_RECV_SIZE, MPI_POST_RECV_UPPERSIZE, mpi_restart_crashed(), MPISendOneMsg(), MPISendOrRecvOneBuffer(), msg, MSG_HISTOGRAM_BINSIZE, MsgQueueEmpty(), mpiPostRecvList::msgSizeIdx, n, crashedrank::next, IRecvListEntry::next, mpiPostRecvList::next, nextrank, no_outstanding_sends, num_workpes, ONESIDED_BUFFER_DIRECT_RECV, ONESIDED_BUFFER_DIRECT_SEND, PCQueueCreate(), PCQueueEmpty(), PCQueuePop(), petorank, mpiPostRecvList::postedRecvBufs, mpiPostRecvList::postedRecvReqs, ProcState::postMsgBuf, postMsgBufLock, PumpMsgs(), PumpMsgsBlocking(), quietMode, crashedrank::rank, rank, rdmaTagLock, recordMsgHistogramInfo(), CmiStateStruct::recv, RECV_CAP, ProcState::recvLock, RecvQueueEmpty(), msg_list::ref, registerMachineUserEventsFunction(), ReleasePostedMessages(), reportMsgHistogramInfo(), request_max, SEND_CAP, signal_int, size, sleep(), srcRank, strsignal(), PUP::t, ncpystruct::tag, tagUb, total_pes, traceRegisterUserEvent(), msg_list::type, and userDrivenMode.

static void EnqueueMsg ( void *  m,
int  size,
int  node,
int  mode,
int  type,
void *  ref 
) [static]

Definition at line 442 of file machine.C.

References allocateSmsgList(), CmiMyRank(), msg_list::destpe, msg_list::mode, msg_list::msg, msg_list::next, PCQueueLength(), PCQueuePush(), msg_list::ref, and msg_list::size.

Referenced by LrtsIssueRget(), LrtsIssueRput(), and LrtsSendFunc().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiNotifyIdleForMPI ( void   ) 

Referenced by SendMsgBuf().

Here is the caller graph for this function:

SMSG_LIST* allocateSmsgList ( char *  msg,
int  destNode,
int  size,
int  mode,
int  type,
void *  ref 
)

Definition at line 425 of file machine.C.

References msg_list::destpe, malloc(), msg_list::mode, msg_list::msg, msg_list::next, msg_list::ref, msg_list::size, and msg_list::type.

Referenced by EnqueueMsg(), LrtsIssueRget(), LrtsIssueRput(), LrtsSendFunc(), and MPIPostOneBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

static CmiCommHandle MPISendOneMsg ( SMSG_LIST smsg  )  [static]

CmiCommHandle LrtsSendFunc ( int  destNode,
int  destPE,
int  size,
char *  msg,
int  mode 
)

Definition at line 540 of file machine.C.

References allocateSmsgList(), Cmi_smp_mode_setting, CmiGetState(), COMM_THREAD_SEND_RECV, EnqueueMsg(), MPISendOneMsg(), and REGULAR.

Referenced by CmiInterSendNetworkFunc().

Here is the call graph for this function:

Here is the caller graph for this function:

int CheckAsyncMsgSent ( CmiCommHandle  c  ) 

Definition at line 585 of file machine.C.

References CmiAbort(), CpuTopoDetails::done, msg_list::next, and msg_list::req.

Here is the call graph for this function:


Variable Documentation

Definition at line 68 of file machine.C.

Referenced by PumpMsgs(), and SendMsgBuf().

Definition at line 70 of file machine.C.

Referenced by SendMsgBuf().

Definition at line 71 of file machine.C.

Referenced by PumpMsgs(), and SendMsgBuf().

int dynamicSendCap = CMI_DYNAMIC_MAXCAPSIZE [static]

Definition at line 73 of file machine.C.

Referenced by SendMsgBuf().

int dynamicRecvCap = CMI_DYNAMIC_MAXCAPSIZE [static]

Definition at line 74 of file machine.C.

Referenced by PumpMsgs().

Definition at line 76 of file machine.C.

Referenced by getNewMPITag(), and SendMsgBuf().

int SEND_CAP = 3 [static]

Definition at line 79 of file machine.C.

Referenced by SendMsgBuf().

int RECV_CAP = 2 [static]

Definition at line 83 of file machine.C.

Referenced by PumpMsgs(), and SendMsgBuf().

int MPI_POST_RECV_COUNT = 10 [static]

Definition at line 154 of file machine.C.

Referenced by SendMsgBuf().

int MPI_POST_RECV_LOWERSIZE = 8000 [static]

Definition at line 157 of file machine.C.

Referenced by MPISendOneMsg(), PumpMsgs(), and SendMsgBuf().

int MPI_POST_RECV_UPPERSIZE = 64000 [static]

Definition at line 158 of file machine.C.

Referenced by MPISendOneMsg(), and SendMsgBuf().

int MPI_POST_RECV_INC = 1000 [static]

Definition at line 161 of file machine.C.

Referenced by MPISendOneMsg(), PumpMsgs(), and SendMsgBuf().

int MPI_POST_RECV_MSG_INC = 400 [static]

Definition at line 164 of file machine.C.

Referenced by SendMsgBuf().

Definition at line 167 of file machine.C.

Referenced by SendMsgBuf().

int MPI_POST_RECV_FREQ = 1000 [static]

Definition at line 170 of file machine.C.

Referenced by SendMsgBuf().

Definition at line 172 of file machine.C.

Referenced by PumpMsgs(), and SendMsgBuf().

static int MSG_HISTOGRAM_BINSIZE = 1000 [static]

Definition at line 201 of file machine.C.

Referenced by SendMsgBuf().

static int MAX_HISTOGRAM_BUCKETS = 2000 [static]

Definition at line 202 of file machine.C.

Referenced by SendMsgBuf().

int IRECV_MSG_THRESHOLD = 8000 [static]

Definition at line 228 of file machine.C.

Referenced by PumpMsgs(), and SendMsgBuf().

IRecvList freedIrecvList = NULL [static]

Definition at line 236 of file machine.C.

IRecvList waitIrecvListHead = NULL [static]

Definition at line 237 of file machine.C.

IRecvList waitIrecvListTail = NULL [static]

Definition at line 238 of file machine.C.

Referenced by recvViaCtrlMsg().

int checksum_flag = 0 [static]

Definition at line 287 of file machine.C.

Referenced by SendMsgBuf().

void(* signal_int)(int)

Definition at line 306 of file machine.C.

Referenced by SendMsgBuf().

int _thread_provided = -1 [static]

Definition at line 310 of file machine.C.

Referenced by SendMsgBuf().

int idleblock = 0 [static]

Definition at line 311 of file machine.C.

Referenced by SendMsgBuf().

CmiNodeLock rdmaTagLock = 0 [static]

Definition at line 327 of file machine.C.

Referenced by getNewMPITag(), and SendMsgBuf().

int rdmaTag = RDMA_BASE_TAG

Definition at line 332 of file machine.C.

Referenced by getNewMPITag().

int request_max [static]

Definition at line 358 of file machine.C.

Referenced by MPISendOneMsg(), and SendMsgBuf().

int no_outstanding_sends = 0 [static]

Definition at line 360 of file machine.C.

Referenced by SendMsgBuf().

Definition at line 363 of file machine.C.

ProcState* procState [static]

Definition at line 372 of file machine.C.

Referenced by MPIPostOneBuffer().

Definition at line 375 of file machine.C.

Referenced by MPIPostOneBuffer().

CmiNodeLock postMsgBufLock = NULL [static]

Definition at line 376 of file machine.C.

Referenced by SendMsgBuf().

Definition at line 382 of file machine.C.

Referenced by SendMsgBuf().

Definition at line 382 of file machine.C.

Referenced by SendMsgBuf().

int* petorank = NULL

Definition at line 383 of file machine.C.

Referenced by MPISendOneMsg(), MPISendOrRecvOneBuffer(), and SendMsgBuf().

Definition at line 384 of file machine.C.

Referenced by SendMsgBuf().


Generated on Mon Sep 21 07:56:00 2020 for Charm++ by  doxygen 1.5.5