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  msg_list
struct  ProcState
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
static MPI_Comm charmComm
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
void(* signal_int )(int)
static int _thread_provided = -1
static int idleblock = 0
static int request_max
static int no_outstanding_sends = 0
int inside_comm = 0
static ProcStateprocState
static PCQueue sendMsgBuf
static CmiNodeLock sendMsgBufLock = NULL
int num_workpes
int total_pes
intpetorank = NULL
int nextrank
typedef struct mpiPostRecvList MPIPostRecvList
typedef struct IRecvListEntryIRecvList
typedef struct msg_list SMSG_LIST
static void sleep (int secs)
 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 ()
static IRecvList irecvListEntryAllocate ()
static void irecvListEntryFree (IRecvList used)
void CmiSetupMachineRecvBuffers ()
unsigned char computeCheckSum (unsigned char *data, int len)
 CpvStaticDeclare (SMSG_LIST *, sent_msgs)
 CpvStaticDeclare (SMSG_LIST *, end_sent)
 CpvStaticDeclare (int, MsgQueueLen)
void mpi_end_spare ()
void MPID_Progress_test ()
static size_t CmiAllAsyncMsgsSent (void)
static void CmiReleaseSentMessages (void)
static int PumpMsgs (void)
static void PumpMsgsBlocking (void)
static int MsgQueueEmpty ()
static int RecvQueueEmpty ()
static int SendMsgBuf ()
static void EnqueueMsg (void *m, int size, int node, int mode)
static CmiCommHandle MachineSpecificSendForMPI (int destNode, int size, char *msg, int mode)
static void MachineInitForMPI (int *argc, char ***argv, int *numNodes, int *myNodeID)
static void MachinePreCommonInitForMPI (int everReturn)
static void MachinePostCommonInitForMPI (int everReturn)
static void AdvanceCommunicationForMPI (int whenidle)
static void DrainResourcesForMPI ()
static void MachineExitForMPI ()
void CmiNotifyIdleForMPI (void)
static void MachinePostNonLocalForMPI ()
static CmiCommHandle MPISendOneMsg (SMSG_LIST *smsg)
int CmiAsyncMsgSent (CmiCommHandle c)
void CmiReleaseCommHandle (CmiCommHandle c)


Detailed Description

MPI based machine layer.

Definition in file machine.c.


Typedef Documentation

typedef struct IRecvListEntry* IRecvList

typedef struct msg_list SMSG_LIST


Function Documentation

static void sleep ( int  secs  )  [static]

Definition at line 29 of file machine.c.

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().

static void reportMsgHistogramInfo (  )  [static]

Referenced by SendMsgBuf().

static IRecvList irecvListEntryAllocate (  )  [static]

Definition at line 220 of file machine.c.

References malloc(), and IRecvListEntry::next.

Referenced by PumpMsgs(), and SendMsgBuf().

static void irecvListEntryFree ( IRecvList  used  )  [static]

Definition at line 231 of file machine.c.

References IRecvListEntry::next.

Referenced by PumpMsgs().

void CmiSetupMachineRecvBuffers (  ) 

CpvStaticDeclare ( SMSG_LIST ,
sent_msgs   
)

CpvStaticDeclare ( SMSG_LIST ,
end_sent   
)

CpvStaticDeclare ( int  ,
MsgQueueLen   
)

void mpi_end_spare (  ) 

Referenced by SendMsgBuf().

void MPID_Progress_test (  ) 

Referenced by CmiReleaseSentMessages(), and PumpMsgs().

static size_t CmiAllAsyncMsgsSent ( void   )  [static]

Definition at line 523 of file machine.c.

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

Referenced by SendMsgBuf().

static void CmiReleaseSentMessages ( void   )  [static]

static int PumpMsgs ( void   )  [static]

static void PumpMsgsBlocking ( void   )  [static]

static int MsgQueueEmpty (  )  [static]

Referenced by SendMsgBuf().

static int RecvQueueEmpty (  )  [static]

Referenced by SendMsgBuf().

