#include <ProxyMgr.h>
Definition at line 426 of file ProxyMgr.h.
NodeProxyMgr::NodeProxyMgr |
( |
| ) |
|
|
inline |
Definition at line 450 of file ProxyMgr.h.
References numPatches.
453 localPatchMaps =
new PatchMap *[CkMyNodeSize()];
460 localProxyLists = NULL;
461 remoteProxyLists = NULL;
462 localDepositLock = CmiCreateLock();
463 remoteDepositLock = CmiCreateLock();
NodeProxyMgr::~NodeProxyMgr |
( |
| ) |
|
|
inline |
Definition at line 465 of file ProxyMgr.h.
References numPatches.
466 for(
int i=0; i<numPatches; i++) {
470 delete [] localPatchMaps;
472 CmiDestroyLock(localDepositLock);
473 CmiDestroyLock(remoteDepositLock);
void NodeProxyMgr::contributeToParent |
( |
| ) |
|
Definition at line 2008 of file ProxyMgr.C.
References PatchProxyListMsg::createPatchProxyListMsg().
Referenced by sendProxyList(), and sendProxyListInfo().
2009 if(homepatchRecved!=numHomePatches || kidRecved != numKidNodes)
return;
2011 homepatchRecved = 0;
2015 if(parentNode == -1) {
2017 CProxy_ProxyMgr cp(CkpvAccess(BOCclass_group).proxyMgr);
2018 cp[0].recvPatchProxyInfo(msg);
2020 CProxy_NodeProxyMgr cnp(thisgroup);
2021 cnp[parentNode].sendProxyListInfo(msg);
2023 for(
int i=0; i<numKidNodes; i++) {
2024 delete remoteProxyLists[i];
static PatchProxyListMsg * createPatchProxyListMsg(PatchProxyListMsg **bufs, int bufSize, ProxyListInfo *info, int size)
void NodeProxyMgr::createProxyInfo |
( |
int |
numPs | ) |
|
|
inline |
void NodeProxyMgr::createSTForHomePatches |
( |
PatchMap * |
pmap | ) |
|
Definition at line 1922 of file ProxyMgr.C.
References HOMEPATCH_TREE_BRFACTOR, and PatchMap::numPatchesOnNode().
1924 std::vector<int> nodesWithPatches;
1926 for(
int nodeId=0; nodeId<CkNumNodes(); ++nodeId) {
1928 int firstPe = CkNodeFirst(nodeId);
1929 int endPe = firstPe + CkNodeSize(nodeId);
1930 for(
int pe=firstPe; pe < endPe; ++pe) {
1933 if(hpCnt==0)
continue;
1935 nodesWithPatches.push_back(nodeId);
1936 if(CkMyNode() == nodeId) {
1938 myNodeIdx = nodesWithPatches.size()-1;
1939 numHomePatches = hpCnt;
1940 homepatchRecved = 0;
1956 if(myNodeIdx == 0) {
1960 parentNode = nodesWithPatches[parentIdx];
1965 int totalNodes = nodesWithPatches.size();
1968 if(kidId >= totalNodes)
break;
1971 if(numKidNodes!=0) {
#define HOMEPATCH_TREE_BRFACTOR
int numPatchesOnNode(int node)
PatchMap* NodeProxyMgr::getLocalPatchMap |
( |
int |
rank | ) |
|
|
inline |
Definition at line 495 of file ProxyMgr.h.
496 return localPatchMaps[rank];
const CkGroupID& NodeProxyMgr::getLocalProxyMgr |
( |
| ) |
|
|
inline |
Definition at line 489 of file ProxyMgr.h.
490 return localProxyMgr;
Definition at line 482 of file ProxyMgr.h.
483 return proxyInfo[patchID];
Definition at line 1746 of file ProxyMgr.C.
References proxyTreeNode::numPes, ProxyDataMsg::patch, PatchMap::patch(), and proxyTreeNode::peIDs.
1747 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR)
1748 CProxy_ProxyMgr cp(localProxyMgr);
1750 CmiAssert(ptn->
numPes!=0);
1751 #if defined(PROCTRACE_DEBUG) && defined(NAST_DEBUG)
1753 printf(
"NodePMgr::recvImmPAll for patch[%d] on node %d rank %d, prepare to send proc ", msg->
patch, CkMyNode(), CkMyRank());
1754 for(
int i=0; i<ptn->
numPes; i++) {
1755 printf(
"%d, ", ptn->
peIDs[i]);
1763 int rank = CkRankOf(ptn->
peIDs[0]);
1764 PatchMap *pmap = localPatchMaps[rank];
1767 int npid = ppatch->getSTNNodeChild();
1768 int *pids = ppatch->getSTNodeChildPtr();
1773 if(pids[npid-1]==CkMyNode()) npid--;
1776 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE
1779 PersistentHandle *treephs = ppatch->getSpanningTreePhs(ntreephs);
1780 CmiAssert(treephs && ntreephs >= npid);
1781 CmiUsePersistentHandle(treephs, ntreephs);
1784 CProxy_NodeProxyMgr cnp(thisgroup);
1785 for(
int i=0; i<npid; i++) {
1787 cnp[pids[i]].recvImmediateProxyAll(copymsg);
1789 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE
1790 CmiUsePersistentHandle(NULL, 0);
1794 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK)
1795 msg->isFromImmMsgCall = (CkMyRank()==CkMyNodeSize());
1799 CkAbort(
"Bad execution path to NodeProxyMgr::recvImmediateProxyData\n");
Patch * patch(PatchID pid)
Definition at line 1629 of file ProxyMgr.C.
References proxyTreeNode::numPes, ProxyDataMsg::patch, PatchMap::patch(), and proxyTreeNode::peIDs.
1630 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR)
1631 CProxy_ProxyMgr cp(localProxyMgr);
1633 CmiAssert(ptn->
numPes!=0);
1637 int rank = CkRankOf(ptn->
peIDs[0]);
1638 PatchMap *pmap = localPatchMaps[rank];
1641 int npid = ppatch->getSTNNodeChild();
1642 int *pids = ppatch->getSTNodeChildPtr();
1647 if(pids[npid-1]==CkMyNode()) npid--;
1649 CProxy_NodeProxyMgr cnp(thisgroup);
1650 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE
1653 PersistentHandle *treephs = ppatch->getSpanningTreePhs(ntreephs);
1654 CmiAssert(treephs && ntreephs >= npid);
1655 CmiUsePersistentHandle(treephs, ntreephs);
1658 for(
int i=0; i<npid; i++) {
1660 cnp[pids[i]].recvImmediateProxyData(copymsg);
1662 #if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE
1663 CmiUsePersistentHandle(NULL, 0);
1667 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK)
1668 msg->isFromImmMsgCall = (CkMyRank()==CkMyNodeSize());
1672 CkAbort(
"Bad execution path to NodeProxyMgr::recvImmediateProxyData\n");
Patch * patch(PatchID pid)
Definition at line 1525 of file ProxyMgr.C.
References ProxyPatch::depositCombinedResultRawMsg(), ProxyPatch::getSpanningTreeParent(), PatchMap::homePatch(), PatchMap::patch(), ProxyCombinedResultRawMsg::patch, and ProxyCombinedResultMsg::toRaw().
1527 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR)
1531 int destRank = CkRankOf(msg->destPe);
1532 PatchMap *pmap = localPatchMaps[destRank];
1535 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK)
1536 msg->isFromImmMsgCall = (CkMyRank()==CkMyNodeSize());
1538 CProxy_ProxyMgr cp(localProxyMgr);
1539 CmiEnableUrgentSend(1);
1540 cp[msg->destPe].recvResults(msg);
1541 CmiEnableUrgentSend(0);
1553 CProxy_NodeProxyMgr cnp(thisgroup);
1556 cnp[CkNodeOf(cMsg->destPe)].recvImmediateResults(cMsg);
Patch * patch(PatchID pid)
HomePatch * homePatch(PatchID pid)
static ProxyCombinedResultRawMsg * toRaw(ProxyCombinedResultMsg *msg)
ProxyCombinedResultMsg * depositCombinedResultRawMsg(ProxyCombinedResultRawMsg *)
int getSpanningTreeParent()
void NodeProxyMgr::registerLocalPatchMap |
( |
int |
rank, |
|
|
PatchMap * |
one |
|
) |
| |
|
inline |
Definition at line 492 of file ProxyMgr.h.
493 localPatchMaps[rank] = one;
void NodeProxyMgr::registerLocalProxyMgr |
( |
CkGroupID |
one | ) |
|
|
inline |
void NodeProxyMgr::registerPatch |
( |
int |
patchID, |
|
|
int |
numPes, |
|
|
int * |
pes |
|
) |
| |
void NodeProxyMgr::sendProxyList |
( |
int |
pid, |
|
|
int * |
plist, |
|
|
int |
size |
|
) |
| |
Definition at line 1995 of file ProxyMgr.C.
References contributeToParent().
1997 CmiLock(localDepositLock);
1998 insertIdx = kidRecved++;
2000 remoteProxyLists[insertIdx] = msg;
2001 if(insertIdx == (numKidNodes-1)) {
2005 CmiUnlock(localDepositLock);
void contributeToParent()
The documentation for this class was generated from the following files: