PPL Logo

CkInit

Controls the Charm++ startup process. More...

Data Structures

struct  _statsHeader
struct  _WarningMsg

Typedefs

typedef void(* CkFtFn )(const char *, CkArgMsg *)
typedef struct _statsHeader statsHeader
typedef struct _WarningMsg WarningMsg
typedef void(* CkExitFn )(void)

Functions

void CkRestartMain (const char *dirname, CkArgMsg *args)
 CksvDeclare (UInt, _numInitNodeMsgs)
 Count the number of nodegroups that have been created in mainchares.
 CksvDeclare (int, _numPendingRORdmaTransfers)
 CksvDeclare (bool, _triggersSent)
 CkpvDeclare (void *, _currentChare)
 CkpvDeclare (int, _currentChareType)
 CkpvDeclare (CkGroupID, _currentGroup)
 CkpvDeclare (void *, _currentNodeGroupObj)
 CkpvDeclare (CkGroupID, _currentGroupRednMgr)
 CkpvDeclare (GroupTable *, _groupTable)
 CkpvDeclare (GroupIDTable *, _groupIDTable)
 CkpvDeclare (CmiImmediateLockType, _groupTableImmLock)
 CkpvDeclare (UInt, _numGroups)
 CkpvDeclare (CkCoreState *, _coreState)
 CksvDeclare (UInt, _numNodeGroups)
 CksvDeclare (GroupTable *, _nodeGroupTable)
 CksvDeclare (GroupIDTable, _nodeGroupIDTable)
 CksvDeclare (CmiImmediateLockType, _nodeGroupTableImmLock)
 CksvDeclare (CmiNodeLock, _nodeLock)
 CksvStaticDeclare (PtrVec *, _nodeBocInitVec)
 CkpvDeclare (int, _charmEpoch)
 CkpvDeclare (bool, _destroyingNodeGroup)
 CkpvDeclare (Stats *, _myStats)
 CkpvDeclare (MsgPool *, _msgPool)
 CkpvDeclare (_CkOutStream *, _ckout)
 CkpvDeclare (_CkErrStream *, _ckerr)
 CkpvStaticDeclare (int, _numInitsRecd)
 CkpvStaticDeclare (bool, _initdone)
 CkpvStaticDeclare (PtrQ *, _buffQ)
 CkpvStaticDeclare (PtrVec *, _bocInitVec)
void _libExitHandler (envelope *env)
 CpvCExtern (int, interopExitFlag)
void StopInteropScheduler ()
 CpvExtern (char *, _validProcessors)
 CkpvDeclare (char, startedEvac)
void readKillFile ()
void processRaiseEvacFile (char *raiseEvacFile)
void _registerCommandLineOpt (const char *opt)
static void _parseCommandLineOpts (char **argv)
static void _bufferHandler (void *msg)
static void _discardHandler (envelope *env)
static void _printStats (void)
static void * mergeStats (int *size, void *data, void **remote, int count)
static void _sendStats (void)
static void * mergeWarningMsg (int *size, void *data, void **remote, int count)
static void _sendWarnings (void)
static void ReportWarnings (WarningMsg *msg)
void _messageLoggingExit ()
 Function to wrap up performance information.
void _skipCldHandler (void *converseMsg)
void _discard_charm_message ()
void _resume_charm_message ()
static void _exitHandler (envelope *env)
void _ROGroupRestartHandler (void *msg)
static void _processBufferedBocInits (void)
 Create all groups in this processor (not called on processor zero).
static void _processBufferedNodeBocInits (void)
 Create all nodegroups in this node (called only by rank zero, and never on node zero).
static void _processBufferedMsgs (void)
static int _charmLoadEstimator (void)
static void _sendTriggers (void)
 This function is used to send other processors on the same node a signal so they can check if their _initDone can be called: the reason for this is that the check at the end of _initHandler can fail due to a missing message containing a Nodegroup creation.
void _initDone (void)
 This function (not a handler) is called once and only once per processor.
static void _triggerHandler (envelope *env)
 Converse handler receiving a signal from another processors in the same node.
static void _processROMsgMsg (envelope *env)
static void _processRODataMsg (envelope *env)
static void _roRestartHandler (void *msg)
 This is similar to the _initHandler, only that the Groups and Nodegroups are initialized from disk, so only one single message is expected.
static void _roRdmaDoneHandler (envelope *env)
void checkForInitDone (bool rdmaROCompleted)
static void _initHandler (void *msg, CkCoreState *ck)
 This handler is used only during initialization.
void CkCleanup ()
void CkExit (int exitcode)
void CkContinueExit ()
void EmergencyExit (void)
static void _nullFn (void *, void *)
void _registerLBDatabase (void)
void _registerMetaBalancer (void)
void _registerPathHistory (void)
void _registerControlPoints (void)
void _registerTraceControlPoints ()
void _registerExternalModules (char **argv)
void _ckModuleInit (void)
void _loadbalancerInit ()
void _metabalancerInit ()
void _taskqInit ()
void LBTopoInit ()
void _initChareTables ()
void init_memcheckpt (char **argv)
void initCharmProjections ()
void CmiInitCPUTopology (char **argv)
void CmiCheckAffinity ()
 Check that there are not multiple PEs assigned to the same core.
void CmiInitMemAffinity (char **argv)
void CmiInitPxshm (char **argv)
void _registerInitCall (CkInitCallFn fn, int isNodeCall)
 CpvCExtern (int, cpdSuspendStartup)
