PPL Logo

arch/util/machine-common-core.c File Reference

Go to the source code of this file.

Data Structures

struct  CmiIdleState

Enumerations

enum  MACHINE_SMP_MODE {
  INVALID_MODE, COMM_THREAD_SEND_RECV = 1, COMM_THREAD_SEND_RECV = 1, COMM_THREAD_ONLY_RECV,
  COMM_WORK_THREADS_SEND_RECV, COMM_THREAD_NOT_EXIST
}

Functions

 CsvDeclare (PCQueue, procBcastQ)
 CsvDeclare (PCQueue, nodeBcastQ)
static int _cmi_log2 (int size)
static void handleOneBcastMsg (int size, char *msg)
static void processBcastQs ()
static INLINE_KEYWORD void processProcBcastMsg (int size, char *msg)
static INLINE_KEYWORD void processNodeBcastMsg (int size, char *msg)
static void SendSpanningChildrenProc (int size, char *msg)
static void SendHyperCubeProc (int size, char *msg)
static void SendSpanningChildrenNode (int size, char *msg)
static void SendHyperCubeNode (int size, char *msg)
static void SendSpanningChildren (int size, char *msg, int rankToAssign, int startNode)
static void SendHyperCube (int size, char *msg, int rankToAssign, int startNode)
void CmiSyncBroadcastFn (int size, char *msg)
CmiCommHandle CmiAsyncBroadcastFn (int size, char *msg)
void CmiFreeBroadcastFn (int size, char *msg)
void CmiSyncBroadcastAllFn (int size, char *msg)
CmiCommHandle CmiAsyncBroadcastAllFn (int size, char *msg)
void CmiFreeBroadcastAllFn (int size, char *msg)
void CmiSyncNodeBroadcastFn (int size, char *msg)
CmiCommHandle CmiAsyncNodeeroadcastFn (int size, char *msg)
void CmiFreeNodeBroadcastFn (int size, char *msg)
void CmiSyncNodeBroadcastAllFn (int size, char *msg)
CmiCommHandle CmiAsyncNodeBroadcastAllFn (int size, char *msg)
void CmiFreeNodeBroadcastAllFn (int size, char *msg)
 CpvDeclare (void *, CmiLocalQueue)
 CpvDeclare (unsigned, networkProgressCount)
void CmiAbort (const char *message)
 Serial version of common Charm++ routines:.
static void PerrorExit (const char *msg)
static void handleOneRecvedMsg (int size, char *msg)
static void SendToPeers (int size, char *msg)
void CmiPushPE (int rank, void *msg)
void CmiPushNode (void *msg)
static void CmiSendSelf (char *msg)
void CmiSyncSendFn (int destPE, int size, char *msg)
CmiCommHandle CmiAsyncSendFn (int destPE, int size, char *msg)
void CmiFreeSendFn (int destPE, int size, char *msg)
static void CmiSendNodeSelf (char *msg)
void CmiSyncNodeSendFn (int destNode, int size, char *msg)
CmiCommHandle CmiAsyncNodeSendFn (int destNode, int size, char *msg)
void CmiFreeNodeSendFn (int destNode, int size, char *msg)
void ConverseInit (int argc, char **argv, CmiStartFn fn, int usched, int initret)
static void ConverseRunPE (int everReturn)
static void AdvanceCommunication (int whenidle)
static void CommunicationServer (int sleepTime)
static void CommunicationServerThread (int sleepTime)
void ConverseExit (void)
void * CmiGetNonLocal (void)
void * CmiGetNonLocalNodeQ (void)
static char * CopyMsg (char *msg, int len)
static CmiIdleStateCmiNotifyGetState (void)
static void CmiNotifyBeginIdle (CmiIdleState *s)
 Generally,.
