PPL Logo

ck-core/charm.h File Reference

Charm Kernel--the groups and chares level of Charm++. More...

Go to the source code of this file.

Data Structures

struct  GroupDepNum
struct  CkChareID
struct  _ckGroupID
struct  _ckSemaID

Typedefs

typedef void *(* CkPackFnPtr )(void *msg)
 Message pack function: convert a message into a buffer.
typedef void *(* CkUnpackFnPtr )(void *buf)
 Message unpack function: convert a buffer into a message.
typedef void(* CkDeallocFnPtr )(void *msg)
 Message dealloc function: deletes a message.
typedef void(* CkCallFnPtr )(void *msg, void *obj)
 A "call function" to invoke a method on an object.
typedef void(* CkPupReadonlyFnPtr )(void *pup_er)
 This function pup's a global variable.
typedef int(* CkMarshallUnpackFn )(char *marshall_buf, void *object)
 A "marshall unpack" function: pups out parameters and calls a method.
typedef void(* CkMessagePupFn )(PUP::er &p, void *userMessage)
 A "message pup" function: pups message data for debugger display.
typedef struct _ckGroupID CkGroupID
typedef CkGroupID CkNodeGroupID
typedef struct envelope envelope
typedef struct _ckSemaID CkSemaID

Enumerations

enum  ChareType {
  TypeInvalid = 0, TypeChare, TypeMainChare, TypeGroup,
  TypeNodeGroup, TypeArray, TypeSection, TypeInvalid = 0,
  TypeChare, TypeMainChare, TypeGroup, TypeNodeGroup,
  TypeArray
}
 type of a chare More...
enum  ChareType {
  TypeInvalid = 0, TypeChare, TypeMainChare, TypeGroup,
  TypeNodeGroup, TypeArray, TypeSection, TypeInvalid = 0,
  TypeChare, TypeMainChare, TypeGroup, TypeNodeGroup,
  TypeArray
}
enum  CkEnvelopeType {
  NewChareMsg = 1, NewVChareMsg = 2, BocInitMsg = 3, ForChareMsg = 4,
  ForBocMsg = 5, ForVidMsg = 6, FillVidMsg = 7, DeleteVidMsg = 8,
  RODataMsg = 9, ROMsgMsg = 10, ROPeerCompletionMsg = 11, ROChildCompletionMsg = 12,
  StartExitMsg = 13, ExitMsg = 14, ReqStatMsg = 15, StatMsg = 16,
  StatDoneMsg = 17, NodeBocInitMsg = 18, ForNodeBocMsg = 19, ArrayEltInitMsg = 20,
  ForArrayEltMsg = 21, ForIDedObjMsg = 22, WarnMsg = 23, WarnDoneMsg = 24,
  LAST_CK_ENVELOPE_TYPE
}

Functions

void realCkExit (int exitcode)
void CkCleanup (void)
char ** CkGetArgv (void)
int CkGetArgc (void)
void * CkAllocSysMsg (const CkEntryOptions *opts=NULL)
void * CkAllocMsg (int msgIdx, int msgBytes, int prioBits, GroupDepNum groupDepNum=GroupDepNum{})
void CkFreeSysMsg (void *msg)
void * CkAllocBuffer (void *msg, int bufsize)
void CkFreeMsg (void *msg)
void * CkCopyMsg (void **pMsg)
void CkSetQueueing (void *msg, int strategy)
void * CkPriorityPtr (void *msg)
void registerCkRegisterMainModuleCallback (void(*cb)(void))
void registerMainchareCtorExtCallback (void(*cb)(int, void *, int, int, char **))
void registerReadOnlyRecvExtCallback (void(*cb)(int, char *))
void registerChareMsgRecvExtCallback (void(*cb)(int, void *, int, int, char *, int))
void registerGroupMsgRecvExtCallback (void(*cb)(int, int, int, char *, int))
void registerArrayMsgRecvExtCallback (void(*cb)(int, int, int *, int, int, char *, int))
void registerArrayElemLeaveExtCallback (int(*cb)(int, int, int *, char **, int))
void registerArrayElemJoinExtCallback (void(*cb)(int, int, int *, int, char *, int))
void registerArrayResumeFromSyncExtCallback (void(*cb)(int, int, int *))
void registerArrayMapProcNumExtCallback (int(*cb)(int, int, const int *))
void StartCharmExt (int argc, char **argv)
int CkMyPeHook (void)
int CkNumPesHook (void)
int CkGroupGetReductionNumber (int gid)
 Get current redNo of specified group instance on this PE.