void CpdFreeze (void)
void initQd (char **argv)
void CpdBgInit ()
void CpdBreakPointInit ()
void _sendReadonlies ()
void _initCharm (int unused_argc, char **argv)
 This is the main charm setup routine.
int charm_main (int argc, char **argv)
void FTN_NAME (CHARM_MAIN_FORTRAN_WRAPPER, charm_main_fortran_wrapper)
void registerExitFn (CkExitFn fn)
 CksvExtern (unsigned int, _numInitNodeMsgs)
 CksvExtern (CmiNodeLock, _nodeLock)
 CksvExtern (GroupTable *, _nodeGroupTable)
 CksvExtern (GroupIDTable, _nodeGroupIDTable)
 CksvExtern (CmiImmediateLockType, _nodeGroupTableImmLock)
 CksvExtern (unsigned int, _numNodeGroups)
 CkpvExtern (int, _charmEpoch)
 CkpvExtern (CkGroupID, _currentGroup)
 CkpvExtern (void *, _currentNodeGroupObj)
 CkpvExtern (CkGroupID, _currentGroupRednMgr)
 CkpvExtern (GroupTable *, _groupTable)
 CkpvExtern (GroupIDTable *, _groupIDTable)
 CkpvExtern (CmiImmediateLockType, _groupTableImmLock)
 CkpvExtern (unsigned int, _numGroups)
 CkpvExtern (bool, _destroyingNodeGroup)
 CkpvExtern (char **, Ck_argv)
static IrrGroup_localBranch (CkGroupID gID)
CLINKAGE void CkRegisterMainModule (void)
 This routine registers the user's main module.
void InitCallTable::enumerateInitCalls ()

Variables

UChar _defaultQueueing = CK_QUEUEING_FIFO
UInt _printCS = 0
UInt _printSS = 0
UInt _numExpectInitMsgs = 0
 This value has the number of total initialization message a processor awaits.
UInt _numInitMsgs = 0
 This number is used only by processor zero to count how many messages it will send out for the initialization process.
UInt numZerocopyROops
UInt curROIndex
NcpyROBcastAckInforoBcastAckInfo
int _roRdmaDoneHandlerIdx
int _infoIdx
int _charmHandlerIdx
int _initHandlerIdx
int _roRestartHandlerIdx
int _bocHandlerIdx
int _qdHandlerIdx
int _qdCommHandlerIdx
int _triggerHandlerIdx
bool _mainDone = false
CkOutStream ckout
CkErrStream ckerr
CkInStream ckin
int userDrivenMode
int _libExitHandlerIdx
int _ROGroupRestartHandlerIdx
const char * _shrinkexpand_basedir
int _exitHandlerIdx
static Stats ** _allStats = 0
static bool _exitStarted = false
static int _exitcode
static InitCallTable _initCallTable
static CkFtFn faultFunc = NULL
static char * _restartDir
int teamSize = 1
int chkptPeriod = 1000
bool fastRecovery = false
int parallelRecovery = 1
int BUFFER_TIME
bool killFlag
char * killFile
bool diskCkptFlag
int _defaultObjectQ = 0
bool _ringexit = 0
int _ringtoken = 8
int _messageBufferingThreshold
 Message size above which the runtime will buffer messages directed at unlocated array elements.
static bool _raiseEvac = 0
static char * _raiseEvacFile
bool useNodeBlkMapping
int quietMode
int quietModeRequested
std::set< std::string > _optSet
int messageQueueOverflow
int index_skipCldHandler
CkQ< CkExitFn_CkExitFnVec
int _dummy_dq
void(* CkRegisterMainModuleCallback )()
unsigned int _printCS
unsigned int _printSS
int _infoIdx
int _charmHandlerIdx
int _roRestartHandlerIdx
int _ROGroupRestartHandlerIdx
int _bocHandlerIdx
int _qdHandlerIdx
unsigned int _numInitMsgs
 This number is used only by processor zero to count how many messages it will send out for the initialization process.
FLINKAGE void char ** argv
CkQ< CkExitFn_CkExitFnVec

Detailed Description

Controls the Charm++ startup process.

These are implemented in init.C.

This file runs the entire Charm++ startup process.

The process begins with every processor finishing the Converse startup process and calling _initCharm. This routine runs almost the entire Charm++ setup process. It begins by setting up various Cpvs and subsystems.

The rank 0 processor of each node then does the Charm++ registration, by calling the various _register routines.

Now processor 0:

  1. Creates each mainchare, by allocating the chares and calling their constructors with argc/argv. This typically results in a number of chare/group creations.
  2. Sends off all readonly data to the other processors.
After _initCharm, processor 0 immediately begins work.

The other processors, however, must wait until they recieve the readonly data and all group creations. They do this by setting the _charmHandlerIdx to a special "_bufferHandler" which simply saves all normal messages into a special queue.

As the startup data (readonlies and group creations) streams into _initHandler, it counts messages until it is fully initialized, then calls _initDone to clean out the queues and resume normal operation.

Upon resume of normal operation, the user code is guaranteed that all readonlies (both data and messages) have been set consistently on all processors, and that the constructors for all nodegroups and groups allocated from a mainchare have been called.

It is not guaranteed the order in which (node)groups allocated outside of a mainchare are constructed, nor that the construction will happen before other messages have been delivered by the scheduler.