static void CmiNotifyStillIdle (CmiIdleState *s)
void CmiNotifyIdle (void)
void CmiMemLock ()
void CmiMemUnlock ()
void CmiYield (void)
static void CmiStartThreads (char **argv)
INLINE_KEYWORD int CmiMyPe ()
INLINE_KEYWORD int CmiMyRank ()
INLINE_KEYWORD int CmiNodeFirst (int node)
INLINE_KEYWORD int CmiNodeSize (int node)
INLINE_KEYWORD int CmiNodeOf (int pe)
INLINE_KEYWORD int CmiRankOf (int pe)
 CsvDeclare (CmiNodeState, NodeState)
 CpvExtern (int, _urgentSend)
CmiCommHandle CmiSendNetworkFunc (int destNode, int size, char *msg, int mode)
 functions for broadcast
void ConverseCommonInit (char **argv)
 Main Converse initialization routine.
void CthInit (char **argv)
void ConverseCommonExit ()

Variables

static int MSG_STATISTIC = 0
int msg_histogram [22]
static int CmiNodesDim
int _Cmi_mynode
int _Cmi_mynodesize
int _Cmi_numnodes
int _Cmi_numpes
static enum MACHINE_SMP_MODE Cmi_smp_mode_setting = COMM_THREAD_SEND_RECV
static volatile int commThdExit = 0
static CmiNodeLock commThdExitLock = 0
int Cmi_commthread = 0
static int Cmi_nodestart
int networkProgressPeriod
static char ** Cmi_argv
static char ** Cmi_argvcopy
static CmiStartFn Cmi_startfn
static int Cmi_usrsched
static struct CmiStateStruct Cmi_state
int _Cmi_mype
int _Cmi_myrank
static int refcount = 0


Enumeration Type Documentation

Enumerator:
INVALID_MODE 
COMM_THREAD_SEND_RECV 
COMM_THREAD_SEND_RECV 
COMM_THREAD_ONLY_RECV 
COMM_WORK_THREADS_SEND_RECV 
COMM_THREAD_NOT_EXIST 

Definition at line 152 of file machine-common-core.c.


Function Documentation

CsvDeclare ( PCQueue  ,
procBcastQ   
)

CsvDeclare ( PCQueue  ,
nodeBcastQ   
)

static int _cmi_log2 ( int  size  )  [static]

static void handleOneBcastMsg ( int  size,
char *  msg 
) [static]

static void processBcastQs (  )  [static]

static INLINE_KEYWORD void processProcBcastMsg ( int  size,
char *  msg 
) [static]

static INLINE_KEYWORD void processNodeBcastMsg ( int  size,
char *  msg 
) [static]

static void SendSpanningChildrenProc ( int  size,
char *  msg 
) [static]

static void SendHyperCubeProc ( int  size,
char *  msg 
) [static]

static void SendSpanningChildrenNode ( int  size,
char *  msg 
) [static]

static void SendHyperCubeNode ( int  size,
char *  msg 
) [static]

static void SendSpanningChildren ( int  size,
char *  msg,
int  rankToAssign,
int  startNode 
) [static]

static void SendHyperCube ( int  size,
char *  msg,
int  rankToAssign,
int  startNode 
) [static]

void CmiSyncBroadcastFn ( int  size,
char *  msg 
)

Definition at line 243 of file machine-broadcast.c.

CmiCommHandle CmiAsyncBroadcastFn ( int  size,
char *  msg 
)

Definition at line 266 of file machine-broadcast.c.

void CmiFreeBroadcastFn ( int  size,
char *  msg 
)

Definition at line 256 of file machine-broadcast.c.

void CmiSyncBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 274 of file machine-broadcast.c.

CmiCommHandle CmiAsyncBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 302 of file machine-broadcast.c.

void CmiFreeBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 288 of file machine-broadcast.c.

void CmiSyncNodeBroadcastFn ( int  size,
char *  msg 
)

CmiCommHandle CmiAsyncNodeeroadcastFn ( int  size,
char *  msg 
)

void CmiFreeNodeBroadcastFn ( int  size,
char *  msg 
)

Definition at line 327 of file machine-broadcast.c.

References CmiFree(), and CmiSyncNodeBroadcastFn().

void CmiSyncNodeBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 340 of file machine-broadcast.c.