int CkArrayGetReductionNumber (int aid, int ndims, int *index)
 Get current redNo of specified array element on this PE.
void registerCreateReductionTargetMsgExtCallback (void(*cb)(void *, int, int, int, char **, int *))
void registerPyReductionExtCallback (int(*cb)(char **, int *, int, char **))
int CkRegisterMsg (const char *name, CkPackFnPtr pack, CkUnpackFnPtr unpack, CkDeallocFnPtr dealloc, size_t size)
 Register this message name, with this basic size and pack and unpack functions.
int CkRegisterEp (const char *name, CkCallFnPtr call, int msgIdx, int chareIdx, int ck_ep_flags)
 Register this entry point, with this call function and flags.
int CkRegisterEpTemplated (const char *name, CkCallFnPtr call, int msgIdx, int chareIdx, int ck_ep_flags)
int CkRegisterChare (const char *name, size_t dataSz, ChareType chareType)
 Register this type of chare (group, or array), with this size.
void CkRegisterArrayDimensions (int chareIndex, int ndims)
 Register number of array dimensions for this chare array.
void CkRegisterChareInCharm (int chareIndex)
 Register this chare as internal to Charm++.
int CkRegisterMainChare (int chareIndex, int epIndex)
 Register this chare as a mainchare, with this entry point as its constructor.
void CkRegisterMainChareExt (const char *s, int numEntryMethods, int *chareIdx, int *startEpIdx)
void CkRegisterDefaultCtor (int chareIndex, int ctorEpIndex)
 Register a default constructor for this chare.
void CkRegisterMigCtor (int chareIndex, int ctorEpIndex)
 Register a migration constructor for this chare.
void CkRegisterGroupIrr (int chareIndex, int isIrr)
 Indicate whether this group is an IrrGroup.
void CkRegisterGroupExt (const char *s, int numEntryMethods, int *chareIdx, int *startEpIdx)
void CkRegisterArrayMapExt (const char *s, int numEntryMethods, int *chareIdx, int *startEpIdx)
void CkRegisterArrayExt (const char *s, int numEntryMethods, int *chareIdx, int *startEpIdx)
void CkRegisterBase (int derivedIdx, int baseIdx)
 Register the chare baseIdx as a base class of the chare derivedIdx.
void CkRegisterReadonly (const char *name, const char *type, size_t size, void *ptr, CkPupReadonlyFnPtr pup_fn)
 Register this readonly global variable.
void CkRegisterReadonlyExt (const char *name, const char *type, size_t msgSize, char *msg)
void CkRegisterReadonlyMsg (const char *name, const char *type, void **pMsg)
 Register this readonly message.
void CkRegisterMarshallUnpackFn (int epIndex, CkMarshallUnpackFn m)
 Register this marshall unpack function with this entry point.
CkMarshallUnpackFn CkLookupMarshallUnpackFn (int epIndex)
 Lookup the marshall unpack function, if any, for this entry point.
void CkRegisterMessagePupFn (int epIndex, CkMessagePupFn m)
 Register this message pup function with this entry point.