Even though not exposed to the final users, the creation order of groups and nodegroups allocated in mainchares is deterministic and respects the following points:

This process should not have race conditions, but it can never be excluded...


Typedef Documentation

typedef void(* CkFtFn)(const char *, CkArgMsg *)

Definition at line 210 of file init.C.

typedef struct _statsHeader statsHeader

typedef struct _WarningMsg WarningMsg

typedef void(* CkExitFn)(void)

Definition at line 172 of file init.h.


Function Documentation

void CkRestartMain ( const char *  dirname,
CkArgMsg args 
)

CksvDeclare ( UInt  ,
_numInitNodeMsgs   
)

Count the number of nodegroups that have been created in mainchares.

Since the nodegroup creation is executed by a single processor in a given node, this value must be seen by all processors in a node.

CksvDeclare ( int  ,
_numPendingRORdmaTransfers   
)

CksvDeclare ( bool  ,
_triggersSent   
)

CkpvDeclare ( void *  ,
_currentChare   
)

CkpvDeclare ( int  ,
_currentChareType   
)

CkpvDeclare ( CkGroupID  ,
_currentGroup   
)

CkpvDeclare ( void *  ,
_currentNodeGroupObj   
)

CkpvDeclare ( CkGroupID  ,
_currentGroupRednMgr   
)

CkpvDeclare ( GroupTable ,
_groupTable   
)

CkpvDeclare ( GroupIDTable ,
_groupIDTable   
)

CkpvDeclare ( CmiImmediateLockType  ,
_groupTableImmLock   
)

CkpvDeclare ( UInt  ,
_numGroups   
)

CkpvDeclare ( CkCoreState ,
_coreState   
)

CksvDeclare ( UInt  ,
_numNodeGroups   
)

CksvDeclare ( GroupTable ,
_nodeGroupTable   
)

CksvDeclare ( GroupIDTable  ,
_nodeGroupIDTable   
)

CksvDeclare ( CmiImmediateLockType  ,
_nodeGroupTableImmLock   
)

CksvDeclare ( CmiNodeLock  ,
_nodeLock   
)

CksvStaticDeclare ( PtrVec ,
_nodeBocInitVec   
)

CkpvDeclare ( int  ,
_charmEpoch   
)

CkpvDeclare ( bool  ,
_destroyingNodeGroup   
)

CkpvDeclare ( Stats ,
_myStats   
)

CkpvDeclare ( MsgPool ,
_msgPool   
)

CkpvDeclare ( _CkOutStream ,
_ckout   
)

CkpvDeclare ( _CkErrStream ,
_ckerr   
)

CkpvStaticDeclare ( int  ,
_numInitsRecd   
)

CkpvStaticDeclare ( bool  ,
_initdone   
)

CkpvStaticDeclare ( PtrQ ,
_buffQ   
)

CkpvStaticDeclare ( PtrVec ,
_bocInitVec   
)

void _libExitHandler ( envelope env  ) 

CpvCExtern ( int  ,
interopExitFlag   
)

void StopInteropScheduler (  ) 

Definition at line 53 of file conv-interoperate.C.

Referenced by _initDone(), and StopCharmScheduler().

Here is the caller graph for this function:

CpvExtern ( char *  ,
_validProcessors   
)

CkpvDeclare ( char  ,
startedEvac   
)

void readKillFile (  ) 

void processRaiseEvacFile ( char *  raiseEvacFile  ) 

Definition at line 324 of file ckevacuation.C.

References CcdCallFnAfter(), CkDecideEvacPe(), Converse::CkMyPe(), and evacMsg::pe.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void _registerCommandLineOpt ( const char *  opt  ) 

Definition at line 255 of file init.C.

References _optSet, and Converse::CkMyPe().

Referenced by _metabalancerInit(), LBDatabase::initnodeFn(), DistributedLB::initnodeFn(), and TCharmMain::nodeInit().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _parseCommandLineOpts ( char **  argv  )  [inline, static]

static void _bufferHandler ( void *  msg  )  [static]

Definition at line 418 of file init.C.

References Converse::CkMyPe().

Referenced by _initCharm(), and _initHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _discardHandler ( envelope env  )  [static]

Definition at line 424 of file init.C.

References CkInRestarting(), Converse::CkMyPe(), and CmiFree().

Referenced by _discard_charm_message(), _exitHandler(), and _initDone().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _printStats ( void   )  [inline, static]

Definition at line 437 of file init.C.

References _printCS, _printSS, Converse::CkMyPe(), Converse::CkNumPes(), Stats::combine(), Stats::getCharesCreated(), and Stats::getCharesProcessed().

Referenced by _exitHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* mergeStats ( int size,
void *  data,
void **  remote,
int  count 
) [static]

Definition at line 489 of file init.C.

References _allocEnv(), CmiFree(), EnvToUsr(), envelope::getTotalsize(), _statsHeader::n, and StatMsg.

Referenced by _sendStats().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _sendStats ( void   )  [inline, static]

Definition at line 522 of file init.C.

References _allocEnv(), _exitHandlerIdx, Converse::CkMyPe(), CmiReduce(), EnvToUsr(), envelope::getTotalsize(), mergeStats(), msg, _statsHeader::n, and StatMsg.

Referenced by _exitHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* mergeWarningMsg ( int size,
void *  data,
void **  remote,
int  count 
) [static]