References CmiSyncNodeBroadcastFn(), and CmiSyncNodeSendFn().

CmiCommHandle CmiAsyncNodeBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 345 of file machine-broadcast.c.

References CmiAsyncNodeBroadcastFn(), CmiSendNodeSelf(), and CopyMsg().

void CmiFreeNodeBroadcastAllFn ( int  size,
char *  msg 
)

Definition at line 350 of file machine-broadcast.c.

References CmiSendNodeSelf(), and CmiSyncNodeBroadcastFn().

CpvDeclare ( void *  ,
CmiLocalQueue   
)

CpvDeclare ( unsigned  ,
networkProgressCount   
)

void CmiAbort ( const char *  message  ) 

Serial version of common Charm++ routines:.

Serial version of common Charm++ routines:.

Currently only used for FEM_ALONE mode.

Orion Sky Lawlor, olawlor@acm.org, 2003/8/15

Definition at line 8 of file charm_standalone.C.

static void PerrorExit ( const char *  msg  )  [static]

Definition at line 361 of file machine-common-core.c.

Referenced by call_startfn(), CmiStartThreads(), and KillOnAllSigs().

static INLINE_KEYWORD void handleOneRecvedMsg ( int  size,
char *  msg 
) [static]

static void SendToPeers ( int  size,
char *  msg 
) [static]

Definition at line 438 of file machine-common-core.c.

References CmiPushPE(), and CopyMsg().

Referenced by SendHyperCubeProc(), and SendSpanningChildrenProc().

void CmiPushPE ( int  rank,
void *  msg 
)

Definition at line 985 of file machine.c.

References CdsFifo_Enqueue().

void CmiPushNode ( void *  msg  ) 

static void CmiSendSelf ( char *  msg  )  [static]

void CmiSyncSendFn ( int  destPE,
int  size,
char *  msg 
)

Definition at line 799 of file machine.c.

CmiCommHandle CmiAsyncSendFn ( int  destPE,
int  size,
char *  msg 
)

Definition at line 994 of file machine.c.

void CmiFreeSendFn ( int  destPE,
int  size,
char *  msg 
)

Definition at line 1212 of file machine.c.

static void CmiSendNodeSelf ( char *  msg  )  [static]

void CmiSyncNodeSendFn ( int  destNode,
int  size,
char *  msg 
)

CmiCommHandle CmiAsyncNodeSendFn ( int  destNode,
int  size,
char *  msg 
)

void CmiFreeNodeSendFn ( int  destNode,
int  size,
char *  msg 
)

void ConverseInit ( int  argc,
char **  argv,
CmiStartFn  fn,
int  usched,
int  initret 
)

Definition at line 127 of file machine.c.

static void ConverseRunPE ( int  everReturn  )  [static]

static INLINE_KEYWORD void AdvanceCommunication ( int  whenidle  )  [static]

static void CommunicationServer ( int  sleepTime  )  [static]

static void CommunicationServerThread ( int  sleepTime  )  [static]

Definition at line 882 of file machine-common-core.c.

References CmiHandleImmediate(), and CommunicationServer().

Referenced by call_startfn(), ConverseRunPE(), and SendMsgBuf().

void ConverseExit ( void   ) 

Definition at line 363 of file machine.c.

void* CmiGetNonLocal ( void   ) 

In SMP mode with comm thread, it's possible a normal msg is sent from an immediate msg which is executed on comm thread. In this case, the msg is sent to the network queue of the work thread. Therefore, even there's only one worker thread, the polling of network queue is still required.

Definition at line 2355 of file machine.c.

void* CmiGetNonLocalNodeQ ( void   ) 

static char * CopyMsg ( char *  msg,
int  len 
) [static]

static CmiIdleState * CmiNotifyGetState ( void   )  [static]

static void CmiNotifyBeginIdle ( CmiIdleState s  )  [static]

Generally,.

CmiNotifyIdle is used in non-SMP mode when the proc is idle. When the proc is idle, AdvanceCommunication needs to be called.

CmiNotifyStillIdle and CmiNotifyBeginIdle are used in SMP mode.