static int SendMsgBuf (  )  [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

The call of CmiBarrier is usually before the initialization of trace module of Charm++, therefore, the START_EVENT and END_EVENT are disabled here. -Chao Mei

Definition at line 933 of file machine.c.

References _absoluteTime, _Cmi_mynode, _Cmi_mynodesize, AdvanceCommunicationForMPI(), already_in_signal_handler, mpiPostRecvList::bufCnt, CcdCallOnConditionKeep(), charmComm, CharmLibInterOperate, CkDieNow(), Cmi_smp_mode_setting, CmiAbort(), CmiAllAsyncMsgsSent(), CmiAlloc(), CmiBarrier(), CmiBarrierZero(), CmiCpuTimer(), CmiCreateLock(), CmiError(), CmiFree(), CmiGetArgFlag(), CmiGetArgFlagDesc(), CmiGetArgInt(), CmiHandleImmediate(), CmiInitTime(), CmiLock(), CmiMachineProgressImpl(), CmiMyPe(), CmiMyRank(), CmiNodeAllBarrier(), CmiNodeBarrier(), CmiNodeFirst(), CmiNotifyBeginIdle(), CmiNotifyGetState(), CmiNotifyIdleForMPI(), CmiNotifyStillIdle(), CmiPrintf(), CmiPrintStackTrace(), CmiRegisterHandler(), CmiReleaseSentMessages(), CmiStartTimer(), Converse::CmiSyncBroadcastAndFree(), CmiTimer(), CmiTimerAbsolute(), CmiTimerInit(), CmiTimerIsSynchronized(), CmiUnlock(), CmiWallTimer(), CmiYield(), COMM_THREAD_ONLY_RECV, COMM_THREAD_SEND_RECV, CommunicationServerThread(), CPD_ABORT, CPD_SIGNAL, CpdFreeze(), CpdNotify(), debugLog, done, DrainResourcesForMPI(), EmergencyExit(), free(), handleOneRecvedMsg(), idx, irecvListEntryAllocate(), KillOnAllSigs(), LrtsAbort(), LrtsPostNonLocal(), machine_exit(), MachineExitForMPI(), MachineInitForMPI(), MachinePostCommonInitForMPI(), MachinePostNonLocalForMPI(), MachinePreCommonInitForMPI(), malloc(), MPI_Abort(), MPI_Allreduce(), MPI_ANY_SOURCE, MPI_Attr_get(), MPI_Barrier(), MPI_BYTE, MPI_Cancel(), MPI_Comm_dup(), MPI_Comm_rank(), MPI_Comm_size(), MPI_COMM_WORLD, MPI_DOUBLE, mpi_end_spare(), MPI_Finalize(), MPI_Get_count(), MPI_Get_version(), MPI_Init(), MPI_INT, MPI_Irecv(), MPI_MIN, MPI_Recv(), MPI_Send(), MPI_SUCCESS, MPI_Test(), MPI_Wtime(), MPI_WTIME_IS_GLOBAL, MPISendOneMsg(), msg, MsgQueueEmpty(), mpiPostRecvList::msgSizeIdx, n, IRecvListEntry::next, mpiPostRecvList::next, PCQueueCreate(), PCQueueEmpty(), PCQueuePop(), mpiPostRecvList::postedRecvBufs, mpiPostRecvList::postedRecvReqs, printf(), ptr, PumpMsgs(), PumpMsgsBlocking(), recordMsgHistogramInfo(), CmiStateStruct::recv, ProcState::recvLock, RecvQueueEmpty(), registerMachineUserEventsFunction(), reportMsgHistogramInfo(), s, ProcState::sendMsgBuf, signal_int, size, sleep(), and traceRegisterUserEvent().

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

static CmiCommHandle MachineSpecificSendForMPI ( int  destNode,
int  size,
char *  msg,
int  mode 
) [static]

static void MachineInitForMPI ( int argc,
char ***  argv,
int numNodes,
int myNodeID 
) [static]

Referenced by SendMsgBuf().

static void MachinePreCommonInitForMPI ( int  everReturn  )  [static]

Referenced by SendMsgBuf().

static void MachinePostCommonInitForMPI ( int  everReturn  )  [static]

Referenced by SendMsgBuf().

static void AdvanceCommunicationForMPI ( int  whenidle  )  [static]

Referenced by SendMsgBuf().

static void DrainResourcesForMPI (  )  [static]

Referenced by SendMsgBuf().

static void MachineExitForMPI (  )  [static]

Referenced by SendMsgBuf().

void CmiNotifyIdleForMPI ( void   ) 

Referenced by SendMsgBuf().

static void MachinePostNonLocalForMPI (  )  [static]

Referenced by SendMsgBuf().

static CmiCommHandle MPISendOneMsg ( SMSG_LIST smsg  )  [static]

int CmiAsyncMsgSent ( CmiCommHandle  c  ) 

Definition at line 540 of file machine.c.

void CmiReleaseCommHandle ( CmiCommHandle  c  ) 

Definition at line 558 of file machine.c.


Variable Documentation

Definition at line 52 of file machine.c.

Definition at line 54 of file machine.c.

Definition at line 55 of file machine.c.

int dynamicSendCap = CMI_DYNAMIC_MAXCAPSIZE [static]

Definition at line 57 of file machine.c.

int dynamicRecvCap = CMI_DYNAMIC_MAXCAPSIZE [static]

Definition at line 58 of file machine.c.

MPI_Comm charmComm [static]

Definition at line 59 of file machine.c.

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

int SEND_CAP = 3 [static]

Definition at line 62 of file machine.c.

int RECV_CAP = 2 [static]

Definition at line 66 of file machine.c.

int MPI_POST_RECV_COUNT = 10 [static]

Definition at line 145 of file machine.c.

int MPI_POST_RECV_LOWERSIZE = 8000 [static]

Definition at line 148 of file machine.c.

int MPI_POST_RECV_UPPERSIZE = 64000 [static]

Definition at line 149 of file machine.c.

int MPI_POST_RECV_INC = 1000 [static]

Definition at line 152 of file machine.c.

int MPI_POST_RECV_MSG_INC = 400 [static]

Definition at line 155 of file machine.c.

Definition at line 158 of file machine.c.

int MPI_POST_RECV_FREQ = 1000 [static]

Definition at line 161 of file machine.c.

Definition at line 163 of file machine.c.

static int MSG_HISTOGRAM_BINSIZE = 1000 [static]

Definition at line 192 of file machine.c.

static int MAX_HISTOGRAM_BUCKETS = 2000 [static]

Definition at line 193 of file machine.c.

int IRECV_MSG_THRESHOLD = 8000 [static]

Definition at line 208 of file machine.c.

IRecvList freedIrecvList = NULL [static]

Definition at line 216 of file machine.c.

IRecvList waitIrecvListHead = NULL [static]

Definition at line 217 of file machine.c.

IRecvList waitIrecvListTail = NULL [static]

Definition at line 218 of file machine.c.

int checksum_flag = 0 [static]

Definition at line 278 of file machine.c.

void(* signal_int)(int)

Referenced by SendMsgBuf().

int _thread_provided = -1 [static]

Definition at line 298 of file machine.c.

int idleblock = 0 [static]

Definition at line 299 of file machine.c.

int request_max [static]

Definition at line 313 of file machine.c.

int no_outstanding_sends = 0 [static]

Definition at line 315 of file machine.c.

Definition at line 318 of file machine.c.

ProcState* procState [static]

Definition at line 327 of file machine.c.

PCQueue sendMsgBuf [static]

Definition at line 330 of file machine.c.

CmiNodeLock sendMsgBufLock = NULL [static]

Definition at line 331 of file machine.c.

Definition at line 337 of file machine.c.

Definition at line 337 of file machine.c.

int* petorank = NULL

Definition at line 338 of file machine.c.

Definition at line 339 of file machine.c.


Generated on Sat May 26 08:08:05 2012 for Charm++ by  doxygen 1.5.5