Definition at line 539 of file init.C.

References EnvToUsr(), PUP::m, msg, and _WarningMsg::queue_overflow_count.

Referenced by _sendWarnings().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _sendWarnings ( void   )  [inline, static]

Definition at line 556 of file init.C.

References _allocEnv(), _exitHandlerIdx, Converse::CkMyPe(), CmiReduce(), EnvToUsr(), envelope::getTotalsize(), mergeWarningMsg(), messageQueueOverflow, msg, _WarningMsg::queue_overflow_count, and WarnMsg.

Referenced by _exitHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void ReportWarnings ( WarningMsg msg  )  [inline, static]

Definition at line 571 of file init.C.

References CmiPrintf(), and _WarningMsg::queue_overflow_count.

Referenced by _exitHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

void _messageLoggingExit (  ) 

Function to wrap up performance information.

Definition at line 3698 of file ckcausalmlog.C.

References Converse::CkMyPe(), CmiMyPe(), MLOGFT_totalLogSize, MLOGFT_totalMcastLogSize, MLOGFT_totalMessages, MLOGFT_totalReductionLogSize, numDets, numDupDets, numMsgsTarget, numPiggyDets, sizeMsgsTarget, totalMsgsSize, and totalMsgsTarget.

Referenced by _exitHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

void _skipCldHandler ( void *  converseMsg  ) 

Definition at line 1401 of file ck.C.

References CmiGridQueueLookupMsg(), CqsEnqueueGeneral(), envelope::getPriobits(), envelope::getPrioPtr(), and envelope::getQueueing().

Referenced by _ckModuleInit(), and _resume_charm_message().

Here is the call graph for this function:

Here is the caller graph for this function:

void _discard_charm_message (  ) 

Definition at line 591 of file init.C.

References _charmHandlerIdx, _discardHandler(), and index_skipCldHandler.

Referenced by CkMemCheckPT::isMaster().

Here is the call graph for this function:

Here is the caller graph for this function:

void _resume_charm_message (  ) 

Definition at line 598 of file init.C.

References _charmHandlerIdx, _processHandler(), _skipCldHandler(), and index_skipCldHandler.

Referenced by CkMemCheckPT::isMaster().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _exitHandler ( envelope env  )  [static]

void _ROGroupRestartHandler ( void *  msg  ) 

Definition at line 752 of file init.C.

References CkResumeRestartMain().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _processBufferedBocInits ( void   )  [inline, static]

Create all groups in this processor (not called on processor zero).

Notice that only groups created in mainchares are processed here; groups created later are processed as regular messages.

Definition at line 762 of file init.C.

References _bocHandlerIdx, _inrestart, _processBocInitMsg(), _processHandler(), CkUnpackMessage(), envelope::isPacked(), and len.

Referenced by _initDone().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _processBufferedNodeBocInits ( void   )  [inline, static]

Create all nodegroups in this node (called only by rank zero, and never on node zero).

Notice that only nodegroups created in mainchares are processed here; nodegroups created later are processed as regular messages.

Definition at line 794 of file init.C.

References _processNodeBocInitMsg(), CkUnpackMessage(), envelope::isPacked(), and len.

Referenced by _initDone().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _processBufferedMsgs ( void   )  [inline, static]

Definition at line 809 of file init.C.

References _charmHandlerIdx, _CldEnqueue(), _infoIdx, _processHandler(), envelope::getMsgtype(), envelope::isForAnyPE(), NewChareMsg, and NewVChareMsg.

Referenced by _initCharm(), and _initDone().

Here is the call graph for this function:

Here is the caller graph for this function:

static int _charmLoadEstimator ( void   )  [static]

Definition at line 825 of file init.C.

Referenced by _initCharm().

Here is the caller graph for this function:

static void _sendTriggers ( void   )  [static]

This function is used to send other processors on the same node a signal so they can check if their _initDone can be called: the reason for this is that the check at the end of _initHandler can fail due to a missing message containing a Nodegroup creation.

When that message arrives only one processor will receive it, and thus if no notification is sent to the other processors in the node, they will never proceed.

Definition at line 838 of file init.C.

References _allocEnv(), _triggerHandlerIdx, Converse::CkMyPe(), CmiFree(), CmiNodeFirst(), Converse::CmiSyncSend(), envelope::getTotalsize(), RODataMsg, and envelope::setSrcPe().

Referenced by _initDone().

Here is the call graph for this function:

Here is the caller graph for this function:

void _initDone ( void   ) 

This function (not a handler) is called once and only once per processor.

It signals the processor that the initialization is done and regular messages can be processed.

On processor zero it is called by _initCharm, on all other processors either by _initHandler or _triggerHandler (cannot be both). When fault-tolerance is active, it is called by the fault-tolerance scheme itself.

Definition at line 867 of file init.C.

References _discardHandler(), _processBufferedBocInits(), _processBufferedMsgs(), _processBufferedNodeBocInits(), _sendTriggers(), _triggerHandlerIdx, Converse::CkMyPe(), BGConverse::CkMyRank(), CmiNodeBarrier(), quietMode, StopInteropScheduler(), and userDrivenMode.

Referenced by _recvCheckpointHandler(), _sendReadonlies(), checkForInitDone(), CkRestartMain(), CkResumeRestartMain(), and CkMemCheckPT::isMaster().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _triggerHandler ( envelope env  )  [static]