Different layers have choices of registering different callbacks for idle state.

Definition at line 1009 of file machine-common-core.c.

References CmiIdleState::nIdles, and CmiIdleState::sleepMs.

static void CmiNotifyStillIdle ( CmiIdleState s  )  [static]

void CmiMemLock (  ) 

Definition at line 317 of file machine-common-core.c.

void CmiMemUnlock (  ) 

Definition at line 318 of file machine-common-core.c.

static void CmiStartThreads ( char **  argv  )  [static]

Definition at line 327 of file machine-common-core.c.

References Cmi_state, and CmiStateInit().

Referenced by ConverseInit(), and KillOnAllSigs().

INLINE_KEYWORD int CmiMyPe (  ) 

Definition at line 334 of file machine-common-core.c.

References CmiGetState(), and CmiStateStruct::pe.

Referenced by __cmi_assert(), _bcastQD1(), _bcastQD2(), _bufferedLocalMessageAckHandler(), _bufferedLocalMessageCopyHandler(), _callWhenIdle(), _checkpointBarrierAckHandler(), _checkpointBarrierHandler(), _createTracecounter(), _dummyMigrationHandler(), _getCheckpointHandler(), _getGlobalStepHandler(), _getRestartCheckpointHandler(), _handlePhase0(), _handlePhase1(), _handlePhase2(), _initCharm(), _initHandler(), _localMessageAckHandler(), _messageLoggingExit(), _messageLoggingInit(), _parseCommandLineOpts(), _qdCommHandler(), _qdHandler(), _receivedDetDataHandler(), _receivedTNDataHandler(), _receiveLocationHandler(), _receiveMigrationNoticeAckHandler(), _recvCheckpointHandler(), _recvGlobalStepHandler(), _recvRestartCheckpointHandler(), _resendMessagesHandler(), _resendReplyHandler(), _sendDetsReplyHandler(), _storeCheckpointHandler(), _updateHomeRequestHandler(), _verifyAckHandler(), _verifyAckRequestHandler(), AllocatorCheck(), ampiInit(), bad_location(), CkLocRec_buffering::beenReplaced(), TraceCounter::beginExecute(), TraceCounter::beginOverview(), TraceCounter::beginPack(), TraceCounter::beginUnpack(), CkArray::broadcastHomeElements(), CcsImpl_reply(), CcsInit(), CfutureCreate(), CfutureDestroy(), CfutureStoreBuffer(), CfutureWait(), check_range(), CkArray::CkArray(), CkCppInterpreter::CkCppInterpreter(), Converse::CkMyPe(), CldAckNoTaskHandler(), CldAverageHandler(), CldBalancePeriod(), CldComputeNeighborData(), CldEnqueue(), CldGraphModuleInit(), CldMinAvg(), CldModuleGeneralInit(), CldModuleInit(), CldMoveAllSeedsAway(), CldNodeEnqueue(), CldOtherInit(), CldReadNeighborData(), CldReadytoExec(), CldSendLoad(), CldSetPEBitVector(), CldStillIdle(), clearUpMigratedRetainedLists(), CmiAddCLA(), CmiAlloc(), CmiArgGivingUsage(), CmiArgInit(), CmiBacktracePrint(), CmiCheckGmStatus(), CmiCreatePersistent(), CmiCreateReceiverPersistent(), CmiDirect_assocLocalBuffer(), CmiDirect_put(), CmiEstablishGroup(), CmiFreeSendFn(), CmiGetDynamicReduction(), CmiGetDynamicReductionRemote(), CmiGetNonLocal(), CmiGetNonLocalNodeQ(), CmiGetReductionCreate(), CmiGlobalReduce(), CmiGlobalReduceStruct(), CmiInitCell(), CmiInitCPUAffinity(), CmiInitMemAffinity(), CmiIsomalloc(), CmiIsomallocBlockListPup(), CmiIsomallocInit(), CmiListReduce(), CmiListReduceStruct(), CmiMemorySweep(), CmiMulticastDeliver(), CmiMultiMsgHandler(), CmiMXMakeConnection(), CmiNotifyStillIdle(), CmiPrintCLAs(), CmiProcessPriority(), CmiReduce(), CmiReduceID(), CmiReduceStruct(), CmiReduceStructID(), CmiRegisterHandlerGlobal(), CmiReleaseSentMessages(), CmiSyncBroadcastAllFn(), CmiSyncBroadcastFn1(), CmiSyncListSendFn(), ComlibDoneCreating(), comlibReadyHandler(), comlibTableReceivedHandler(), CkReductionMgr::contribute(), CkReductionMgr::contributeViaMessage(), converse_handlerBegin(), converse_handlerEnd(), ConverseCommonInit(), ConverseDeliver(), ConverseExit(), copyOut(), CountLogPool::CountLogPool(), CPathGetEltset(), CPathMakeArray(), CPathSendHandler(), cpd_memory_single_pup(), CpdDebugCallAllocationTree(), CpdDebugCallMemStat(), CpdDebugHandlerStatus(), CpdFreezeModeScheduler(), CpdNotify(), CpdSearchLeaks(), CpdStartGdb(), Cpthread_cond_broadcast(), Cpthread_cond_destroy(), Cpthread_cond_init(), Cpthread_cond_signal(), Cpthread_cond_wait(), Cpthread_mutex_destroy(), Cpthread_mutex_init(), Cpthread_mutex_lock(), Cpthread_mutex_trylock(), Cpthread_mutex_unlock(), cpuAffinityHandler(), cpuAffinityRecvHandler(), CQdBcastQD1(), CQdBcastQD2(), CQdHandlePhase0(), CQdHandlePhase1(), CQdHandlePhase2(), CQdStateCreate(), CthThreadBaseInit(), CWeb_Collect(), CWeb_Reduce(), CWebHandler(), disable_isomalloc(), disabled_map(), StatTable::doReduction(), drop_send_callback(), PrefixRouter::EachToManyMulticastQ(), ConvComlibManager::enableStrategy(), TraceCounter::endExecute(), TraceCounter::endOverview(), TraceCounter::endPack(), TraceCounter::endUnpack(), EnqueueOutgoingDgram(), expand_ccd_heap(), PeTable::ExtractAndPack(), PeTable::ExtractAndVectorize(), find_largest_free_region(), finishedCheckpointLoadBalancing(), CkReductionMgr::finishReduction(), gengraph(), getCheckPointPE(), getGlobalStep(), getNewPagetable(), getNUMANidByRank(), HigherPriorityWork(), informLocationHome(), StatTable::init(), init_ranges(), initQd(), initTraceTauBOC(), CkMemCheckPT::inmem_restore(), ampi::inorder(), ConvComlibManager::insertMessage(), CkMemCheckPT::isMaster(), isomallocfn(), KillEveryoneCode(), KillOnAllSigs(), ComlibArrayInfo::localBroadcast(), LrtsInitCpuTopo(), machine_procBusy(), machine_procIdle(), map_slots(), memAbort(), memory_check(), mempool_free(), meta_calloc(), meta_cfree(), meta_free(), meta_init(), meta_malloc(), meta_memalign(), meta_realloc(), meta_valloc(), on_timeout(), one_slotOP(), CountLogPool::openFile(), TraceLogger::openLogFiles(), FuncNodeHelper::parallelizeFunc(), GridMetisLB::Partition_ClusterObjects_Into_PEs(), prepare_slotmsg(), print_cpu_affinity(), print_mem_affinity(), print_myslots(), print_node0(), print_thread_affinity(), printBGP_UPC_Counters(), printSlot(), processFutureMessages(), processMessage(), ProcessMessage(), processReceivedTN(), CentralLB::ProcessReceiveMigration(), PumpMsgsBlocking(), CkLocMgr::pup(), ChareMlogData::pup(), pupArrayElementsSkip(), QdState::QdState(), readBlacklist(), CentralLB::ReceiveStats(), ampi::recv(), recv_dummy(), CkReductionMgr::ReductionStarting(), TraceCounter::registerArg(), TraceLogger::RegisterLanguage(), req_fw_handler(), ChareMlogData::searchRestoredLocalQ(), seedBalancerExit(), sendCheckpointData(), sendDummyMigrationCounts(), sendGroupMsg(), sendLocalMsg(), sendMlogLocation(), sendMsg(), SendMsgBuf(), sendRemoveLogRequests(), CentralLB::SendStats(), SendTasktoPe(), sendTicketGroupRequest(), sendTicketRequest(), StrategyTableEntry::setDiscoveryMode(), StrategyTableEntry::setErrorMode(), StrategyTableEntry::setErrorModeServer(), slotAbort(), startLoadBalancingMlog(), startMlogCheckpoint(), CkReductionMgr::startReduction(), StatTable::StatTable(), StatTableReduction(), status(), StealLoad(), StreamingHandlerFn(), TraceCounter::switchCounters(), ConvComlibManager::tableReady(), TCharmAPIRoutine::TCharmAPIRoutine(), ticketLogLocalMessage(), TraceCounter::traceBegin(), TraceCounter::traceClose(), TraceCounter::traceEnd(), TraceCounter::traceInit(), TraceProjections::TraceProjections(), TraceCounter::traceWriteSts(), try_largest_mmap_region(), unmap_slots(), CkObjID::updatePosition(), CountLogPool::write(), StatTable::write(), CountLogPool::writeSts(), and TCharmAPIRoutine::~TCharmAPIRoutine().

