Data Structures | |
struct | CkChareID |
struct | _ckGroupID |
Typedefs | |
typedef struct _ckGroupID | CkGroupID |
typedef CkGroupID | CkNodeGroupID |
typedef struct envelope | envelope |
Enumerations | |
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 | 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. |
These routines implement a basic remote-method-invocation system consisting of chares and groups.
These routines are implemented in ck.C.
There is no migration. All the bindings are written to the C language, although most clients, including the rest of Charm++, are actually C++.
typedef struct _ckGroupID CkGroupID |
typedef CkGroupID CkNodeGroupID |
enum CkEnvelopeType |
Definition at line 644 of file ck.C.
References _charmHandlerIdx, _CldEnqueue(), _entryTable, _infoIdx, Converse::CkMyPe(), idx, NewChareMsg, NewVChareMsg, CkChareID::objPtr, CkChareID::onPE, envelope::setByPe(), envelope::setEpIdx(), envelope::setForAnyPE(), envelope::setMsgtype(), envelope::setSrcPe(), envelope::setVidPtr(), and UsrToEnv().
Definition at line 863 of file ck.C.
References _entryTable, _groupCreate(), BocInitMsg, Converse::CkMyPe(), Converse::CkNumPes(), envelope::setEpIdx(), envelope::setMsgtype(), envelope::setSrcPe(), and UsrToEnv().
Referenced by CkCreateGroupExt().
Definition at line 876 of file ck.C.
References _entryTable, _nodeGroupCreate(), Converse::CkMyPe(), BGConverse::CkNumNodes(), NodeBocInitMsg, envelope::setEpIdx(), envelope::setMsgtype(), envelope::setSrcPe(), and UsrToEnv().
Definition at line 681 of file ck.C.
Referenced by _createGroup(), _processBocInitMsg(), CkPupGroupData(), and CkPupPerPlaceData().
Definition at line 724 of file ck.C.
Referenced by _createNodeGroup(), _processNodeBocInitMsg(), and CkPupNodeGroupData().
Definition at line 2349 of file ck.C.
References BocInitMsg, CkAllocateMarshallMsg(), CkCreateGroup(), _ckGroupID::idx, CkMarshallMsg::msgBuf, envelope::setMsgtype(), and UsrToEnv().
int CkCreateArrayExt | ( | int | cIdx, | |
int | ndims, | |||
int * | dims, | |||
int | eIdx, | |||
int | num_bufs, | |||
char ** | bufs, | |||
int * | buf_sizes, | |||
int | map_gid, | |||
char | useAtSync | |||
) |
Definition at line 2368 of file ck.C.
References ArrayEltInitMsg, CkAllocateMarshallMsg(), _ckGroupID::idx, CkMarshallMsg::msgBuf, CkArrayOptions::setMap(), envelope::setMsgtype(), and UsrToEnv().
void CkInsertArrayExt | ( | int | aid, | |
int | ndims, | |||
int * | index, | |||
int | epIdx, | |||
int | onPE, | |||
int | num_bufs, | |||
char ** | bufs, | |||
int * | buf_sizes, | |||
char | useAtSync | |||
) |
Definition at line 2396 of file ck.C.
References ArrayEltInitMsg, CkAllocateMarshallMsg(), _ckGroupID::idx, CkMarshallMsg::msgBuf, envelope::setMsgtype(), and UsrToEnv().
void CkArrayDoneInsertingExt | ( | int | aid | ) |
Definition at line 2416 of file ck.C.
References _ckGroupID::idx, and ArrayElement::migrateMe().
Definition at line 1680 of file ck.C.
References _CldEnqueue(), _infoIdx, _noCldEnqueue(), _prepareMsg(), CkSendMsgInline(), CmiAbort(), sendChareMsg(), and UsrToEnv().
Referenced by CkDelegateMgr::ChareSend(), CkChareExtSend(), CkChareExtSend_multi(), CkRemoteCallAsync(), CkSendMsgInline(), and CkCallback::send().
Definition at line 1871 of file ck.C.
References _sendMsgBranch(), CkSendMsgBranchImmediate(), CkSendMsgBranchInline(), and UsrToEnv().
Referenced by CkGroupExtSend(), CkGroupExtSend_multi(), CkRemoteBranchCallAsync(), CkSendMsgBranchInline(), CkDelegateMgr::GroupSend(), CkCallback::send(), and CkMulticastMgr::sendToLocal().
void CkSendMsgInline | ( | int | entryIndex, | |
void * | msg, | |||
const CkChareID * | chare, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 1718 of file ck.C.
References _invokeEntryNoTrace(), _prepareMsg(), Converse::CkMyPe(), CkSendMsg(), CkUnpackMessage(), envelope::isPacked(), CkChareID::objPtr, CkChareID::onPE, and UsrToEnv().
Referenced by CkSendMsg(), and CkCallback::send().
void CkSendMsgBranchInline | ( | int | eIdx, | |
void * | msg, | |||
int | destPE, | |||
CkGroupID | gID, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 1846 of file ck.C.
References _deliverForBocMsg(), _localBranch(), _prepareMsgBranch(), Converse::CkMyPe(), CkSendMsgBranch(), ForBocMsg, and UsrToEnv().
Referenced by CkSendMsgBranch(), CkSendMsgBranchImmediate(), CkCallback::send(), and CkMulticastMgr::sendToLocal().
void CkSendMsgBranchMulti | ( | int | eIdx, | |
void * | msg, | |||
CkGroupID | gID, | |||
int | npes, | |||
const int * | pes, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 1908 of file ck.C.
References _sendMsgBranchMulti(), and CkSendMsgBranchMultiImmediate().
Referenced by CkDelegateMgr::GroupSectionSend().
void CkSendMsgBranchGroup | ( | int | eIdx, | |
void * | msg, | |||
CkGroupID | gID, | |||
CmiGroup | grp, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 1920 of file ck.C.
References _CldEnqueueGroup(), _infoIdx, _prepareMsgBranch(), CmiAbort(), CmiLookupGroup(), ForBocMsg, and npes.
void CkSendMsgNodeBranch | ( | int | eIdx, | |
void * | msg, | |||
int | destNode, | |||
CkGroupID | gID, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 2031 of file ck.C.
References _sendMsgNodeBranch(), CkSendMsgNodeBranchImmediate(), and CkSendMsgNodeBranchInline().
Referenced by CkRemoteNodeBranchCallAsync(), CkSendMsgNodeBranchInline(), CkDelegateMgr::NodeGroupSend(), and CkCallback::send().
void CkSendMsgNodeBranchInline | ( | int | eIdx, | |
void * | msg, | |||
int | destNode, | |||
CkGroupID | gID, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 2005 of file ck.C.
References _deliverForNodeBocMsg(), _prepareMsgBranch(), BGConverse::CkMyNode(), CkSendMsgNodeBranch(), ForNodeBocMsg, and UsrToEnv().
Referenced by CkSendMsgNodeBranch(), CkSendMsgNodeBranchImmediate(), and CkCallback::send().
void CkSendMsgNodeBranchMulti | ( | int | eIdx, | |
void * | msg, | |||
CkGroupID | gID, | |||
int | npes, | |||
const int * | nodes, | |||
int opts | CK_MSGOPTIONAL | |||
) |
Definition at line 2059 of file ck.C.
References _sendMsgNodeBranchMulti(), and CkSendMsgNodeBranchMultiImmediate().
Referenced by CkDelegateMgr::NodeGroupSectionSend().
Definition at line 1938 of file ck.C.
References _sendMsgBranch(), and Converse::CkNumPes().
Referenced by CkGroupExtSend(), CkGroupExtSend_multi(), CkDelegateMgr::GroupBroadcast(), and CkCallback::send().
Definition at line 2071 of file ck.C.
References _sendMsgNodeBranch(), and BGConverse::CkNumNodes().
Referenced by CkDelegateMgr::NodeGroupBroadcast(), and CkCallback::send().
Definition at line 2079 of file ck.C.
References _prepareMsg().
Definition at line 2081 of file ck.C.
References _prepareMsgBranch(), and ForBocMsg.
Referenced by CkMulticastMgr::sendToLocal().
Definition at line 2083 of file ck.C.
References _prepareMsgBranch(), and ForNodeBocMsg.
void CkSetRefNum | ( | void * | msg, | |
CMK_REFNUM_TYPE | ref | |||
) |
Definition at line 477 of file ck.C.
References envelope::setRef(), and UsrToEnv().
Referenced by final::AmpiMsg(), CkReductionMgr::finishBarrier(), CkNodeReductionMgr::finishReduction(), CkReductionMgr::finishReduction(), CkMulticastMgr::reduceFragment(), and CkCallback::send().
CMK_REFNUM_TYPE CkGetRefNum | ( | void * | msg | ) |
Definition at line 482 of file ck.C.
References envelope::getRef(), and UsrToEnv().
Referenced by SDAG::MsgClosure::MsgClosure(), and final::pup().
int CkGetSrcPe | ( | void * | msg | ) |
Definition at line 487 of file ck.C.
References envelope::getSrcPe(), and UsrToEnv().
Referenced by CkGetSrcNode().
int CkGetSrcNode | ( | void * | msg | ) |
Definition at line 492 of file ck.C.
References CkGetSrcPe(), and CmiNodeOf().
void CkDeliverMessageFree | ( | int | epIdx, | |
void * | msg, | |||
void * | object | |||
) |
Definition at line 557 of file ck.C.
References _entryTable, _msgTable, CpdAfterEp(), and CpdBeforeEp().
Referenced by _invokeEntryNoTrace(), and CkLocRec::invokeEntry().
void CkDeliverMessageReadonly | ( | int | epIdx, | |
const void * | msg, | |||
void * | object | |||
) |
Definition at line 578 of file ck.C.
References _entryTable, CkCopyMsg(), CpdAfterEp(), and CpdBeforeEp().
Referenced by _invokeEntryNoTrace(), and CkLocRec::invokeEntry().
void* CkLocalBranch | ( | CkGroupID | gID | ) |
Definition at line 497 of file ck.C.
References _localBranch().
Referenced by _deliverForBocMsg(), CkCacheManager< CkCacheKey >::cacheSync(), chpt< StateType >::checkpoint(), CProxy::ckDelegatedTo(), CProxy_NodeGroup::ckGetChareID(), CProxy_Group::ckGetChareID(), CkGroupGetReductionNumber(), CkLocMgr::CkLocMgr(), eventQueue::CommitStatsHelper(), LBgroup::computePeLoad(), CreateLBFunc_Def(), eventQueue::eventQueue(), CkObjID::getObject(), GroupChunkMeshStreamer< dtype, ClientType, RouterType, EntryMethod >::GroupChunkMeshStreamer(), GroupMeshStreamer< dtype, ClientType, RouterType, EntryMethod >::GroupMeshStreamer(), GVT::GVT(), MetaBalancer::init(), LBgroup::LBgroup(), LBstrategy::LBstrategy(), MetaBalancer::LoadBalanceDecision(), MeshStreamer< dtype >::MeshStreamer(), migrationDone(), MetaBalancer::Object(), LBDatabase::Object(), eventMsg::operator delete(), eventMsg::operator new(), sim::pup(), GVT::pup(), PVT::pup(), GroupChunkMeshStreamer< dtype, ClientType, RouterType, EntryMethod >::pup(), GroupMeshStreamer< dtype, ClientType, RouterType, EntryMethod >::pup(), MetaBalancer::pup(), LBDatabase::pup(), CkLocMgr::pup(), PVT::PVT(), MetaBalancerRedn::ReceiveIterNo(), rep::registerTimestamp(), LBDatabase::SetMigrationCost(), LBDatabase::SetStrategyCost(), sim::sim(), strat::strat(), pvtObjects::StratCalcs(), LBDatabase::UpdateDataAfterLB(), UpdateLocation(), OrbLB::work(), and BlockLB::work().
void* CkLocalNodeBranch | ( | CkGroupID | gID | ) |
Definition at line 509 of file ck.C.
References _ckLocalNodeBranch(), and CsdScheduler().
Referenced by CProxy::ckDelegatedTo().
void* CkLocalChare | ( | const CkChareID * | chare | ) |
Definition at line 522 of file ck.C.
References Converse::CkMyPe(), VidBlock::getLocalChareObj(), CkChareID::objPtr, and CkChareID::onPE.
Referenced by CkObjID::getObject().
Definition at line 2111 of file ck.C.
References _infoIdx, _noCldEnqueue(), _prepareOutgoingArrayMsg(), _skipCldEnqueue(), ForArrayEltMsg, sendArrayMsg(), and UsrToEnv().
Referenced by CkArrayBroadcaster::deliver(), CkLocMgr::deliverMsg(), and CkLocMgr::deliverUnknown().
Send msg to chare with ID (onPe,objPtr) to entry method 'epIdx'.
Definition at line 2450 of file ck.C.
References CkAllocateMarshallMsg(), CkSendMsg(), PUP::d, CkMarshallMsg::msgBuf, CkChareID::objPtr, and CkChareID::onPE.
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.
Definition at line 2466 of file ck.C.
References CkAllocateMarshallMsg(), CkSendMsg(), CkMarshallMsg::msgBuf, CkChareID::objPtr, and CkChareID::onPE.
Referenced by CkCallbackSendExt().
Send msg to group with ID 'gid'.
if pe == -1, msg will be broadcasted, else it will go to the group instance in that PE
Definition at line 2485 of file ck.C.
References CkAllocateMarshallMsg(), CkBroadcastMsgBranch(), CkSendMsgBranch(), PUP::d, _ckGroupID::idx, and CkMarshallMsg::msgBuf.
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.
Definition at line 2503 of file ck.C.
References CkAllocateMarshallMsg(), CkBroadcastMsgBranch(), CkSendMsgBranch(), _ckGroupID::idx, and CkMarshallMsg::msgBuf.
Referenced by CkCallbackSendExt().
Send msg to array with ID 'aid'.
idx is index of destination and ndims the number of dimensions of the index. If ndims <= 0, msg will be broadcasted to all array elements
Definition at line 2524 of file ck.C.
References CkArrayMessage::array_setIfNotThere(), CkAllocateMarshallMsg(), CkArray_IfNotThere_buffer, CkBroadcastMsgArray(), PUP::d, ForArrayEltMsg, _ckGroupID::idx, CkMarshallMsg::msgBuf, envelope::setMsgtype(), and UsrToEnv().
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.
Definition at line 2546 of file ck.C.
References CkArrayMessage::array_setIfNotThere(), CkAllocateMarshallMsg(), CkArray_IfNotThere_buffer, CkBroadcastMsgArray(), ForArrayEltMsg, _ckGroupID::idx, CkMarshallMsg::msgBuf, envelope::setMsgtype(), and UsrToEnv().
Referenced by CkCallbackSendExt().