Converse handler receiving a signal from another processors in the same node.

(On _sendTrigger there is the explanation of why this is necessary) Simply check if with the NodeGroup processed by another processor we reached the expected count. Notice that it can only be called before _initDone: after _initDone, a message destined for this handler will go instead to the _discardHandler.

Definition at line 898 of file init.C.

References checkForInitDone(), and CmiFree().

Referenced by _initCharm(), and _roRestartHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _processROMsgMsg ( envelope env  )  [inline, static]

Definition at line 905 of file init.C.

References _readonlyMsgs, CmiMyRank(), EnvToUsr(), and envelope::getRoIdx().

Referenced by _initHandler(), and _sendReadonlies().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _processRODataMsg ( envelope env  )  [inline, static]

Definition at line 912 of file init.C.

References _readonlyTable, _topoTree, CmiSpanningTreeInfo::child_count, CmiForwardMsgToPeers(), CmiFree(), CmiMyRank(), EnvToUsr(), envelope::getTotalsize(), numZerocopyROops, readonlyAllocateOnSource(), and PUP::t.

Referenced by _initHandler(), and _roRestartHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _roRestartHandler ( void *  msg  )  [static]

This is similar to the _initHandler, only that the Groups and Nodegroups are initialized from disk, so only one single message is expected.

It is unclear how Readonly Messages are treated during restart... (if at all considered)

Definition at line 953 of file init.C.

References _numExpectInitMsgs, _processRODataMsg(), _triggerHandler(), Converse::CkMyPe(), and envelope::getCount().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _roRdmaDoneHandler ( envelope env  )  [static]

void checkForInitDone ( bool  rdmaROCompleted  ) 

Definition at line 1012 of file init.C.

References _initDone(), _numExpectInitMsgs, CmiMyRank(), and numZerocopyROops.

Referenced by _initHandler(), _roRdmaDoneHandler(), _triggerHandler(), readonlyGet(), and readonlyGetCompleted().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _initHandler ( void *  msg,
CkCoreState ck 
) [static]

This handler is used only during initialization.

It receives messages from processor zero regarding Readonly Data (in one single message), Readonly Messages, Groups, and Nodegroups. The Readonly Data message also contains the total number of messages expected during the initialization phase. For Groups and Nodegroups, only messages with epoch=0 (meaning created from within a mainchare) are buffered for special creation, the other messages are buffered together with all the other regular messages by _bufferHandler (and will be flushed after all the initialization messages have been processed).

Definition at line 1035 of file init.C.

References _bufferHandler(), _numExpectInitMsgs, _processRODataMsg(), _processROMsgMsg(), BocInitMsg, checkForInitDone(), Converse::CkMyPe(), CkUnpackMessage(), CmiAbort(), CmiMyPe(), CmiWallTimer(), envelope::getCount(), envelope::getGroupEpoch(), envelope::getGroupNum(), envelope::getMsgtype(), _ckGroupID::idx, envelope::isPacked(), NodeBocInitMsg, RODataMsg, ROMsgMsg, size, and CkCoreState::watcher.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkCleanup ( void   ) 

Definition at line 1087 of file init.C.

References _allocEnv(), _exitHandlerIdx, Converse::CkMyPe(), Converse::CmiSyncSendAndFree(), envelope::getTotalsize(), envelope::setSrcPe(), and StartExitMsg.

Referenced by CentralLB::StartCleanup().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkExit ( int  exitcode  ) 

void CkContinueExit (  ) 

void EmergencyExit ( void   ) 

Definition at line 1134 of file init.C.

Referenced by ConverseCommonExit().

Here is the caller graph for this function:

static void _nullFn ( void *  ,
void *   
) [static]

Definition at line 1144 of file init.C.

References CmiAbort().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void _registerLBDatabase ( void   ) 

Referenced by _initCharm().

Here is the caller graph for this function:

void _registerMetaBalancer ( void   ) 

Referenced by _initCharm().

Here is the caller graph for this function:

void _registerPathHistory ( void   ) 

void _registerControlPoints ( void   ) 

void _registerTraceControlPoints (  ) 

Referenced by traceCommonInit().

Here is the caller graph for this function:

void _registerExternalModules ( char **  argv  ) 

Referenced by _initCharm().

Here is the caller graph for this function:

void _ckModuleInit ( void   ) 

Definition at line 2086 of file ck.C.

References _ObjectQHandler(), _skipCldHandler(), _TokenHandler(), CmiAssignOnce(), index_objectQHandler, index_skipCldHandler, and index_tokenHandler.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void _loadbalancerInit (  ) 

void _metabalancerInit (  ) 

Definition at line 109 of file MetaBalancer.C.

References _nobj_timer, _registerCommandLineOpt(), argv, CkGetArgv(), and CmiGetArgDoubleDesc().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void _taskqInit (  ) 

void LBTopoInit (  ) 

Definition at line 1329 of file topology.C.

References CmiCreateLock(), lbTopoInitialized, and lbTopoMapInitLock.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void _initChareTables (  ) 

Definition at line 45 of file ck.C.

Referenced by _initCharm().

Here is the caller graph for this function:

void init_memcheckpt ( char **  argv  ) 

Referenced by _initCharm(), and CkMemCheckPT::isMaster().

Here is the caller graph for this function:

void initCharmProjections (  ) 

Definition at line 21 of file charmProjections.C.

Referenced by _initCharm().