INLINE_KEYWORD int CmiMyRank (  ) 

INLINE_KEYWORD int CmiNodeFirst ( int  node  ) 

INLINE_KEYWORD int CmiNodeSize ( int  node  ) 

Definition at line 343 of file machine-common-core.c.

Referenced by _speedHdlr(), ccs_getinfo(), KillOnAllSigs(), and LrtsNodeSize().

INLINE_KEYWORD int CmiNodeOf ( int  pe  ) 

INLINE_KEYWORD int CmiRankOf ( int  pe  ) 

CsvDeclare ( CmiNodeState  ,
NodeState   
)

CpvExtern ( int  ,
_urgentSend   
)

CmiCommHandle CmiSendNetworkFunc ( int  destNode,
int  size,
char *  msg,
int  mode 
) [inline]

void CthInit ( char **  argv  ) 

Definition at line 906 of file threads.c.


Variable Documentation

int MSG_STATISTIC = 0 [static]

Definition at line 54 of file machine-common-core.c.

Definition at line 55 of file machine-common-core.c.

int CmiNodesDim [static]

Definition at line 67 of file machine-common-core.c.

Referenced by SendHyperCube().

Definition at line 141 of file machine-common-core.c.

enum MACHINE_SMP_MODE Cmi_smp_mode_setting = COMM_THREAD_SEND_RECV [static]

volatile int commThdExit = 0 [static]

Definition at line 168 of file machine-common-core.c.

Definition at line 169 of file machine-common-core.c.

Definition at line 185 of file machine-common-core.c.

int Cmi_nodestart [static]

Definition at line 204 of file machine-common-core.c.

Referenced by KillOnAllSigs().

char** Cmi_argv [static]

Definition at line 259 of file machine-common-core.c.

Referenced by ConverseInit(), ConverseRunPE(), and KillOnAllSigs().

char** Cmi_argvcopy [static]

Definition at line 260 of file machine-common-core.c.

Referenced by ConverseInit(), ConverseRunPE(), and KillOnAllSigs().

Definition at line 261 of file machine-common-core.c.

Referenced by ConverseInit(), ConverseRunPE(), and KillOnAllSigs().

int Cmi_usrsched [static]

Definition at line 262 of file machine-common-core.c.

Referenced by KillOnAllSigs().

struct CmiStateStruct Cmi_state [static]

Definition at line 313 of file machine-common-core.c.

Referenced by CmiStartThreads().

Definition at line 314 of file machine-common-core.c.

Definition at line 315 of file machine-common-core.c.

int refcount = 0 [static]


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