#include <ckmulticast.h>
Public Member Functions | |
CkMulticastMgr (CkMigrateMessage *m) | |
CkMulticastMgr (int _dfactor=2, unsigned int _split_size=8192, unsigned int _split_threshold=8192) | |
bool | useDefCtor (void) |
void | pup (PUP::er &p) |
Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc. | |
void | setSection (CkSectionInfo &id, CkArrayID aid, CkArrayIndex *, int n) |
Stuff section member info into CkSectionInfo and call initCookie for the tree building. | |
void | setSection (CkSectionInfo &id, CkArrayID aid, CkArrayIndex *, int n, int factor) |
Stuff section member info into CkSectionInfo and call initCookie for the tree building, with factor. | |
void | setSection (CkSectionInfo &id) |
Call initCookie to start the tree build. | |
void | setSection (CProxySection_ArrayElement &proxy) |
void | setup (multicastSetupMsg *) |
entry Start the build of a (branch of a) spanning tree rooted at you | |
void | recvCookie (CkSectionInfo sid, CkSectionInfo child) |
entry My direct children in the tree use this to tell me that they are ready | |
void | childrenReady (mCastEntry *entry) |
Notify my tree parent (if any) that I am are ready. | |
void | teardown (CkSectionInfo s) |
entry Marks tree as obsolete, releases buffered msgs and propagates the call to children | |
void | retire (CkSectionInfo s, CkSectionInfo root) |
entry Same as teardown, but also resets the root section info | |
void | freeup (CkSectionInfo s) |
entry Actually frees the old spanning tree. Propagates the call to children | |
void | retrieveCookie (CkSectionInfo s, CkSectionInfo srcInfo) |
entry | |
void | recvCookieInfo (CkSectionInfo s, int red) |
entry | |
void | recvMsg (multicastGrpMsg *m) |
entry | |
void | sendToLocal (multicastGrpMsg *m) |
entry | |
void | recvPacket (CkSectionInfo &&_cookie, int offset, int n, char *data, int seqno, int count, int totalsize, bool fromBuffer) |
entry | |
void | recvRedMsg (CkReductionMsg *msg) |
entry Accept a redn msg from a child in the spanning tree | |
void | updateRedNo (mCastEntryPtr, int red) |
entry Update the current completed redn num to input value | |
void | setReductionClient (CProxySection_ArrayElement &, redClientFn fn, void *param=NULL) |
Configure a client to accept the reduction result. | |
void | setReductionClient (CProxySection_ArrayBase &, CkCallback *cb) |
Configure a client to accept the reduction result. | |
void | contribute (CkSectionInfo &sid, int userData=-1, int fragSize=-1) |
reduction trigger | |
void | contribute (CkSectionInfo &sid, const CkCallback &cb, int userData=-1, int fragSize=-1) |
void | contribute (int dataSize, void *data, CkReduction::reducerType type, CkSectionInfo &sid, int userData=-1, int fragSize=-1) |
template<typename T> | |
void | contribute (std::vector< T > &data, CkReduction::reducerType type, CkSectionInfo &sid, int userData=-1, int fragSize=-1) |
void | contribute (int dataSize, void *data, CkReduction::reducerType type, CkSectionInfo &sid, const CkCallback &cb, int userData=-1, int fragSize=-1) |
reduction trigger with a callback | |
template<typename T> | |
void | contribute (std::vector< T > &data, CkReduction::reducerType type, CkSectionInfo &sid, const CkCallback &cb, int userData=-1, int fragSize=-1) |
void | resetSection (CProxySection_ArrayBase &proxy) |
virtual void | initDelegateMgr (CProxy *proxy, int opts=0) |
Implement the CkDelegateMgr interface to accept the delegation of a section proxy. | |
void | ArraySectionSend (CkDelegateData *pd, int ep, void *m, int nsid, CkSectionID *s, int opts) |
To implement the CkDelegateMgr interface for section mcasts. | |
void | SimpleSend (int ep, void *m, CkArrayID a, CkSectionID &sid, int opts) |
Send individually to each section member. Used when tree is out-of-date and needs a rebuild. | |
void | rebuild (CkSectionInfo &) |
Retire and rebuild the spanning tree when one of the intermediate vertices migrates. | |
void | setReductionClient (CProxySection_Group &proxy, CkCallback *cb) |
void | GroupSectionSend (CkDelegateData *pd, int ep, void *m, int nsid, CkSectionID *s) |
release buffered contributed messages, send them to parent | |
Private Member Functions | |
void | prepareCookie (mCastEntry *entry, CkSectionID &sid, const CkArrayIndex *al, int count, CkArrayID aid) |
Fill the SectionInfo cookie in the SectionID obj with relevant info. | |
void | initCookie (CkSectionInfo sid) |
Get info from the CkSectionInfo and call setup() to start the spanning tree build. | |
void | sendToSection (CkDelegateData *pd, int ep, void *m, CkSectionID *sid, int opts) |
Actually trigger the multicast to a section of a chare array. | |
void | resetCookie (CkSectionInfo sid) |
Mark old cookie spanning tree as old and build a new one. | |
void | releaseBufferedReduceMsgs (mCastEntryPtr entry) |
void | releaseFutureReduceMsgs (mCastEntryPtr entry) |
Release buffered redn msgs from later reductions which arrived early (out of order). | |
CkReductionMsg * | buildContributeMsg (int dataSize, void *data, CkReduction::reducerType type, CkSectionInfo &id, CkCallback &cb, int userFlag=-1) |
void | reduceFragment (int index, CkSectionInfo &id, mCastEntry *entry, reductionInfo &redInfo, int currentTreeUp) |
Reduce one fragment of a reduction msg and handle appropriately (transmit up the tree, buffer, combine etc). | |
CkReductionMsg * | combineFrags (CkSectionInfo &id, mCastEntry *entry, reductionInfo &redInfo) |
At the tree root: Combine all msg fragments for final delivery to the client. | |
void | initGrpDelegateMgr (CProxySection_Group *proxy, int opts) |
Implement the CkDelegateMgr interface to accept the delegation of a section proxy. | |
void | prepareGrpCookie (mCastEntry *entry, CkSectionID &sid, const int *pelist, int count, CkGroupID gid) |
Fill the SectionInfo cookie in the SectionID obj with relevant info. | |
void | initGrpCookie (CkSectionInfo sid) |
Get info from the CkSectionInfo and call setup() to start the spanning tree build. | |
Private Attributes | |
int | dfactor |
unsigned int | split_size |
unsigned int | split_threshold |
Can manage all sections of different chare arrays, so all functions need a CkSectionInfo parameter to tell CkMulticastMgr which array section it should work on.
Definition at line 32 of file ckmulticast.h.
CkMulticastMgr::CkMulticastMgr | ( | CkMigrateMessage * | m | ) | [inline] |
Definition at line 41 of file ckmulticast.h.
CkMulticastMgr::CkMulticastMgr | ( | int | _dfactor = 2 , |
|
unsigned int | _split_size = 8192 , |
|||
unsigned int | _split_threshold = 8192 | |||
) | [inline] |
Definition at line 42 of file ckmulticast.h.
bool CkMulticastMgr::useDefCtor | ( | void | ) | [inline] |
Definition at line 46 of file ckmulticast.h.
void CkMulticastMgr::pup | ( | PUP::er & | p | ) | [inline, virtual] |
Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc.
Reimplemented from IrrGroup.
Definition at line 47 of file ckmulticast.h.
References dfactor, IrrGroup::pup(), split_size, and split_threshold.
void CkMulticastMgr::setSection | ( | CkSectionInfo & | id, | |
CkArrayID | aid, | |||
CkArrayIndex * | al, | |||
int | n | |||
) |
Stuff section member info into CkSectionInfo and call initCookie for the tree building.
Definition at line 305 of file ckmulticast.C.
References dfactor.
void CkMulticastMgr::setSection | ( | CkSectionInfo & | id, | |
CkArrayID | aid, | |||
CkArrayIndex * | al, | |||
int | n, | |||
int | factor | |||
) |
Stuff section member info into CkSectionInfo and call initCookie for the tree building, with factor.
Definition at line 310 of file ckmulticast.C.
References mCastEntry::allElem, mCastEntry::allObjKeys, mCastEntry::bfactor, CkSectionInfo::get_aid(), CkSectionInfo::get_val(), and initCookie().
void CkMulticastMgr::setSection | ( | CkSectionInfo & | id | ) |
Call initCookie to start the tree build.
Definition at line 337 of file ckmulticast.C.
References initCookie().
void CkMulticastMgr::setSection | ( | CProxySection_ArrayElement & | proxy | ) |
Definition at line 346 of file ckmulticast.C.
References mCastEntry::allElem, mCastEntry::allObjKeys, mCastEntry::bfactor, dfactor, CkSectionInfo::get_aid(), CkSectionInfo::get_val(), and initCookie().
void CkMulticastMgr::setup | ( | multicastSetupMsg * | msg | ) |
entry Start the build of a (branch of a) spanning tree rooted at you
Definition at line 657 of file ckmulticast.C.
References mCastEntry::aid, multicastSetupMsg::arrIdx, ST_RecursivePartition< Iterator >::begin(), multicastSetupMsg::bfactor, mCastEntry::bfactor, ST_RecursivePartition< Iterator >::buildSpanningTree(), childrenReady(), Converse::CkMyPe(), ST_RecursivePartition< Iterator >::end(), factor, multicastSetupMsg::forGrpSec(), CkSectionInfo::get_aid(), CkSectionInfo::get_pe(), CkSectionInfo::get_val(), idx, mCastEntry::isGrpSec(), mCastEntry::localElem, PUP::m, multicastSetupMsg::nIdx, mCastEntry::numChild, multicastSetupMsg::parent, mCastEntry::parentGrp, mCastEntry::pe, multicastSetupMsg::peElems, mCastEntry::red, multicastSetupMsg::redNo, reductionInfo::redNo, mCastEntry::rootSid, multicastSetupMsg::rootSid, mCastEntry::setLocalGrpElem(), ST_RecursivePartition< Iterator >::subtreeSize(), and IrrGroup::thisgroup.
void CkMulticastMgr::recvCookie | ( | CkSectionInfo | sid, | |
CkSectionInfo | child | |||
) |
entry My direct children in the tree use this to tell me that they are ready
Definition at line 824 of file ckmulticast.C.
References mCastEntry::children, childrenReady(), CkSectionInfo::get_val(), and mCastEntry::numChild.
void CkMulticastMgr::childrenReady | ( | mCastEntry * | entry | ) |
Notify my tree parent (if any) that I am are ready.
Definition at line 789 of file ckmulticast.C.
References mCastEntry::allElem, mCastEntry::allGrpElem, Converse::CkMyPe(), mCastPacket::cookie, mCastPacket::count, mCastPacket::data, CkQ< T >::deq(), CkSectionInfo::get_pe(), CkSectionInfo::get_val(), mCastEntry::getAid(), mCastEntry::hasParent(), CkQ< T >::isEmpty(), mCastEntry::isGrpSec(), mCastEntry::msgBuf, mCastPacket::n, mCastPacket::offset, mCastEntry::packetBuf, mCastEntry::parentGrp, mCastEntry::red, reductionInfo::redNo, releaseFutureReduceMsgs(), mCastPacket::seqno, mCastEntry::setReady(), IrrGroup::thisgroup, mCastPacket::totalsize, and UsrToEnv().
Referenced by recvCookie(), and setup().
void CkMulticastMgr::teardown | ( | CkSectionInfo | s | ) |
entry Marks tree as obsolete, releases buffered msgs and propagates the call to children
Definition at line 600 of file ckmulticast.C.
References mCastEntry::children, CkSectionInfo::get_val(), releaseBufferedReduceMsgs(), mCastEntry::setObsolete(), and IrrGroup::thisgroup.
void CkMulticastMgr::retire | ( | CkSectionInfo | s, | |
CkSectionInfo | root | |||
) |
entry Same as teardown, but also resets the root section info
Definition at line 617 of file ckmulticast.C.
References mCastEntry::children, CkSectionInfo::get_val(), releaseBufferedReduceMsgs(), mCastEntry::rootSid, mCastEntry::setObsolete(), and IrrGroup::thisgroup.
void CkMulticastMgr::freeup | ( | CkSectionInfo | s | ) |
entry Actually frees the old spanning tree. Propagates the call to children
Definition at line 636 of file ckmulticast.C.
References mCastEntry::children, Converse::CkMyPe(), CkSectionInfo::get_val(), mCastEntry::oldc, and IrrGroup::thisgroup.
void CkMulticastMgr::retrieveCookie | ( | CkSectionInfo | s, | |
CkSectionInfo | srcInfo | |||
) |
entry
Definition at line 513 of file ckmulticast.C.
References CkSectionInfo::get_pe(), CkSectionInfo::get_val(), mCastEntry::red, reductionInfo::redNo, and IrrGroup::thisgroup.
void CkMulticastMgr::recvCookieInfo | ( | CkSectionInfo | s, | |
int | red | |||
) |
entry
Definition at line 522 of file ckmulticast.C.
References CkSectionInfo::get_val(), initCookie(), mCastEntry::red, and reductionInfo::redNo.
void CkMulticastMgr::recvMsg | ( | multicastGrpMsg * | m | ) |
entry
Definition at line 1077 of file ckmulticast.C.
References mCastEntry::children, CkCopyMsg(), CkQ< T >::enq(), CkSectionInfo::get_aid(), mCastEntry::getAid(), mCastEntry::msgBuf, mCastEntry::notReady(), sendToLocal(), IrrGroup::thisgroup, and UsrToEnv().
Referenced by sendToSection().
void CkMulticastMgr::sendToLocal | ( | multicastGrpMsg * | m | ) |
entry
Definition at line 1106 of file ckmulticast.C.
References _entryTable, CkCopyMsg(), CkGroupMsgPrep(), Converse::CkMyPe(), CkSendMsgArrayInline(), CkSendMsgBranch(), CkSendMsgBranchInline(), CkSectionInfo::get_aid(), CkSectionInfo::get_pe(), mCastEntry::getAid(), CkDelegateMgr::GroupSend(), mCastEntry::isGrpSec(), mCastEntry::localElem, mCastEntry::localGrpElem, and mCastEntry::rootSid.
Referenced by recvMsg(), and recvPacket().
void CkMulticastMgr::recvPacket | ( | CkSectionInfo && | _cookie, | |
int | offset, | |||
int | n, | |||
char * | data, | |||
int | seqno, | |||
int | count, | |||
int | totalsize, | |||
bool | fromBuffer | |||
) |
entry
Definition at line 1038 of file ckmulticast.C.
References mCastEntry::asm_fill, mCastEntry::asm_msg, mCastEntry::children, CkUnpackMessage(), CmiAlloc(), CkQ< T >::enq(), EnvToUsr(), CkQ< T >::isEmpty(), msg, mCastEntry::notReady(), mCastEntry::packetBuf, sendToLocal(), and IrrGroup::thisgroup.
void CkMulticastMgr::recvRedMsg | ( | CkReductionMsg * | msg | ) |
entry Accept a redn msg from a child in the spanning tree
Called from:
Grab the section info embedded in the redn msg
... and get at the ptr which shows me which cookie to use
If this cookie is obsolete
If I am the root, traverse the linked list of cookies to get the latest
Indicate it is not on old spanning tree
Flag the redn as coming from an old tree and that the new entry cookie needs to know the new redn num.
If I am not the root or this latest cookie is also obsolete
Grab the locally stored redn info
If you've received a msg from a previous redn, something has gone horribly wrong somewhere!
If the current tree is not yet ready or if you've received a msg for a future redn, buffer the msg
Flag if this fragment can be reduced (if all local elements and children have contributed this fragment)
Flag (only at the redn root) if all array elements contributed all their fragments
If this fragment can be reduced, or if I am the root and have received all fragments from all elements
Reduce this fragment
If all the fragments for the current reduction have been processed
Increment the reduction number in all of this section's cookies
Reset bookkeeping counters
Now that, the current redn is done, release any pending msgs from future redns
Definition at line 1531 of file ckmulticast.C.
References CkReductionMsg::callback, reductionInfo::ccount, mCastEntry::children, Converse::CkMyPe(), CmiAbort(), CmiPrintf(), CkReductionMsg::fragNo, reductionInfo::futureMsgs, CkReductionMsg::gcount, reductionInfo::gcount, CkSectionInfo::get_pe(), CkSectionInfo::get_val(), mCastEntry::getNumAllElems(), mCastEntry::getNumLocalElems(), mCastEntry::hasParent(), mCastEntry::incReduceNo(), index, CkReductionMsg::isFromUser(), CkCallback::isInvalid(), mCastEntry::isObsolete(), reductionInfo::lcount, reductionInfo::msgs, mCastEntry::newc, CkReductionMsg::nFrags, mCastEntry::notReady(), reductionInfo::npProcessed, CkReductionMsg::rebuilt, mCastEntry::red, reductionInfo::redNo, CkReductionMsg::redNo, reduceFragment(), CkReductionMsg::reducer, CkReduction::reducerTable(), releaseFutureReduceMsgs(), mCastEntry::rootSid, CkReductionMsg::sid, CkReductionMsg::sourceFlag, IrrGroup::thisgroup, and UsrToEnv().
void CkMulticastMgr::updateRedNo | ( | mCastEntryPtr | entry, | |
int | red | |||
) |
entry Update the current completed redn num to input value
Definition at line 1746 of file ckmulticast.C.
References mCastEntry::children, Converse::CkMyPe(), mCastEntry::red, reductionInfo::redNo, releaseFutureReduceMsgs(), and IrrGroup::thisgroup.
void CkMulticastMgr::setReductionClient | ( | CProxySection_ArrayElement & | proxy, | |
redClientFn | fn, | |||
void * | param = NULL | |||
) |
Configure a client to accept the reduction result.
Definition at line 1262 of file ckmulticast.C.
References mCastEntry::red, reductionInfo::storedClient, and reductionInfo::storedClientParam.
void CkMulticastMgr::setReductionClient | ( | CProxySection_ArrayBase & | proxy, | |
CkCallback * | cb | |||
) |
Configure a client to accept the reduction result.
Definition at line 1190 of file ckmulticast.C.
References CkSectionInfo::get_val(), ck::impl::processSectionContribution(), mCastEntry::red, and reductionInfo::storedCallback.
void CkMulticastMgr::contribute | ( | CkSectionInfo & | sid, | |
int | userData = -1 , |
|||
int | fragSize = -1 | |||
) |
reduction trigger
Definition at line 1289 of file ckmulticast.C.
References cb, and CkReduction::nop.
Referenced by contribute().
void CkMulticastMgr::contribute | ( | CkSectionInfo & | sid, | |
const CkCallback & | cb, | |||
int | userData = -1 , |
|||
int | fragSize = -1 | |||
) |
Definition at line 1295 of file ckmulticast.C.
References contribute(), and CkReduction::nop.
void CkMulticastMgr::contribute | ( | int | dataSize, | |
void * | data, | |||
CkReduction::reducerType | type, | |||
CkSectionInfo & | sid, | |||
int | userData = -1 , |
|||
int | fragSize = -1 | |||
) |
Definition at line 1300 of file ckmulticast.C.
References cb, and contribute().
void CkMulticastMgr::contribute | ( | std::vector< T > & | data, | |
CkReduction::reducerType | type, | |||
CkSectionInfo & | sid, | |||
int | userData = -1 , |
|||
int | fragSize = -1 | |||
) | [inline] |
Definition at line 102 of file ckmulticast.h.
References contribute().
void CkMulticastMgr::contribute | ( | int | dataSize, | |
void * | data, | |||
CkReduction::reducerType | type, | |||
CkSectionInfo & | sid, | |||
const CkCallback & | cb, | |||
int | userData = -1 , |
|||
int | fragSize = -1 | |||
) |
reduction trigger with a callback
Definition at line 1307 of file ckmulticast.C.
References CkReductionMsg::buildNew(), CkReductionMsg::callback, Converse::CkMyPe(), CmiAbort(), CmiPrintf(), CkReductionMsg::fragNo, CkReductionMsg::gcount, msg, CkReductionMsg::nFrags, CkReductionMsg::rebuilt, CkReductionMsg::redNo, CkReductionMsg::reducer, CkReductionMsg::sid, CkReductionMsg::sourceFlag, IrrGroup::thisgroup, CkReductionMsg::userFlag, and UsrToEnv().
void CkMulticastMgr::contribute | ( | std::vector< T > & | data, | |
CkReduction::reducerType | type, | |||
CkSectionInfo & | sid, | |||
const CkCallback & | cb, | |||
int | userData = -1 , |
|||
int | fragSize = -1 | |||
) | [inline] |
Definition at line 108 of file ckmulticast.h.
References contribute().
void CkMulticastMgr::resetSection | ( | CProxySection_ArrayBase & | proxy | ) |
Definition at line 377 of file ckmulticast.C.
References CkSectionID::_elems, Converse::CkMyPe(), CkSectionInfo::get_aid(), CkSectionInfo::get_pe(), CkSectionInfo::get_val(), mCastEntry::getAid(), info, mCastEntry::oldtree, prepareCookie(), SectionLocation::set(), and IrrGroup::thisgroup.
Implement the CkDelegateMgr interface to accept the delegation of a section proxy.
Reimplemented from CkDelegateMgr.
Definition at line 455 of file ckmulticast.C.
References CkSectionID::_cookie, initCookie(), initGrpDelegateMgr(), prepareCookie(), ck::impl::processSectionContribution(), mCastEntry::red, and reductionInfo::storedCallback.
void CkMulticastMgr::ArraySectionSend | ( | CkDelegateData * | pd, | |
int | ep, | |||
void * | m, | |||
int | nsid, | |||
CkSectionID * | s, | |||
int | opts | |||
) | [virtual] |
To implement the CkDelegateMgr interface for section mcasts.
Reimplemented from CkDelegateMgr.
Definition at line 898 of file ckmulticast.C.
References CkCopyMsg(), sendToSection(), and UsrToEnv().
void CkMulticastMgr::SimpleSend | ( | int | ep, | |
void * | m, | |||
CkArrayID | a, | |||
CkSectionID & | sid, | |||
int | opts | |||
) |
Send individually to each section member. Used when tree is out-of-date and needs a rebuild.
Definition at line 878 of file ckmulticast.C.
References CkSectionID::_elems, CkCopyMsg(), Converse::CkMyPe(), and UsrToEnv().
Referenced by sendToSection().
void CkMulticastMgr::rebuild | ( | CkSectionInfo & | sectId | ) |
Retire and rebuild the spanning tree when one of the intermediate vertices migrates.
Definition at line 838 of file ckmulticast.C.
References Converse::CkMyPe(), CkSectionInfo::get_val(), mCastEntry::isObsolete(), mCastEntry::newc, mCastEntry::oldc, mCastEntry::pe, mCastEntry::red, reductionInfo::redNo, resetCookie(), and mCastEntry::setObsolete().
Referenced by sendToSection().
void CkMulticastMgr::setReductionClient | ( | CProxySection_Group & | proxy, | |
CkCallback * | cb | |||
) |
Definition at line 1226 of file ckmulticast.C.
References Converse::CkMyPe(), CkSectionInfo::get_val(), ck::impl::processSectionContribution(), mCastEntry::red, and reductionInfo::storedCallback.
void CkMulticastMgr::GroupSectionSend | ( | CkDelegateData * | pd, | |
int | ep, | |||
void * | m, | |||
int | nsid, | |||
CkSectionID * | s | |||
) | [virtual] |
release buffered contributed messages, send them to parent
Reimplemented from CkDelegateMgr.
Definition at line 915 of file ckmulticast.C.
References CkCopyMsg(), Converse::CkMyPe(), sendToSection(), and UsrToEnv().
void CkMulticastMgr::prepareCookie | ( | mCastEntry * | entry, | |
CkSectionID & | sid, | |||
const CkArrayIndex * | al, | |||
int | count, | |||
CkArrayID | aid | |||
) | [private] |
Fill the SectionInfo cookie in the SectionID obj with relevant info.
Build a mCastEntry object with relevant section info and set the section cookie to point to this object.
Definition at line 409 of file ckmulticast.C.
References CkSectionID::_cookie, mCastEntry::allElem, mCastEntry::allObjKeys, mCastEntry::bfactor, CkSectionID::bfactor, Converse::CkMyPe(), dfactor, CkSectionInfo::get_aid(), CkSectionInfo::get_pe(), and CkSectionInfo::get_val().
Referenced by initDelegateMgr(), and resetSection().
void CkMulticastMgr::initCookie | ( | CkSectionInfo | sid | ) | [private] |
Get info from the CkSectionInfo and call setup() to start the spanning tree build.
Definition at line 535 of file ckmulticast.C.
References mCastEntry::allElem, array, multicastSetupMsg::arrIdx, mCastEntry::bfactor, multicastSetupMsg::bfactor, Converse::CkMyPe(), Converse::CkNumPes(), CkSectionInfo::get_aid(), CkSectionInfo::get_val(), mCastEntry::getAid(), idx, CkArray::lastKnown(), msg, n, multicastSetupMsg::nIdx, multicastSetupMsg::parent, multicastSetupMsg::peElems, mCastEntry::red, reductionInfo::redNo, multicastSetupMsg::redNo, multicastSetupMsg::rootSid, and IrrGroup::thisgroup.
Referenced by initDelegateMgr(), recvCookieInfo(), resetCookie(), and setSection().
void CkMulticastMgr::sendToSection | ( | CkDelegateData * | pd, | |
int | ep, | |||
void * | m, | |||
CkSectionID * | sid, | |||
int | opts | |||
) | [private] |
Actually trigger the multicast to a section of a chare array.
Definition at line 932 of file ckmulticast.C.
References CkSectionID::_cookie, mCastEntry::allObjKeys, Converse::CkMyPe(), CkPackMessage(), CkUnpackMessage(), CmiAbort(), CmiFree(), CmiPrintf(), data, EnvToUsr(), CkSectionInfo::get_aid(), CkSectionInfo::get_pe(), CkSectionInfo::get_val(), envelope::getTotalsize(), mCastEntry::isGrpSec(), LBDatabaseObj(), msg, LBDatabase::MulticastSend(), mCastEntry::needRebuild, mCastEntry::newc, rebuild(), recvMsg(), PUP::s, SimpleSend(), split_size, split_threshold, IrrGroup::thisgroup, and UsrToEnv().
Referenced by ArraySectionSend(), and GroupSectionSend().
void CkMulticastMgr::resetCookie | ( | CkSectionInfo | sid | ) | [private] |
Mark old cookie spanning tree as old and build a new one.
Definition at line 863 of file ckmulticast.C.
References Converse::CkMyPe(), CkSectionInfo::get_val(), mCastEntry::getAid(), initCookie(), mCastEntry::oldc, and IrrGroup::thisgroup.
Referenced by rebuild().
void CkMulticastMgr::releaseBufferedReduceMsgs | ( | mCastEntryPtr | entry | ) | [private] |
Definition at line 1717 of file ckmulticast.C.
References reductionInfo::futureMsgs, CkSectionInfo::get_pe(), msg, reductionInfo::msgs, mCastEntry::red, CkReductionMsg::redNo, mCastEntry::rootSid, CkReductionMsg::sid, CkReductionMsg::sourceFlag, and IrrGroup::thisgroup.
Referenced by retire(), and teardown().
void CkMulticastMgr::releaseFutureReduceMsgs | ( | mCastEntryPtr | entry | ) | [private] |
Release buffered redn msgs from later reductions which arrived early (out of order).
Definition at line 1703 of file ckmulticast.C.
References Converse::CkMyPe(), reductionInfo::futureMsgs, mCastEntry::red, and IrrGroup::thisgroup.
Referenced by childrenReady(), recvRedMsg(), and updateRedNo().
CkReductionMsg * CkMulticastMgr::buildContributeMsg | ( | int | dataSize, | |
void * | data, | |||
CkReduction::reducerType | type, | |||
CkSectionInfo & | id, | |||
CkCallback & | cb, | |||
int | userFlag = -1 | |||
) | [inline, private] |
Definition at line 1270 of file ckmulticast.C.
References CkReductionMsg::buildNew(), CkReductionMsg::callback, Converse::CkMyPe(), CkReductionMsg::gcount, msg, CkReductionMsg::rebuilt, CkReductionMsg::redNo, CkReductionMsg::reducer, CkReductionMsg::sid, CkReductionMsg::sourceFlag, CkReductionMsg::userFlag, and UsrToEnv().
void CkMulticastMgr::reduceFragment | ( | int | index, | |
CkSectionInfo & | id, | |||
mCastEntry * | entry, | |||
reductionInfo & | redInfo, | |||
int | currentTreeUp | |||
) | [private] |
Reduce one fragment of a reduction msg and handle appropriately (transmit up the tree, buffer, combine etc).
<
Definition at line 1421 of file ckmulticast.C.
References CkReductionMsg::callback, Converse::CkMyPe(), CkSetRefNum(), SectionLocation::clear(), CmiAbort(), combineFrags(), CkReductionMsg::data, dataSize, SectionLocation::entry, CkReductionMsg::fragNo, reductionInfo::gcount, CkReductionMsg::gcount, CkSectionInfo::get_pe(), CkSectionInfo::get_val(), mCastEntry::getAid(), mCastEntry::hasOldtree(), mCastEntry::hasParent(), CkCallback::isInvalid(), reductionInfo::msgs, mCastEntry::needRebuild, CkReductionMsg::nFrags, reductionInfo::npProcessed, mCastEntry::oldc, mCastEntry::oldtree, mCastEntry::parentGrp, SectionLocation::pe, CkReductionMsg::rebuilt, CkReductionMsg::redNo, reductionInfo::redNo, CkReductionMsg::reducer, CkReduction::reducerTable(), CkCallback::send(), CkReductionMsg::sid, CkReductionMsg::sourceFlag, reductionInfo::storedCallback, reductionInfo::storedClient, reductionInfo::storedClientParam, IrrGroup::thisgroup, CkReductionMsg::userFlag, and UsrToEnv().
Referenced by recvRedMsg().
CkReductionMsg * CkMulticastMgr::combineFrags | ( | CkSectionInfo & | id, | |
mCastEntry * | entry, | |||
reductionInfo & | redInfo | |||
) | [private] |
At the tree root: Combine all msg fragments for final delivery to the client.
Definition at line 1366 of file ckmulticast.C.
References CkReductionMsg::buildNew(), CkReductionMsg::callback, data, dataSize, CkReductionMsg::getData(), msg, reductionInfo::msgs, CkReductionMsg::nFrags, CkReductionMsg::rebuilt, CkReductionMsg::redNo, CkReductionMsg::reducer, CkReductionMsg::sid, CkReductionMsg::sourceFlag, CkReductionMsg::userFlag, and UsrToEnv().
Referenced by reduceFragment().
void CkMulticastMgr::initGrpDelegateMgr | ( | CProxySection_Group * | proxy, | |
int | opts | |||
) | [private] |
Implement the CkDelegateMgr interface to accept the delegation of a section proxy.
Definition at line 498 of file ckmulticast.C.
References CkSectionID::_cookie, initGrpCookie(), and prepareGrpCookie().
Referenced by initDelegateMgr().
void CkMulticastMgr::prepareGrpCookie | ( | mCastEntry * | entry, | |
CkSectionID & | sid, | |||
const int * | pelist, | |||
int | count, | |||
CkGroupID | gid | |||
) | [private] |
Fill the SectionInfo cookie in the SectionID obj with relevant info.
similar to prepareCookie, but for group sections
Definition at line 434 of file ckmulticast.C.
References CkSectionID::_cookie, mCastEntry::allGrpElem, mCastEntry::bfactor, CkSectionID::bfactor, Converse::CkMyPe(), dfactor, CkSectionInfo::get_aid(), CkSectionInfo::get_pe(), CkSectionInfo::get_val(), and mCastEntry::isGrpSec().
Referenced by initGrpDelegateMgr().
void CkMulticastMgr::initGrpCookie | ( | CkSectionInfo | sid | ) | [private] |
Get info from the CkSectionInfo and call setup() to start the spanning tree build.
Definition at line 575 of file ckmulticast.C.
References mCastEntry::allGrpElem, multicastSetupMsg::arrIdx, mCastEntry::bfactor, multicastSetupMsg::bfactor, Converse::CkMyPe(), CkSectionInfo::get_val(), mCastEntry::getAid(), msg, n, multicastSetupMsg::nIdx, multicastSetupMsg::parent, multicastSetupMsg::peElems, mCastEntry::red, reductionInfo::redNo, multicastSetupMsg::redNo, multicastSetupMsg::rootSid, and IrrGroup::thisgroup.
Referenced by initGrpDelegateMgr().
int CkMulticastMgr::dfactor [private] |
Definition at line 35 of file ckmulticast.h.
Referenced by prepareCookie(), prepareGrpCookie(), pup(), and setSection().
unsigned int CkMulticastMgr::split_size [private] |
unsigned int CkMulticastMgr::split_threshold [private] |