void CkCreateChare (int chareIdx, int constructorIdx, void *msg, CkChareID *vid, int destPE)
CkGroupID CkCreateGroup (int chareIdx, int constructorIdx, void *msg)
CkGroupID CkCreateNodeGroup (int chareIdx, int constructorIdx, void *msg)
void CkCreateLocalGroup (CkGroupID groupID, int constructorIdx, envelope *env)
void CkCreateLocalNodeGroup (CkGroupID groupID, int constructorIdx, envelope *env)
int CkCreateGroupExt (int cIdx, int eIdx, int num_bufs, char **bufs, int *buf_sizes)
int CkCreateArrayExt (int cIdx, int ndims, int *dims, int eIdx, int num_bufs, char **bufs, int *buf_sizes, int map_gid, char useAtSync)
void CkInsertArrayExt (int aid, int ndims, int *index, int epIdx, int onPE, int num_bufs, char **bufs, int *buf_sizes, char useAtSync)
void CkArrayDoneInsertingExt (int aid)
void CkMigrateExt (int aid, int ndims, int *index, int toPe)
void CkSendMsg (int entryIndex, void *msg, const CkChareID *chare, int opts CK_MSGOPTIONAL)
void CkSendMsgBranch (int eIdx, void *msg, int destPE, CkGroupID gID, int opts CK_MSGOPTIONAL)
void CkSendMsgInline (int entryIndex, void *msg, const CkChareID *chare, int opts CK_MSGOPTIONAL)
void CkSendMsgBranchInline (int eIdx, void *msg, int destPE, CkGroupID gID, int opts CK_MSGOPTIONAL)
void CkSendMsgBranchMulti (int eIdx, void *msg, CkGroupID gID, int npes, const int *pes, int opts CK_MSGOPTIONAL)
void CkSendMsgBranchGroup (int eIdx, void *msg, CkGroupID gID, CmiGroup grp, int opts CK_MSGOPTIONAL)
void CkSendMsgNodeBranch (int eIdx, void *msg, int destNode, CkGroupID gID, int opts CK_MSGOPTIONAL)
void CkSendMsgNodeBranchInline (int eIdx, void *msg, int destNode, CkGroupID gID, int opts CK_MSGOPTIONAL)
void CkSendMsgNodeBranchMulti (int eIdx, void *msg, CkGroupID gID, int npes, const int *nodes, int opts CK_MSGOPTIONAL)
void CkBroadcastMsgBranch (int eIdx, void *msg, CkGroupID gID, int opts CK_MSGOPTIONAL)
void CkBroadcastMsgNodeBranch (int eIdx, void *msg, CkGroupID gID, int opts CK_MSGOPTIONAL)
int CkChareMsgPrep (int eIdx, void *msg, const CkChareID *pCid)
void CkGroupMsgPrep (int eIdx, void *msg, CkGroupID gID)
void CkNodeGroupMsgPrep (int eIdx, void *msg, CkGroupID gID)
void CkSetRefNum (void *msg, CMK_REFNUM_TYPE ref)
CMK_REFNUM_TYPE CkGetRefNum (void *msg)
int CkGetSrcPe (void *msg)
int CkGetSrcNode (void *msg)
void CkDeliverMessageFree (int epIdx, void *msg, void *object)
void CkDeliverMessageReadonly (int epIdx, const void *msg, void *object)
void * CkLocalBranch (CkGroupID gID)
void * CkLocalNodeBranch (CkGroupID gID)
void * CkLocalChare (const CkChareID *chare)
void CkArrayManagerDeliver (int onPe, void *msg, int opts CK_MSGOPTIONAL)
void CkChareExtSend (int onPE, void *objPtr, int epIdx, char *msg, int msgSize)
 Send msg to chare with ID (onPe,objPtr) to entry method 'epIdx'.
void CkChareExtSend_multi (int onPE, void *objPtr, int epIdx, int num_bufs, char **bufs, int *buf_sizes)
 Send msg to chare copying data into CkMessage from multiple input buffers.
void CkGroupExtSend (int gid, int pe, int epIdx, char *msg, int msgSize)
 Send msg to group with ID 'gid'.
void CkGroupExtSend_multi (int gid, int pe, int epIdx, int num_bufs, char **bufs, int *buf_sizes)
 Send msg to group copying data into CkMessage from multiple input buffers.
void CkArrayExtSend (int aid, int *idx, int ndims, int epIdx, char *msg, int msgSize)
 Send msg to array with ID 'aid'.
void CkArrayExtSend_multi (int aid, int *idx, int ndims, int epIdx, int num_bufs, char **bufs, int *buf_sizes)
 Send msg to array copying data into CkMessage from multiple input buffers.
CkSemaID CkSemaCreate (void)
void * CkSemaWait (CkSemaID id)
void CkSemaWaitN (CkSemaID id, int n, void *marray[])
void CkSemaSignal (CkSemaID id, void *m)
void CkSemaDestroy (CkSemaID id)
void CkStartQD (int eIdx, const CkChareID *chare)
 When quiescence occurs, send a message to this entry point of this Chare.
void CkWaitQD (void)
 Block until quiescence occurs.
