#include <ckreduction.h>
It collects messages from all local contributors, then sends the reduced message up the reduction tree to node zero, where they're passed to the user's client function.
Definition at line 468 of file ckreduction.h.
typedef CkReductionClientFn CkNodeReductionMgr::clientFn |
Definition at line 478 of file ckreduction.h.
anonymous enum [private] |
anonymous enum [private] |
Definition at line 572 of file ckreduction.h.
CkNodeReductionMgr::CkNodeReductionMgr | ( | void | ) |
Definition at line 2143 of file ckreduction.C.
References additionalGCount, blocked, BGConverse::CkNumNodes(), CmiCreateLock(), creating, gcount, init_BinaryTree(), init_BinomialTree(), init_TopoTree(), inProgress, interrupt, killed, lcount, lockEverything, maxModificationRedNo, nContrib, newAdditionalGCount, nRemote, redNo, startRequested, and storedCallback.
CkNodeReductionMgr::CkNodeReductionMgr | ( | CkMigrateMessage * | m | ) | [inline] |
CkNodeReductionMgr::~CkNodeReductionMgr | ( | ) |
Definition at line 2175 of file ckreduction.C.
References CmiDestroyLock(), and lockEverything.
void CkNodeReductionMgr::ckSetReductionClient | ( | CkCallback * | cb | ) |
Add the given client function.
Overwrites any previous client. This manager will dispose of the callback when replaced or done.
Definition at line 2204 of file ckreduction.C.
References BGConverse::CkMyNode(), CkCallback::isInvalid(), and storedCallback.
void CkNodeReductionMgr::contribute | ( | contributorInfo * | ci, | |
CkReductionMsg * | msg | |||
) |
Definition at line 2221 of file ckreduction.C.
References addContribution(), BGConverse::CkMyNode(), Converse::CkMyPe(), CkReductionMsg::gcount, _ckGroupID::idx, contributorInfo::redNo, CkReductionMsg::redNo, CkReductionMsg::sourceFlag, and IrrGroup::thisgroup.
void CkNodeReductionMgr::contributeWithCounter | ( | contributorInfo * | ci, | |
CkReductionMsg * | m, | |||
int | count | |||
) |
Definition at line 2240 of file ckreduction.C.
References addContribution(), BGConverse::CkMyNode(), Converse::CkMyPe(), CmiWallTimer(), CkReductionMsg::gcount, CkReductionMsg::log, contributorInfo::redNo, and CkReductionMsg::redNo.
void CkNodeReductionMgr::RecvMsg | ( | CkReductionMsg * | m | ) |
Definition at line 2293 of file ckreduction.C.
References BGConverse::CkMyNode(), Converse::CkMyPe(), CmiDelayImmediate(), CmiLock(), CmiUnlock(), doRecvMsg(), interrupt, lockEverything, CkReductionMsg::log, and CkReductionMsg::redNo.
void CkNodeReductionMgr::doRecvMsg | ( | CkReductionMsg * | m | ) |
Definition at line 2263 of file ckreduction.C.
References blocked, bufferedRemoteMsgs, BGConverse::CkMyNode(), Converse::CkMyPe(), CkQ< T >::enq(), finishReduction(), futureRemoteMsgs, isFuture(), isPresent(), CkQ< T >::length(), msgs, nRemote, redNo, CkReductionMsg::redNo, and startReduction().
Referenced by clearBlockedMsgs(), finishReduction(), and RecvMsg().
void CkNodeReductionMgr::LateMigrantMsg | ( | CkReductionMsg * | m | ) |
Definition at line 2369 of file ckreduction.C.
References blocked, bufferedMsgs, BGConverse::CkMyNode(), CmiLock(), CmiUnlock(), CkQ< T >::enq(), finishReduction(), futureLateMigrantMsgs, isFuture(), CkQ< T >::length(), lockEverything, msgs, nContrib, and CkReductionMsg::redNo.
void CkNodeReductionMgr::flushStates | ( | ) | [virtual] |
Reimplemented from IrrGroup.
Reimplemented in NodeGroup.
Definition at line 2180 of file ckreduction.C.
References BGConverse::CkMyRank(), BGConverse::CkNumNodes(), creating, CkQ< T >::deq(), futureLateMigrantMsgs, futureMsgs, futureRemoteMsgs, gcount, inProgress, interrupt, CkQ< T >::isEmpty(), lcount, msgs, nContrib, nRemote, redNo, and startRequested.
Referenced by NodeGroup::flushStates().
virtual int CkNodeReductionMgr::getTotalGCount | ( | ) | [inline, virtual] |
Definition at line 499 of file ckreduction.h.
Referenced by evacuate().
Definition at line 2317 of file ckreduction.C.
References creating, inProgress, isFuture(), isPast(), redNo, and startRequested.
Referenced by doAddContribution(), doRecvMsg(), and updateTree().
void CkNodeReductionMgr::doAddContribution | ( | CkReductionMsg * | m | ) | [private] |
Definition at line 2337 of file ckreduction.C.
References blocked, bufferedMsgs, BGConverse::CkMyNode(), CkQ< T >::enq(), finishReduction(), futureMsgs, isFuture(), CkQ< T >::length(), msgs, nContrib, CkReductionMsg::redNo, and startReduction().
Referenced by addContribution(), clearBlockedMsgs(), and finishReduction().
void CkNodeReductionMgr::finishReduction | ( | void | ) | [private] |
check if the nodegroup reduction is finished at this node.
In that case send it up the reduction tree
reduce all messages received at this node
if the reduction is finished and I am the root of the reduction tree then call the reductionhandler and other stuff
Definition at line 2400 of file ckreduction.C.
References additionalGCount, CkReductionMsg::callback, BGConverse::CkMyNode(), Converse::CkMyPe(), CkSetRefNum(), creating, CkQ< T >::deq(), doAddContribution(), doRecvMsg(), CkQ< T >::enq(), futureLateMigrantMsgs, futureMsgs, futureRemoteMsgs, CkReductionMsg::gcount, CkReductionMsg::getUserFlag(), hasParent(), _ckGroupID::idx, inProgress, interrupt, CkCallback::isInvalid(), CkReductionMsg::isMigratableContributor(), killed, lcount, CkQ< T >::length(), CkReductionMsg::log, PUP::m, msgs, n, nContrib, nRemote, CkQ< T >::peek(), redNo, CkReductionMsg::redNo, CkReductionMgr::reduceMessages(), CkReductionMsg::reducer, CkReduction::reducerTable(), CkCallback::send(), CkReductionMsg::sourceFlag, startRequested, storedCallback, IrrGroup::thisgroup, thisProxy, treeKids(), treeParent(), and updateTree().
Referenced by DeleteChild(), DeleteNewChild(), doAddContribution(), doRecvMsg(), LateMigrantMsg(), and updateTree().
void CkNodeReductionMgr::addContribution | ( | CkReductionMsg * | m | ) | [protected] |
Definition at line 2360 of file ckreduction.C.
References CmiLock(), CmiUnlock(), doAddContribution(), interrupt, and lockEverything.
Referenced by contribute(), and contributeWithCounter().
void CkNodeReductionMgr::init_BinomialTree | ( | ) | [private] |
Definition at line 2592 of file ckreduction.C.
References BGConverse::CkMyNode(), BGConverse::CkNumNodes(), count, int, kids, label, numKids, p, parent, and upperSize.
Referenced by CkNodeReductionMgr(), and pup().
void CkNodeReductionMgr::init_TopoTree | ( | ) | [private] |
Definition at line 2579 of file ckreduction.C.
References _topoTree, CmiSpanningTreeInfo::child_count, CmiSpanningTreeInfo::children, kids, newKids, numKids, CmiSpanningTreeInfo::parent, parent, and PUP::t.
Referenced by CkNodeReductionMgr(), and pup().
void CkNodeReductionMgr::init_BinaryTree | ( | ) | [private] |
Definition at line 2564 of file ckreduction.C.
References BGConverse::CkMyNode(), BGConverse::CkNumNodes(), kids, newKids, numKids, parent, and TREE_WID.
Referenced by CkNodeReductionMgr(), and pup().
int CkNodeReductionMgr::treeRoot | ( | void | ) | [private] |
Definition at line 2630 of file ckreduction.C.
Referenced by hasParent().
bool CkNodeReductionMgr::hasParent | ( | void | ) | [private] |
Definition at line 2634 of file ckreduction.C.
References BGConverse::CkMyNode(), and treeRoot().
Referenced by finishReduction().
int CkNodeReductionMgr::treeParent | ( | void | ) | [private] |
Definition at line 2638 of file ckreduction.C.
References parent.
Referenced by doneEvacuate(), evacuate(), and finishReduction().
int CkNodeReductionMgr::firstKid | ( | void | ) | [private] |
Definition at line 2643 of file ckreduction.C.
References BGConverse::CkMyNode(), and TREE_WID.
int CkNodeReductionMgr::treeKids | ( | void | ) | [private] |
Definition at line 2647 of file ckreduction.C.
References numKids.
Referenced by evacuate(), and finishReduction().
Definition at line 560 of file ckreduction.h.
References redNo.
Referenced by startReduction().
Definition at line 561 of file ckreduction.h.
References redNo.
Referenced by doRecvMsg().
Definition at line 562 of file ckreduction.h.
References redNo.
Referenced by doAddContribution(), doRecvMsg(), LateMigrantMsg(), and startReduction().
void CkNodeReductionMgr::pup | ( | PUP::er & | p | ) | [virtual] |
Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc.
Reimplemented from IrrGroup.
Reimplemented in NodeGroup.
Definition at line 2660 of file ckreduction.C.
References additionalGCount, blocked, BGConverse::CkNumNodes(), CmiCreateLock(), creating, futureLateMigrantMsgs, futureMsgs, futureRemoteMsgs, gcount, init_BinaryTree(), init_BinomialTree(), init_TopoTree(), inProgress, interrupt, PUP::er::isUnpacking(), lcount, lockEverything, maxModificationRedNo, msgs, nContrib, newAdditionalGCount, nRemote, p, parent, IrrGroup::pup(), redNo, startRequested, storedCallback, IrrGroup::thisgroup, and thisProxy.
Referenced by NodeGroup::pup().
void CkNodeReductionMgr::evacuate | ( | ) | [virtual] |
Reimplemented from IrrGroup.
Definition at line 2718 of file ckreduction.C.
References additionalGCount, blocked, BGConverse::CkMyNode(), data, findMaxRedNo(), getTotalGCount(), _ckGroupID::idx, kids, LEAFPARENT, newKids, NEWPARENT, newParent, numKids, numModificationReplies, OLDCHILDREN, oldleaf, OLDPARENT, parent, readyDeletion, tempModificationRedNo, IrrGroup::thisgroup, thisProxy, treeKids(), and treeParent().
void CkNodeReductionMgr::doneEvacuate | ( | ) | [virtual] |
Reimplemented from IrrGroup.
Definition at line 2925 of file ckreduction.C.
References BGConverse::CkMyNode(), newParent, readyDeletion, thisProxy, and treeParent().
void CkNodeReductionMgr::DeleteChild | ( | int | deletedChild | ) |
Definition at line 2960 of file ckreduction.C.
References BGConverse::CkMyNode(), finishReduction(), _ckGroupID::idx, kids, numKids, and IrrGroup::thisgroup.
void CkNodeReductionMgr::DeleteNewChild | ( | int | deletedChild | ) |
Definition at line 2972 of file ckreduction.C.
References BGConverse::CkMyNode(), finishReduction(), _ckGroupID::idx, int, newKids, readyDeletion, and IrrGroup::thisgroup.
void CkNodeReductionMgr::collectMaxRedNo | ( | int | maxRedNo | ) |
Definition at line 2845 of file ckreduction.C.
References blocked, BGConverse::CkMyNode(), clearBlockedMsgs(), _ckGroupID::idx, kids, maxModificationRedNo, numKids, numModificationReplies, parent, tempModificationRedNo, IrrGroup::thisgroup, thisProxy, and updateTree().
void CkNodeReductionMgr::unblockNode | ( | int | maxRedNo | ) |
Definition at line 2875 of file ckreduction.C.
References blocked, clearBlockedMsgs(), maxModificationRedNo, and updateTree().
Definition at line 2798 of file ckreduction.C.
References additionalGCount, blocked, BGConverse::CkMyNode(), findMaxRedNo(), _ckGroupID::idx, kids, LEAFPARENT, newAdditionalGCount, newKids, NEWPARENT, newParent, numKids, OLDCHILDREN, OLDPARENT, parent, readyDeletion, IrrGroup::thisgroup, and thisProxy.
int CkNodeReductionMgr::findMaxRedNo | ( | ) | [private] |
Definition at line 2987 of file ckreduction.C.
References BGConverse::CkMyNode(), futureRemoteMsgs, CkQ< T >::length(), max(), msgs, and redNo.
Referenced by evacuate(), and modifyTree().
void CkNodeReductionMgr::updateTree | ( | ) | [private] |
Definition at line 2901 of file ckreduction.C.
References additionalGCount, BGConverse::CkMyNode(), finishReduction(), _ckGroupID::idx, int, kids, maxModificationRedNo, newAdditionalGCount, newKids, newParent, numKids, parent, readyDeletion, redNo, startReduction(), and IrrGroup::thisgroup.
Referenced by collectMaxRedNo(), finishReduction(), and unblockNode().
void CkNodeReductionMgr::clearBlockedMsgs | ( | ) | [private] |
Definition at line 2883 of file ckreduction.C.
References bufferedMsgs, bufferedRemoteMsgs, CkQ< T >::deq(), doAddContribution(), doRecvMsg(), len, CkQ< T >::length(), and PUP::m.
Referenced by collectMaxRedNo(), and unblockNode().
CProxy_CkNodeReductionMgr CkNodeReductionMgr::thisProxy |
Definition at line 470 of file ckreduction.h.
Referenced by collectMaxRedNo(), doneEvacuate(), evacuate(), finishReduction(), modifyTree(), and pup().
CkCallback* CkNodeReductionMgr::storedCallback [private] |
Definition at line 499 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), ckSetReductionClient(), finishReduction(), and pup().
int CkNodeReductionMgr::redNo [private] |
Definition at line 506 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), doRecvMsg(), findMaxRedNo(), finishReduction(), flushStates(), isFuture(), isPast(), isPresent(), pup(), startReduction(), and updateTree().
bool CkNodeReductionMgr::inProgress [private] |
Definition at line 507 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and startReduction().
bool CkNodeReductionMgr::creating [private] |
Definition at line 508 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and startReduction().
bool CkNodeReductionMgr::startRequested [private] |
Definition at line 509 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and startReduction().
int CkNodeReductionMgr::gcount [private] |
Definition at line 510 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), flushStates(), and pup().
int CkNodeReductionMgr::lcount [private] |
Definition at line 511 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), and pup().
int CkNodeReductionMgr::nContrib [private] |
Definition at line 514 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), doAddContribution(), finishReduction(), flushStates(), LateMigrantMsg(), and pup().
int CkNodeReductionMgr::nRemote [private] |
Definition at line 514 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), doRecvMsg(), finishReduction(), flushStates(), and pup().
CkMsgQ<CkReductionMsg> CkNodeReductionMgr::msgs [private] |
Definition at line 516 of file ckreduction.h.
Referenced by doAddContribution(), doRecvMsg(), findMaxRedNo(), finishReduction(), flushStates(), LateMigrantMsg(), and pup().
CkMsgQ<CkReductionMsg> CkNodeReductionMgr::futureMsgs [private] |
Definition at line 518 of file ckreduction.h.
Referenced by doAddContribution(), finishReduction(), flushStates(), and pup().
Definition at line 520 of file ckreduction.h.
Referenced by doRecvMsg(), findMaxRedNo(), finishReduction(), flushStates(), and pup().
Definition at line 522 of file ckreduction.h.
Referenced by finishReduction(), flushStates(), LateMigrantMsg(), and pup().
Definition at line 525 of file ckreduction.h.
Referenced by addContribution(), CkNodeReductionMgr(), LateMigrantMsg(), pup(), RecvMsg(), and ~CkNodeReductionMgr().
bool CkNodeReductionMgr::interrupt [private] |
Definition at line 527 of file ckreduction.h.
Referenced by addContribution(), CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and RecvMsg().
std::vector<int> CkNodeReductionMgr::kids [private] |
Definition at line 530 of file ckreduction.h.
Referenced by collectMaxRedNo(), DeleteChild(), evacuate(), init_BinaryTree(), init_BinomialTree(), init_TopoTree(), modifyTree(), and updateTree().
unsigned CkNodeReductionMgr::upperSize [private] |
unsigned CkNodeReductionMgr::label [private] |
int CkNodeReductionMgr::parent [private] |
Definition at line 545 of file ckreduction.h.
Referenced by collectMaxRedNo(), evacuate(), init_BinaryTree(), init_BinomialTree(), init_TopoTree(), modifyTree(), pup(), treeParent(), and updateTree().
int CkNodeReductionMgr::numKids [private] |
Definition at line 546 of file ckreduction.h.
Referenced by collectMaxRedNo(), DeleteChild(), evacuate(), init_BinaryTree(), init_BinomialTree(), init_TopoTree(), modifyTree(), treeKids(), and updateTree().
bool CkNodeReductionMgr::oldleaf [private] |
bool CkNodeReductionMgr::blocked [private] |
Definition at line 566 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), collectMaxRedNo(), doAddContribution(), doRecvMsg(), evacuate(), LateMigrantMsg(), modifyTree(), pup(), and unblockNode().
int CkNodeReductionMgr::newParent [private] |
Definition at line 567 of file ckreduction.h.
Referenced by doneEvacuate(), evacuate(), modifyTree(), and updateTree().
int CkNodeReductionMgr::additionalGCount [private] |
Definition at line 568 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), evacuate(), finishReduction(), modifyTree(), pup(), and updateTree().
int CkNodeReductionMgr::newAdditionalGCount [private] |
Definition at line 568 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), modifyTree(), pup(), and updateTree().
std::vector<int> CkNodeReductionMgr::newKids [private] |
Definition at line 569 of file ckreduction.h.
Referenced by DeleteNewChild(), evacuate(), init_BinaryTree(), init_TopoTree(), modifyTree(), and updateTree().
CkMsgQ<CkReductionMsg> CkNodeReductionMgr::bufferedMsgs [private] |
Definition at line 570 of file ckreduction.h.
Referenced by clearBlockedMsgs(), doAddContribution(), and LateMigrantMsg().
int CkNodeReductionMgr::maxModificationRedNo [private] |
Definition at line 574 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), collectMaxRedNo(), pup(), unblockNode(), and updateTree().
int CkNodeReductionMgr::tempModificationRedNo [private] |
bool CkNodeReductionMgr::readyDeletion [private] |
Definition at line 576 of file ckreduction.h.
Referenced by DeleteNewChild(), doneEvacuate(), evacuate(), modifyTree(), and updateTree().
bool CkNodeReductionMgr::killed [private] |
Definition at line 577 of file ckreduction.h.
Referenced by CkNodeReductionMgr(), and finishReduction().