20 #include "ProxyMgr.decl.h" 26 #if CMK_PERSISTENT_COMM 27 #define USE_PERSISTENT_TREE 0 91 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY 92 class ProxyDataMsg_not_32_byte :
public CMessage_ProxyDataMsg {
125 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR) && (CMK_SMP) && defined(NAMDSRC_IMMQD_HACK) 140 char isFromImmMsgCall;
144 #if NAMD_SeparateWaters != 0 151 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY 155 char padding[(32-(
sizeof(envelope)+
sizeof(ProxyDataMsg_not_32_byte))%32)%32];
157 class assert_ProxyDataMsg {
158 char assert_sizeof_envelope_is_multiple_of_ptr[(
sizeof(envelope)%
sizeof(
void*))?-1:1];
159 char assert_sizeof_ProxyDataMsg_is_multiple_of_32[((
sizeof(envelope)+
sizeof(
ProxyDataMsg))%32)?-1:1];
197 char assert_sizeof_envelope_is_multiple_of_ptr[(
sizeof(envelope)%
sizeof(
void*))?-1:1];
198 char assert_sizeof_ProxyResultVarsizeMsg_is_multiple_of_8[((
sizeof(envelope)+
sizeof(
ProxyResultVarsizeMsg))%8)?-1:1];
212 void printOut(
char *tag);
220 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR) 224 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK) 228 char isFromImmMsgCall;
241 #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR) 245 #if CMK_SMP && defined(NAMDSRC_IMMQD_HACK) 249 char isFromImmMsgCall;
278 int hash()
const {
return patchID; }
292 #ifdef NODEAWARE_PROXY_SPANNINGTREE 305 #ifdef NODEAWARE_PROXY_SPANNINGTREE 322 void removeProxies(
void);
323 void removeUnusedProxies(
void);
324 void createProxies(
void);
329 void registerProxy(
PatchID pid);
332 void unregisterProxy(
PatchID pid);
335 void setSendSpanning();
336 int getSendSpanning();
338 void setRecvSpanning();
339 int getRecvSpanning();
341 void setProxyTreeBranchFactor(
int dim);
343 void buildProxySpanningTree();
344 void sendSpanningTrees();
345 void sendSpanningTreeToHomePatch(
int pid,
int *tree,
int n);
346 void recvSpanningTreeOnHomePatch(
int pid,
int *tree,
int n);
350 void sendNodeAwareSpanningTreeToHomePatch(
int pid,
proxyTreeNode *tree,
int n);
355 void recvNodeAwareSTParent(
int patch,
int parent);
357 void buildProxySpanningTree2();
358 void sendProxies(
int pid,
int *list,
int n);
359 void recvProxies(
int pid,
int *list,
int n);
362 #ifdef NODEAWARE_PROXY_SPANNINGTREE 363 void buildNodeAwareSpanningTree0();
364 static void buildSinglePatchNodeAwareSpanningTree(
PatchID pid,
NodeIDList &proxyList,
367 void buildSpanningTree0();
405 void printProxySpanningTree();
434 CkGroupID localProxyMgr;
446 CmiNodeLock localDepositLock;
447 CmiNodeLock remoteDepositLock;
453 localPatchMaps =
new PatchMap *[CkMyNodeSize()];
460 localProxyLists = NULL;
461 remoteProxyLists = NULL;
462 localDepositLock = CmiCreateLock();
463 remoteDepositLock = CmiCreateLock();
466 for(
int i=0; i<numPatches; i++) {
470 delete [] localPatchMaps;
472 CmiDestroyLock(localDepositLock);
473 CmiDestroyLock(remoteDepositLock);
481 void registerPatch(
int patchID,
int numPes,
int *pes);
483 return proxyInfo[patchID];
490 return localProxyMgr;
493 localPatchMaps[rank] = one;
496 return localPatchMaps[rank];
504 void createSTForHomePatches(
PatchMap *pmap);
506 void sendProxyList(
int pid,
int *plist,
int size);
509 void contributeToParent();
void registerLocalProxyMgr(CkGroupID one)
static ProxyMgr * Object()
proxyTreeNode * getPatchProxyInfo(int patchID)
CompAtom * avgPositionList
void registerLocalPatchMap(int rank, PatchMap *one)
UniqueSet< ProxyElem > ProxySet
void recvData(DataMessage *dmsg)
const CkGroupID & getLocalProxyMgr()
void createProxyInfo(int numPs)
UniqueSetIter< ProxyElem > ProxySetIter
ProxyElem(PatchID pid, ProxyPatch *p)
CompAtomExt * positionExtList
int operator==(const ProxyElem &pe) const
PatchProxyListMsg(int num)
PatchMap * getLocalPatchMap(int rank)