PPL Logo

CkNodeReductionMgr Class Reference

One CkReductionMgr runs a non-overlapping set of reductions. More...

#include <ckreduction.h>

Inheritance diagram for CkNodeReductionMgr:

Inheritance graph
[legend]
Collaboration diagram for CkNodeReductionMgr:

Collaboration graph
[legend]

Public Types

typedef CkReductionClientFn clientFn

Public Member Functions

 CkNodeReductionMgr (void)
 CkNodeReductionMgr (CkMigrateMessage *m)
 ~CkNodeReductionMgr ()
void ckSetReductionClient (CkCallback *cb)
 Add the given client function.
void contribute (contributorInfo *ci, CkReductionMsg *msg)
void contributeWithCounter (contributorInfo *ci, CkReductionMsg *m, int count)
void RecvMsg (CkReductionMsg *m)
void doRecvMsg (CkReductionMsg *m)
void LateMigrantMsg (CkReductionMsg *m)
virtual void flushStates ()
virtual int getTotalGCount ()
virtual void pup (PUP::er &p)
 Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc.
virtual void evacuate ()
virtual void doneEvacuate ()
void DeleteChild (int deletedChild)
void DeleteNewChild (int deletedChild)
void collectMaxRedNo (int maxRedNo)
void unblockNode (int maxRedNo)
void modifyTree (int code, int size, int *data)

Data Fields

CProxy_CkNodeReductionMgr thisProxy

Protected Member Functions

void addContribution (CkReductionMsg *m)

Private Types

enum  { TREE_WID = 2 }
enum  { OLDPARENT, OLDCHILDREN, NEWPARENT, LEAFPARENT }

Private Member Functions

void startReduction (int number, int srcPE)
void doAddContribution (CkReductionMsg *m)
void finishReduction (void)
 check if the nodegroup reduction is finished at this node.
void init_BinomialTree ()
void init_TopoTree ()
void init_BinaryTree ()
int treeRoot (void)
bool hasParent (void)
int treeParent (void)
int firstKid (void)
int treeKids (void)
bool isPast (int num) const
bool isPresent (int num) const
bool isFuture (int num) const
int findMaxRedNo ()
void updateTree ()
void clearBlockedMsgs ()

Private Attributes

CkCallbackstoredCallback
int redNo
bool inProgress
bool creating
bool startRequested
int gcount
int lcount
int nContrib
int nRemote
CkMsgQ< CkReductionMsgmsgs
CkMsgQ< CkReductionMsgfutureMsgs
CkMsgQ< CkReductionMsgfutureRemoteMsgs
CkMsgQ< CkReductionMsgfutureLateMigrantMsgs
CmiNodeLock lockEverything
bool interrupt
std::vector< intkids
unsigned upperSize
unsigned label
int parent
int numKids
bool oldleaf
bool blocked
int newParent
int additionalGCount
int newAdditionalGCount
std::vector< intnewKids
CkMsgQ< CkReductionMsgbufferedMsgs
CkMsgQ< CkReductionMsgbufferedRemoteMsgs
int numModificationReplies
int maxModificationRedNo
int tempModificationRedNo
bool readyDeletion
bool killed

Detailed Description

One CkReductionMgr runs a non-overlapping set of reductions.

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.


Member Typedef Documentation

typedef CkReductionClientFn CkNodeReductionMgr::clientFn

Definition at line 478 of file ckreduction.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
TREE_WID 

Definition at line 552 of file ckreduction.h.

anonymous enum [private]

Enumerator:
OLDPARENT 
OLDCHILDREN 
NEWPARENT 
LEAFPARENT 

Definition at line 572 of file ckreduction.h.


Constructor & Destructor Documentation

CkNodeReductionMgr::CkNodeReductionMgr ( void   ) 

CkNodeReductionMgr::CkNodeReductionMgr ( CkMigrateMessage m  )  [inline]

Definition at line 473 of file ckreduction.h.

References storedCallback.

CkNodeReductionMgr::~CkNodeReductionMgr (  ) 

Definition at line 2175 of file ckreduction.C.

References CmiDestroyLock(), and lockEverything.

Here is the call graph for this function:


Member Function Documentation

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.

Here is the call graph for this function:

void CkNodeReductionMgr::contribute ( contributorInfo ci,
CkReductionMsg msg 
)

void CkNodeReductionMgr::contributeWithCounter ( contributorInfo ci,
CkReductionMsg m,
int  count 
)