Here is the caller graph for this function:

void CmiInitCPUTopology ( char **  argv  ) 

Definition at line 704 of file cputopology.C.

Referenced by _initCharm().

Here is the caller graph for this function:

void CmiCheckAffinity ( void   ) 

Check that there are not multiple PEs assigned to the same core.

If a pemap has been computed by this module (or passed by the user) this function will print a warning if oversubscription detected. If no affinity has been set explicitly by this module, it will print error and abort if oversubscription detected.

Definition at line 1060 of file cpuaffinity.C.

References aff_is_set, affMsgsRecvd, CmiAbort(), CmiAlloc(), CmiCpuTopologyEnabled(), CmiDeliverSpecificMsg(), CmiFree(), CmiMyPe(), CmiNumPesOnPhysicalNode(), CmiPhysicalNodeID(), CmiPrintf(), Converse::CmiSyncSendAndFree(), core_usage, cpuPhyNodeAffinityRecvHandlerIdx, get_affinity(), and PUP::m.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiInitMemAffinity ( char **  argv  ) 

Definition at line 241 of file memoryaffinity.C.

References CmiAbort(), CmiGetArgFlagDesc(), CmiGetArgStringDesc(), CmiMyPe(), CmiNodeAllBarrier(), CmiNumNUMANodes(), CmiPrintf(), CmiSetMemAffinity(), free(), getNUMANidByRank(), and malloc().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiInitPxshm ( char **  argv  ) 

void _registerInitCall ( CkInitCallFn  fn,
int  isNodeCall 
)

Definition at line 1178 of file init.C.

References InitCallTable::initNodeCalls, and InitCallTable::initProcCalls.

CpvCExtern ( int  ,
cpdSuspendStartup   
)

void CpdFreeze ( void   ) 

Definition at line 135 of file middle-ccs.C.

void initQd ( char **  argv  ) 

Definition at line 1205 of file init.C.

References _dummy_dq, _qdCommHandler(), _qdCommHandlerIdx, _qdHandler(), _qdHandlerIdx, CmiAssignOnce(), CmiGetArgIntDesc(), CmiMyPe(), CmiMyRank(), CmiPrintf(), and CmiRegisterHandler().

Referenced by _initCharm(), and ConverseCommonInit().

Here is the call graph for this function:

Here is the caller graph for this function:

void CpdBgInit (  ) 

Definition at line 1095 of file debug-charm.C.

References BgProcessMessageFreezeMode(), CcsReleaseMessages(), CdsFifo_Create(), and req_fw_handler().

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void CpdBreakPointInit (  ) 

Definition at line 768 of file debug-charm.C.

References CkHashCompare_int(), CkHashFunction_int(), CkRegisterChare(), CkRegisterChareInCharm(), CkRegisterMsg(), and TypeChare.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:

void _sendReadonlies (  ) 

void _initCharm ( int  unused_argc,
char **  argv 
)

This is the main charm setup routine.

It's called on all processors after Converse initialization. This routine gets passed to Converse from "main.C".

The main purpose of this routine is to set up the objects and Ckpv's used during a regular Charm run. See the comment at the top of the file for overall flow.

Definition at line 1304 of file init.C.

References CkIndex_Group::__idx, _bocHandlerIdx, _bufferHandler(), _chareTable, _charmHandlerIdx, _charmLoadEstimator(), _ckAckEvac(), _ckAckEvacIdx, _ckEvacBcast(), _ckEvacBcastIdx, _ckModuleInit(), _Cmi_forceSpinOnIdle, _Cmi_sleepOnIdle, _entryTable, _exitHandler(), _exitHandlerIdx, _futuresModuleInit(), _infoFn(), _infoIdx, _initChareTables(), _initHandler(), _initHandlerIdx, _libExitHandler(), _libExitHandlerIdx, _loadbalancerInit(), _mainDone, _mainTable, _messageLoggingInit(), _metabalancerInit(), _nullFn(), _offsets, _optSet, _parseCommandLineOpts(), _processBufferedMsgs(), _processHandler(), _raiseEvac, _raiseEvacFile, _registerCkArray(), _registerCkCallback(), _registerDone(), _registerExternalModules(), _registerInit(), _registerLBDatabase(), _registerMetaBalancer(), _replaySystem, _restartDir, _ROGroupRestartHandler(), _ROGroupRestartHandlerIdx, _roRdmaDoneHandler(), _roRdmaDoneHandlerIdx, _roRestartHandler(), _roRestartHandlerIdx, _sendReadonlies(), _topoTree, _triggerHandler(), _triggerHandlerIdx, argc, CkArgMsg::argc, CkArgMsg::argv, BGConverse::BgNodeRank(), CcdCallOnCondition(), CkAllocMsg(), CkCallbackInit(), CkDecideEvacPe(), CkFreeMsg(), CkMessageWatcherInit(), CkMlogRestart(), Converse::CkMyPe(), BGConverse::CkMyRank(), Converse::CkNumPes(), CkRdmaDirectAckHandler(), CkRdmaEMAckHandler(), CkRdmaEMBcastAckHandler(), CkRdmaEMBcastPostAckHandler(), CkRegisterChare(), CkRegisterChareInCharm(), CkRegisterEp(), CkRegisterMainModule(), CkRegisterMainModuleCallback, CkRegisterMsg(), CkRestartMain(), CldRegisterEstimator(), CldRegisterInfoFn(), CmiAbort(), CmiArgGroup(), CmiAssignOnce(), CmiBarrier(), CmiCheckAffinity(), CmiCpuTopologyEnabled(), CmiCreateLock(), CmiGetArgc(), CmiGetArgStringDesc(), CmiGetPesOnPhysicalNode(), CmiInitCPUAffinity(), CmiInitCPUTopology(), CmiInitMemAffinity(), CmiInitPxshm(), CmiLock(), CmiMyPe(), CmiMyRank(), CmiNodeAllBarrier(), CmiNodeBarrier(), CmiNumCores(), CmiPrintf(), CmiSetDirectNcpyAckHandler(), CmiSetEMNcpyAckHandler(), CmiUnlock(), CmiWallTimer(), count, CpdBgInit(), CpdBreakPointInit(), CpdFinishInitialization(), CpdFreeze(), InitCallTable::enumerateInitCalls(), evacuate, faultFunc, init_memcheckpt(), initCharmProjections(), initQd(), killFlag, LBTopoInit(), malloc(), memCriticalEntries, msg, numMemCriticalEntries, processRaiseEvacFile(), quietMode, quietModeRequested, readKillFile(), SDAG::registerPUPables(), size, ST_RecursivePartition_getTreeInfo(), TopoManager_init(), TopoManager_printAllocation(), TopoManager_reset(), traceCharmInit(), TypeChare, TypeGroup, and userDrivenMode.