int CkMessageToEpIdx (void *msg)
void CkPrintEntryMethod (int epIdx)
void CkPrintChareName (int chareIdx)
void CkSummary_MarkEvent (int)
 function call for adding an event mark
void CkSummary_StartPhase (int)
 function call for starting a phase in trace summary logs
int CkDisableTracing (int epIdx)
void CkEnableTracing (int epIdx)


Detailed Description

Charm Kernel--the groups and chares level of Charm++.

Definition in file charm.h.


Typedef Documentation

typedef struct _ckSemaID CkSemaID


Function Documentation

void realCkExit ( int  exitcode  ) 

char** CkGetArgv ( void   ) 

int CkGetArgc ( void   ) 

Definition at line 552 of file ck.C.

References CmiGetArgc().

Referenced by AMPI_Get_argc(), armciLibStart(), FTN_NAME(), and PUPfunctionpointer().

Here is the call graph for this function:

Here is the caller graph for this function:

void* CkAllocSysMsg ( const CkEntryOptions *  opts = NULL  ) 

void* CkAllocMsg ( int  msgIdx,
int  msgBytes,
int  prioBits 
)

void CkFreeSysMsg ( void *  msg  ) 

Definition at line 30 of file msgalloc.C.

Referenced by ArrayElemExt::__AtSyncEntryMethod(), CkPupChareData(), and migrationDone().

Here is the caller graph for this function:

void* CkAllocBuffer ( void *  msg,
int  bufsize 
)

void CkFreeMsg ( void *  msg  ) 

Definition at line 63 of file msgalloc.C.

References CmiFree(), and UsrToEnv().

Referenced by _handlePhase0(), _handlePhase1(), _handlePhase2(), _initCharm(), _processHandler(), LBgroup::balance(), PVT::beginCheckpoint(), PVT::beginLoadbalancing(), edge::buildLockingCloud(), sim::Cancel(), elemRef::checkIfLongEdge(), sim::CheckpointStep(), chunk::chunk(), CkCallbackSendExt(), CkSendAsyncCreateArray(), CkWaitVoidFuture(), GVT::computeGVT(), EventMsgPool::EventMsgPool(), chunk::findRemoteNeighbor(), element::flip23remote(), element::flip32remote(), edge::flipPrevent(), edgeRef::flipPrevent(), nodeRef::get(), elemRef::getArea(), edgeRef::getBoundary(), edgeRef::getNbr(), element::getNeighbor(), elemRef::getVolume(), chunk::getVolume(), elemRef::hasDependent(), CkMemCheckPT::isMaster(), edgeRef::isPending(), chunk::LEsplit(), edgeRef::lock(), chunk::lockArc(), edgeRef::locked(), element::lockLF(), chunk::newMesh(), prioMsg::operator delete(), cancelMsg::operator delete(), eventMsg::operator delete(), Stats::operator delete(), CkMessage::operator delete(), CkArrayMessage::operator delete(), CkQdMsg::operator delete(), ConfigurableRRMap::populateInitial(), CldMap::populateInitial(), BlockMap::populateInitial(), CkArrayMap::populateInitial(), LBstrategy::recvLoadReport(), element::refineCP(), element::refineLE(), element::refineLF(), chunk::relocationVote(), element::remove32element(), chunk::removeElement(), chunk::removeNode(), PVT::reportReduce(), chunk::resetTargetVolume(), PVT::resumeAfterCheckpoint(), PVT::resumeAfterLB(), CkCallback::send(), PVT::setGVT(), chunk::setTargetVolume(), edge::split(), edgeRef::split(), sim::Step(), ChildInitMsg::unpack(), NeighborMsg::unpack(), chunk::updateNodeCoord(), chunk::updateNodeCoords(), CkCallbackResumeThread::~CkCallbackResumeThread(), and CkMarshalledMessage::~CkMarshalledMessage().

Here is the call graph for this function:

void* CkCopyMsg ( void **  pMsg  ) 

void CkSetQueueing ( void *  msg,
int  strategy 
)

void* CkPriorityPtr ( void *  msg  ) 

void registerCkRegisterMainModuleCallback ( void(*)(void)  cb  ) 

void registerMainchareCtorExtCallback ( void(*)(int, void *, int, int, char **)  cb  ) 

Definition at line 2228 of file ck.C.

References cb, and MainchareCtorExtCallback.