void CkNodeReductionMgr::RecvMsg ( CkReductionMsg m  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkNodeReductionMgr::LateMigrantMsg ( CkReductionMsg m  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int CkNodeReductionMgr::getTotalGCount (  )  [inline, virtual]

Definition at line 499 of file ckreduction.h.

Referenced by evacuate().

Here is the caller graph for this function:

void CkNodeReductionMgr::startReduction ( int  number,
int  srcPE 
) [private]

Definition at line 2317 of file ckreduction.C.

References creating, inProgress, isFuture(), isPast(), redNo, and startRequested.

Referenced by doAddContribution(), doRecvMsg(), and updateTree().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkNodeReductionMgr::finishReduction ( void   )  [private]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkNodeReductionMgr::treeRoot ( void   )  [private]

Definition at line 2630 of file ckreduction.C.

Referenced by hasParent().

Here is the caller graph for this function:

bool CkNodeReductionMgr::hasParent ( void   )  [private]

Definition at line 2634 of file ckreduction.C.

References BGConverse::CkMyNode(), and treeRoot().

Referenced by finishReduction().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkNodeReductionMgr::treeParent ( void   )  [private]

Definition at line 2638 of file ckreduction.C.

References parent.

Referenced by doneEvacuate(), evacuate(), and finishReduction().

Here is the caller graph for this function:

int CkNodeReductionMgr::firstKid ( void   )  [private]

Definition at line 2643 of file ckreduction.C.

References BGConverse::CkMyNode(), and TREE_WID.

Here is the call graph for this function:

int CkNodeReductionMgr::treeKids ( void   )  [private]

Definition at line 2647 of file ckreduction.C.

References numKids.

Referenced by evacuate(), and finishReduction().

Here is the caller graph for this function:

bool CkNodeReductionMgr::isPast ( int  num  )  const [inline, private]

Definition at line 560 of file ckreduction.h.

References redNo.

Referenced by startReduction().

Here is the caller graph for this function:

bool CkNodeReductionMgr::isPresent ( int  num  )  const [inline, private]

Definition at line 561 of file ckreduction.h.

References redNo.

Referenced by doRecvMsg().

Here is the caller graph for this function:

bool CkNodeReductionMgr::isFuture ( int  num  )  const [inline, private]

Definition at line 562 of file ckreduction.h.

References redNo.

Referenced by doAddContribution(), doRecvMsg(), LateMigrantMsg(), and startReduction().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkNodeReductionMgr::evacuate (  )  [virtual]

void CkNodeReductionMgr::doneEvacuate (  )  [virtual]

Reimplemented from IrrGroup.

Definition at line 2925 of file ckreduction.C.

References BGConverse::CkMyNode(), newParent, readyDeletion, thisProxy, and treeParent().

Here is the call graph for this function:

void CkNodeReductionMgr::DeleteChild ( int  deletedChild  ) 

Definition at line 2960 of file ckreduction.C.

References BGConverse::CkMyNode(), finishReduction(), _ckGroupID::idx, kids, numKids, and IrrGroup::thisgroup.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void CkNodeReductionMgr::collectMaxRedNo ( int  maxRedNo  ) 

void CkNodeReductionMgr::unblockNode ( int  maxRedNo  ) 

Definition at line 2875 of file ckreduction.C.

References blocked, clearBlockedMsgs(), maxModificationRedNo, and updateTree().

Here is the call graph for this function:

void CkNodeReductionMgr::modifyTree ( int  code,
int  size,
int data 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

CProxy_CkNodeReductionMgr CkNodeReductionMgr::thisProxy

Definition at line 470 of file ckreduction.h.

Referenced by collectMaxRedNo(), doneEvacuate(), evacuate(), finishReduction(), modifyTree(), and pup().

Definition at line 499 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), ckSetReductionClient(), finishReduction(), and pup().

Definition at line 507 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and startReduction().

Definition at line 508 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and startReduction().

Definition at line 509 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), pup(), and startReduction().

Definition at line 510 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), flushStates(), and pup().

Definition at line 511 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), finishReduction(), flushStates(), and pup().

Definition at line 514 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), doRecvMsg(), finishReduction(), flushStates(), and pup().

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().

std::vector<int> CkNodeReductionMgr::kids [private]

unsigned CkNodeReductionMgr::upperSize [private]

Definition at line 543 of file ckreduction.h.

Referenced by init_BinomialTree().

unsigned CkNodeReductionMgr::label [private]

Definition at line 544 of file ckreduction.h.

Referenced by init_BinomialTree().

Definition at line 565 of file ckreduction.h.

Referenced by evacuate().

Definition at line 567 of file ckreduction.h.

Referenced by doneEvacuate(), evacuate(), modifyTree(), and updateTree().

Definition at line 568 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), modifyTree(), pup(), and updateTree().

std::vector<int> CkNodeReductionMgr::newKids [private]

Definition at line 570 of file ckreduction.h.

Referenced by clearBlockedMsgs(), doAddContribution(), and LateMigrantMsg().

Definition at line 571 of file ckreduction.h.

Referenced by clearBlockedMsgs(), and doRecvMsg().

Definition at line 573 of file ckreduction.h.

Referenced by collectMaxRedNo(), and evacuate().

Definition at line 574 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), collectMaxRedNo(), pup(), unblockNode(), and updateTree().

Definition at line 575 of file ckreduction.h.

Referenced by collectMaxRedNo(), and evacuate().

Definition at line 576 of file ckreduction.h.

Referenced by DeleteNewChild(), doneEvacuate(), evacuate(), modifyTree(), and updateTree().

Definition at line 577 of file ckreduction.h.

Referenced by CkNodeReductionMgr(), and finishReduction().


The documentation for this class was generated from the following files:

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