Referenced by charm_main(), CharmBeginInit(), CharmLibInit(), StartCharmExt(), and TCHARM_Init().

Here is the caller graph for this function:

CLINKAGE int charm_main ( int  argc,
char **  argv 
)

Definition at line 1838 of file init.C.

References _initCharm(), ConverseInit(), and memory_stack_top.

Referenced by FTN_NAME(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

FLINKAGE void FTN_NAME ( CHARM_MAIN_FORTRAN_WRAPPER  ,
charm_main_fortran_wrapper   
)

Definition at line 1848 of file init.C.

References argc, argv, and charm_main().

Here is the call graph for this function:

void registerExitFn ( CkExitFn  fn  ) 

Definition at line 1857 of file init.C.

References CkQ< T >::enq().

Referenced by controlPointInitNode(), initTraceProjectionsBOC(), initTraceSimpleBOC(), initTraceSummaryBOC(), and initTraceTauBOC().

Here is the call graph for this function:

Here is the caller graph for this function:

CksvExtern ( unsigned  int,
_numInitNodeMsgs   
)

CksvExtern ( CmiNodeLock  ,
_nodeLock   
)

CksvExtern ( GroupTable ,
_nodeGroupTable   
)

CksvExtern ( GroupIDTable  ,
_nodeGroupIDTable   
)

CksvExtern ( CmiImmediateLockType  ,
_nodeGroupTableImmLock   
)

CksvExtern ( unsigned  int,
_numNodeGroups   
)

CkpvExtern ( int  ,
_charmEpoch   
)

CkpvExtern ( CkGroupID  ,
_currentGroup   
)

CkpvExtern ( void *  ,
_currentNodeGroupObj   
)

CkpvExtern ( CkGroupID  ,
_currentGroupRednMgr   
)

CkpvExtern ( GroupTable ,
_groupTable   
)

CkpvExtern ( GroupIDTable ,
_groupIDTable   
)

CkpvExtern ( CmiImmediateLockType  ,
_groupTableImmLock   
)

CkpvExtern ( unsigned  int,
_numGroups   
)

CkpvExtern ( bool  ,
_destroyingNodeGroup   
)

CkpvExtern ( char **  ,
Ck_argv   
)

static IrrGroup* _localBranch ( CkGroupID  gID  )  [inline, static]

Definition at line 155 of file init.h.

Referenced by CpdPythonGroup::buildIterator(), CkArray::ckDestroy(), CkFindObjectPtr(), CkLocalBranch(), CkSendMsgArray(), CkSendMsgArrayInline(), and CkSendMsgBranchInline().

Here is the caller graph for this function:

CLINKAGE void CkRegisterMainModule ( void   ) 

This routine registers the user's main module.

It is normally generated by the translator, but for FEM and AMPI may actually be the "fallback" version in compat_regmm.c.

Definition at line 2 of file compat_regmm.c.

Referenced by _initCharm().

Here is the caller graph for this function:

void InitCallTable::enumerateInitCalls (  )  [inherited]

Definition at line 1184 of file init.C.

References BGConverse::BgNodeRank(), BGConverse::CkMyRank(), CmiNodeAllBarrier(), InitCallTable::initNodeCalls, and InitCallTable::initProcCalls.

Referenced by _initCharm().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

UChar _defaultQueueing = CK_QUEUEING_FIFO

Definition at line 91 of file init.C.

Referenced by _parseCommandLineOpts(), and CkAllocMsg().

Definition at line 93 of file init.C.

Referenced by _parseCommandLineOpts(), and _printStats().

Definition at line 94 of file init.C.

Referenced by _parseCommandLineOpts(), and _printStats().

This value has the number of total initialization message a processor awaits.

It is received on nodes other than zero together with the ROData message. Even though it is shared by all processors it is ok: it doesn't matter when and by who it is set, provided that it becomes equal to the number of awaited messages (which is always at least one ---the readonly data message).

Definition at line 103 of file init.C.

Referenced by _initHandler(), _roRestartHandler(), and checkForInitDone().

This number is used only by processor zero to count how many messages it will send out for the initialization process.

After the readonly data message is sent (containing this counter), its value becomes irrelevant.

Definition at line 109 of file init.C.

Referenced by _createGroup(), _createNodeGroup(), _sendReadonlies(), and bdcastRO().

Definition at line 119 of file init.C.

Referenced by _sendReadonlies(), and readonlyCreateOnSource().

Definition at line 120 of file init.C.

Definition at line 121 of file init.C.

Referenced by _initCharm(), _roRdmaDoneHandler(), readonlyGet(), and readonlyGetCompleted().

Definition at line 127 of file init.C.

Referenced by _initCharm(), and _sendReadonlies().

Definition at line 128 of file init.C.

Referenced by _initCharm(), and bdcastRO().

Definition at line 130 of file init.C.

Referenced by CkStartQD(), initQd(), and QdState::propagate().

Definition at line 131 of file init.C.

Referenced by initQd(), and QdState::sendCount().

Definition at line 132 of file init.C.

Referenced by _initCharm(), _initDone(), and _sendTriggers().

bool _mainDone = false

Definition at line 138 of file init.C.

Definition at line 9 of file mpi-interoperate.C.

Referenced by _initCharm(), and LibCkExit().

Definition at line 183 of file init.C.

Referenced by _initCharm(), and bdcastROGroupData().

const char* _shrinkexpand_basedir

Definition at line 184 of file init.C.

Referenced by _parseCommandLineOpts(), and CentralLB::CheckForRealloc().

Stats** _allStats = 0 [static]

Definition at line 195 of file init.C.

bool _exitStarted = false [static]

Definition at line 197 of file init.C.

Referenced by _exitHandler().

int _exitcode [static]

Definition at line 198 of file init.C.

Referenced by _exitHandler(), arg_init(), CkExit(), CommunicationServer(), and ConverseExit().

Definition at line 200 of file init.C.

CkFtFn faultFunc = NULL [static]

Definition at line 211 of file init.C.

Referenced by _initCharm(), and _parseCommandLineOpts().

char* _restartDir [static]

Definition at line 212 of file init.C.

Referenced by _initCharm(), and _parseCommandLineOpts().

int chkptPeriod = 1000

bool fastRecovery = false

Definition at line 218 of file init.C.

Referenced by _parseCommandLineOpts(), and ElementDistributor::addLocation().

Definition at line 82 of file ckcausalmlog.C.

Referenced by _initCharm(), and _parseCommandLineOpts().

char* killFile

Todo:
the following declarations should be moved into a separate file for all

Definition at line 80 of file ckcausalmlog.C.

Referenced by _parseCommandLineOpts(), CkMemCheckPT::isMaster(), and readKillFile().

Definition at line 233 of file init.C.

Referenced by _parseCommandLineOpts(), and Chare::Chare().

Definition at line 234 of file init.C.

Referenced by _exitHandler(), _libExitHandler(), and _parseCommandLineOpts().

Definition at line 235 of file init.C.

Referenced by _exitHandler(), _libExitHandler(), and _parseCommandLineOpts().

Message size above which the runtime will buffer messages directed at unlocated array elements.

Definition at line 76 of file cklocation.C.

Referenced by _parseCommandLineOpts(), and CkLocMgr::deliverUnknown().

bool _raiseEvac = 0 [static]

Definition at line 239 of file init.C.

Referenced by _initCharm(), and _parseCommandLineOpts().

char* _raiseEvacFile [static]

Definition at line 240 of file init.C.

Referenced by _initCharm(), and _parseCommandLineOpts().

Definition at line 72 of file cklocation.C.

Referenced by _parseCommandLineOpts(), and DefaultArrayMap::procNum().

Definition at line 3770 of file convcore.C.

Referenced by _initCharm(), _initDone(), ConverseExit(), ConverseInit(), and SendMsgBuf().

std::set<std::string> _optSet

Definition at line 254 of file init.C.

Referenced by _initCharm(), and _registerCommandLineOpt().

Definition at line 287 of file convcore.C.

Referenced by _sendWarnings().

Definition at line 1097 of file init.C.

Referenced by _exitHandler().

Definition at line 56 of file qd.C.

Referenced by _qdHandler(), initQd(), and QdState::sendCount().

unsigned int _printCS

Definition at line 93 of file init.C.

Referenced by _parseCommandLineOpts(), and _printStats().

unsigned int _printSS

Definition at line 94 of file init.C.

Referenced by _parseCommandLineOpts(), and _printStats().

Definition at line 128 of file init.C.

Referenced by _initCharm(), and bdcastRO().

Definition at line 183 of file init.C.

Referenced by _initCharm(), and bdcastROGroupData().

Definition at line 130 of file init.C.

Referenced by CkStartQD(), initQd(), and QdState::propagate().

unsigned int _numInitMsgs

This number is used only by processor zero to count how many messages it will send out for the initialization process.

After the readonly data message is sent (containing this counter), its value becomes irrelevant.

Definition at line 109 of file init.C.

Referenced by _createGroup(), _createNodeGroup(), _sendReadonlies(), and bdcastRO().

FLINKAGE void char** argv

Definition at line 1097 of file init.C.

Referenced by _exitHandler().


Generated on Mon Sep 21 08:16:54 2020 for Charm++ by  doxygen 1.5.5