void registerReadOnlyRecvExtCallback ( void(*)(int, char *)  cb  ) 

Definition at line 2233 of file ck.C.

References cb, and ReadOnlyRecvExtCallback.

void registerChareMsgRecvExtCallback ( void(*)(int, void *, int, int, char *, int cb  ) 

Definition at line 2241 of file ck.C.

References cb, and ChareMsgRecvExtCallback.

void registerGroupMsgRecvExtCallback ( void(*)(int, int, int, char *, int cb  ) 

Definition at line 2246 of file ck.C.

References cb, and GroupMsgRecvExtCallback.

void registerArrayMsgRecvExtCallback ( void(*)(int, int, int *, int, int, char *, int cb  ) 

Definition at line 2251 of file ck.C.

References ArrayMsgRecvExtCallback, and cb.

void registerArrayElemLeaveExtCallback ( int(*)(int, int, int *, char **, int cb  ) 

Definition at line 2256 of file ck.C.

References ArrayElemLeaveExt, and cb.

void registerArrayElemJoinExtCallback ( void(*)(int, int, int *, int, char *, int cb  ) 

Definition at line 2261 of file ck.C.

References ArrayElemJoinExt, and cb.

void registerArrayResumeFromSyncExtCallback ( void(*)(int, int, int *)  cb  ) 

Definition at line 2266 of file ck.C.

References ArrayResumeFromSyncExtCallback, and cb.

void registerArrayMapProcNumExtCallback ( int(*)(int, int, const int *)  cb  ) 

Definition at line 2281 of file ck.C.

References ArrayMapProcNumExtCallback, and cb.

void StartCharmExt ( int  argc,
char **  argv 
)

Definition at line 2198 of file ck.C.

References _initCharm(), ConverseInit(), data, ext_args, ext_argv, fd, and Ck::IO::open().

Here is the call graph for this function:

int CkMyPeHook ( void   ) 

Definition at line 2285 of file ck.C.

References Converse::CkMyPe().

Here is the call graph for this function:

int CkNumPesHook ( void   ) 

Definition at line 2286 of file ck.C.

References Converse::CkNumPes().

Here is the call graph for this function:

int CkGroupGetReductionNumber ( int  gid  ) 

Get current redNo of specified group instance on this PE.

Definition at line 2434 of file ck.C.

References CkLocalBranch(), and _ckGroupID::idx.

Here is the call graph for this function:

int CkArrayGetReductionNumber ( int  aid,
int  ndims,
int index 
)

Get current redNo of specified array element on this PE.

Definition at line 2440 of file ck.C.

References ArrayElement::getRedNo(), and _ckGroupID::idx.

Here is the call graph for this function:

void registerCreateReductionTargetMsgExtCallback ( void(*)(void *, int, int, int, char **, int *)  cb  ) 

Definition at line 2271 of file ck.C.

References cb, and CreateReductionTargetMsgExt.

void registerPyReductionExtCallback ( int(*)(char **, int *, int, char **)  cb  ) 

Definition at line 2276 of file ck.C.

References cb, and PyReductionExt.

int CkMessageToEpIdx ( void *  msg  ) 

Definition at line 3092 of file ck.C.

References envelope::getEpIdx(), envelope::getsetArrayBcastEp(), and UsrToEnv().

Referenced by _call_freeze_on_break_point(), and CpdPupMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkPrintEntryMethod ( int  epIdx  ) 

Definition at line 313 of file register.C.

References EntryInfo::chareIdx, CkPrintChareName(), EntryInfo::name, and CkRegisteredInfo< T >::size().

Here is the call graph for this function:

void CkPrintChareName ( int  chareIdx  ) 

Definition at line 324 of file register.C.

References c, ChareInfo::name, and CkRegisteredInfo< T >::size().

Referenced by CkPrintEntryMethod().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkDisableTracing ( int  epIdx  ) 

Definition at line 232 of file register.C.

References _smp_mutex, CmiLock(), and CmiUnlock().

Referenced by _ckArrayInit(), and CkSendMsgArrayInline().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkEnableTracing ( int  epIdx  ) 

Definition at line 240 of file register.C.

References _smp_mutex, CmiLock(), and CmiUnlock().

Referenced by CkSendMsgArrayInline().

Here is the call graph for this function:

Here is the caller graph for this function:


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