#include <ProxyMgr.h>
Definition at line 426 of file ProxyMgr.h.
◆ NodeProxyMgr()
NodeProxyMgr::NodeProxyMgr |
( |
| ) |
|
|
inline |
Definition at line 450 of file ProxyMgr.h.
453 localPatchMaps =
new PatchMap *[CkMyNodeSize()];
460 localProxyLists = NULL;
461 remoteProxyLists = NULL;
462 localDepositLock = CmiCreateLock();
463 remoteDepositLock = CmiCreateLock();
◆ ~NodeProxyMgr()
NodeProxyMgr::~NodeProxyMgr |
( |
| ) |
|
|
inline |
Definition at line 465 of file ProxyMgr.h.
466 for(
int i=0; i<numPatches; i++) {
470 delete [] localPatchMaps;
472 CmiDestroyLock(localDepositLock);
473 CmiDestroyLock(remoteDepositLock);
◆ contributeToParent()
void NodeProxyMgr::contributeToParent |
( |
| ) |
|
Definition at line 2007 of file ProxyMgr.C.
References PatchProxyListMsg::createPatchProxyListMsg().
Referenced by sendProxyList(), and sendProxyListInfo().
2008 if(homepatchRecved!=numHomePatches || kidRecved != numKidNodes)
return;
2010 homepatchRecved = 0;
2014 if(parentNode == -1) {
2016 CProxy_ProxyMgr cp(CkpvAccess(BOCclass_group).proxyMgr);
2017 cp[0].recvPatchProxyInfo(msg);
2019 CProxy_NodeProxyMgr cnp(thisgroup);
2020 cnp[parentNode].sendProxyListInfo(msg);
2022 for(
int i=0; i<numKidNodes; i++) {
2023 delete remoteProxyLists[i];
static PatchProxyListMsg * createPatchProxyListMsg(PatchProxyListMsg **bufs, int bufSize, ProxyListInfo *info, int size)
◆ createProxyInfo()
void NodeProxyMgr::createProxyInfo |
( |
int |
numPs | ) |
|
|
inline |
◆ createSTForHomePatches()
void NodeProxyMgr::createSTForHomePatches |
( |
PatchMap * |
pmap | ) |
|
Definition at line 1921 of file ProxyMgr.C.
References HOMEPATCH_TREE_BRFACTOR, and PatchMap::numPatchesOnNode().
1923 std::vector<int> nodesWithPatches;
1925 for(
int nodeId=0; nodeId<CkNumNodes(); ++nodeId) {
1927 int firstPe = CkNodeFirst(nodeId);
1928 int endPe = firstPe + CkNodeSize(nodeId);
1929 for(
int pe=firstPe; pe < endPe; ++pe) {
1932 if(hpCnt==0)
continue;
1934 nodesWithPatches.push_back(nodeId);
1935 if(CkMyNode() == nodeId) {
1937 myNodeIdx = nodesWithPatches.size()-1;
1938 numHomePatches = hpCnt;
1939 homepatchRecved = 0;
1955 if(myNodeIdx == 0) {
1959 parentNode = nodesWithPatches[parentIdx];
1964 int totalNodes = nodesWithPatches.size();
1967 if(kidId >= totalNodes)
break;
1970 if(numKidNodes!=0) {
#define HOMEPATCH_TREE_BRFACTOR
int numPatchesOnNode(int node)
◆ getLocalPatchMap()
PatchMap* NodeProxyMgr::getLocalPatchMap |
( |
int |
rank | ) |
|
|
inline |
Definition at line 495 of file ProxyMgr.h.
496 return localPatchMaps[rank];
◆ getLocalProxyMgr()
const CkGroupID& NodeProxyMgr::getLocalProxyMgr |
( |
| ) |
|
|
inline |
Definition at line 489 of file ProxyMgr.h.
490 return localProxyMgr;
◆ getPatchProxyInfo()
Definition at line 482 of file ProxyMgr.h.
483 return proxyInfo[patchID];
◆ recvImmediateProxyAll()
void NodeProxyMgr::recvImmediateProxyAll |
( |
ProxyDataMsg * |
msg | ) |
|
Definition at line 1745 of file ProxyMgr.C.
References proxyTreeNode::numPes, ProxyDataMsg::patch, PatchMap::patch(), and proxyTreeNode::peIDs.
1746 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR) 1747 CProxy_ProxyMgr cp(localProxyMgr);
1749 CmiAssert(ptn->
numPes!=0);
1750 #if defined(PROCTRACE_DEBUG) && defined(NAST_DEBUG) 1752 printf(
"NodePMgr::recvImmPAll for patch[%d] on node %d rank %d, prepare to send proc ", msg->
patch, CkMyNode(), CkMyRank());
1753 for(
int i=0; i<ptn->
numPes; i++) {
1754 printf(
"%d, ", ptn->
peIDs[i]);
1762 int rank = CkRankOf(ptn->
peIDs[0]);
1763 PatchMap *pmap = localPatchMaps[rank];
1766 int npid = ppatch->getSTNNodeChild();
1767 int *pids = ppatch->getSTNodeChildPtr();
1772 if(pids[npid-1]==CkMyNode()) npid--;
1775 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE 1778 PersistentHandle *treephs = ppatch->getSpanningTreePhs(ntreephs);
1779 CmiAssert(treephs && ntreephs >= npid);
1780 CmiUsePersistentHandle(treephs, ntreephs);
1783 CProxy_NodeProxyMgr cnp(thisgroup);
1784 for(
int i=0; i<npid; i++) {
1786 cnp[pids[i]].recvImmediateProxyAll(copymsg);
1788 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE 1789 CmiUsePersistentHandle(NULL, 0);
1793 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK) 1794 msg->isFromImmMsgCall = (CkMyRank()==CkMyNodeSize());
1798 CkAbort(
"Bad execution path to NodeProxyMgr::recvImmediateProxyData\n");
Patch * patch(PatchID pid)
◆ recvImmediateProxyData()
void NodeProxyMgr::recvImmediateProxyData |
( |
ProxyDataMsg * |
msg | ) |
|
Definition at line 1628 of file ProxyMgr.C.
References proxyTreeNode::numPes, ProxyDataMsg::patch, PatchMap::patch(), and proxyTreeNode::peIDs.
1629 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR) 1630 CProxy_ProxyMgr cp(localProxyMgr);
1632 CmiAssert(ptn->
numPes!=0);
1636 int rank = CkRankOf(ptn->
peIDs[0]);
1637 PatchMap *pmap = localPatchMaps[rank];
1640 int npid = ppatch->getSTNNodeChild();
1641 int *pids = ppatch->getSTNodeChildPtr();
1646 if(pids[npid-1]==CkMyNode()) npid--;
1648 CProxy_NodeProxyMgr cnp(thisgroup);
1649 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE 1652 PersistentHandle *treephs = ppatch->getSpanningTreePhs(ntreephs);
1653 CmiAssert(treephs && ntreephs >= npid);
1654 CmiUsePersistentHandle(treephs, ntreephs);
1657 for(
int i=0; i<npid; i++) {
1659 cnp[pids[i]].recvImmediateProxyData(copymsg);
1661 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE 1662 CmiUsePersistentHandle(NULL, 0);
1666 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK) 1667 msg->isFromImmMsgCall = (CkMyRank()==CkMyNodeSize());
1671 CkAbort(
"Bad execution path to NodeProxyMgr::recvImmediateProxyData\n");
Patch * patch(PatchID pid)
◆ recvImmediateResults()
Definition at line 1524 of file ProxyMgr.C.
References ProxyPatch::depositCombinedResultRawMsg(), ProxyPatch::getSpanningTreeParent(), PatchMap::homePatch(), PatchMap::patch(), ProxyCombinedResultRawMsg::patch, and ProxyCombinedResultMsg::toRaw().
1526 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR) 1530 int destRank = CkRankOf(msg->destPe);
1531 PatchMap *pmap = localPatchMaps[destRank];
1534 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK) 1535 msg->isFromImmMsgCall = (CkMyRank()==CkMyNodeSize());
1537 CProxy_ProxyMgr cp(localProxyMgr);
1538 CmiEnableUrgentSend(1);
1539 cp[msg->destPe].recvResults(msg);
1540 CmiEnableUrgentSend(0);
1552 CProxy_NodeProxyMgr cnp(thisgroup);
1555 cnp[CkNodeOf(cMsg->destPe)].recvImmediateResults(cMsg);
Patch * patch(PatchID pid)
HomePatch * homePatch(PatchID pid)
static ProxyCombinedResultRawMsg * toRaw(ProxyCombinedResultMsg *msg)
ProxyCombinedResultMsg * depositCombinedResultRawMsg(ProxyCombinedResultRawMsg *)
int getSpanningTreeParent()
◆ registerLocalPatchMap()
void NodeProxyMgr::registerLocalPatchMap |
( |
int |
rank, |
|
|
PatchMap * |
one |
|
) |
| |
|
inline |
Definition at line 492 of file ProxyMgr.h.
493 localPatchMaps[rank] = one;
◆ registerLocalProxyMgr()
void NodeProxyMgr::registerLocalProxyMgr |
( |
CkGroupID |
one | ) |
|
|
inline |
◆ registerPatch()
void NodeProxyMgr::registerPatch |
( |
int |
patchID, |
|
|
int |
numPes, |
|
|
int * |
pes |
|
) |
| |
◆ sendProxyList()
void NodeProxyMgr::sendProxyList |
( |
int |
pid, |
|
|
int * |
plist, |
|
|
int |
size |
|
) |
| |
◆ sendProxyListInfo()
Definition at line 1994 of file ProxyMgr.C.
References contributeToParent().
1996 CmiLock(localDepositLock);
1997 insertIdx = kidRecved++;
1999 remoteProxyLists[insertIdx] = msg;
2000 if(insertIdx == (numKidNodes-1)) {
2004 CmiUnlock(localDepositLock);
void contributeToParent()
The documentation for this class was generated from the following files: