ProxyNodeAwareSpanningTreeMsg Class Reference

#include <ProxyMgr.h>

List of all members.

Public Member Functions

void printOut (char *tag)

Static Public Member Functions

static ProxyNodeAwareSpanningTreeMsggetANewMsg (PatchID pid, NodeID nid, proxyTreeNode *tree, int size)

Public Attributes

PatchID patch
NodeID procID
int numNodesWithProxies
int * numPesOfNode
int * allPes


Detailed Description

Definition at line 201 of file ProxyMgr.h.


Member Function Documentation

ProxyNodeAwareSpanningTreeMsg * ProxyNodeAwareSpanningTreeMsg::getANewMsg ( PatchID  pid,
NodeID  nid,
proxyTreeNode tree,
int  size 
) [static]

Definition at line 197 of file ProxyMgr.C.

References allPes, numNodesWithProxies, proxyTreeNode::numPes, numPesOfNode, patch, proxyTreeNode::peIDs, and procID.

Referenced by ProxyMgr::sendNodeAwareSpanningTreeToHomePatch().

00197                                                                                                                               {
00198     int numAllPes = 0;
00199     for(int i=0; i<size; i++) {
00200         numAllPes += tree[i].numPes;
00201     }
00202     ProxyNodeAwareSpanningTreeMsg *retmsg = new(size, numAllPes, 0) ProxyNodeAwareSpanningTreeMsg;
00203     retmsg->patch = pid;
00204     retmsg->procID = nid;
00205     retmsg->numNodesWithProxies = size;
00206     int *pAllPes = retmsg->allPes;
00207     for(int i=0; i<size; i++) {
00208         retmsg->numPesOfNode[i] = tree[i].numPes;
00209         for(int j=0; j<tree[i].numPes; j++) {
00210             *pAllPes = tree[i].peIDs[j];
00211             pAllPes++;
00212         }
00213     }
00214     return retmsg;
00215 }

void ProxyNodeAwareSpanningTreeMsg::printOut ( char *  tag  ) 

Definition at line 218 of file ProxyMgr.C.

References allPes, numNodesWithProxies, numPesOfNode, patch, and procID.

Referenced by ProxyMgr::recvNodeAwareSpanningTree().

00218                                                      {
00219 #ifdef PROCTRACE_DEBUG
00220     DebugFileTrace *dft = DebugFileTrace::Object();
00221     dft->openTrace();
00222     const char *patchname = "ProxyPatch";
00223     if(procID == CkMyPe()) patchname = "HomePatch";
00224     dft->writeTrace("%s: %s[%d] on proc %d node %d has ST (src %d) with %d nodes\n", 
00225                     tag, patchname, patch, CkMyPe(), CkMyNode(), procID, numNodesWithProxies);
00226     if(numNodesWithProxies==0) {
00227         dft->closeTrace();
00228         return;
00229     }
00230     dft->writeTrace("%s: ===%d===pes/node: ", tag, patch);
00231     for(int i=0; i<numNodesWithProxies; i++) {
00232         dft->writeTrace("%d ", numPesOfNode[i]);
00233     }
00234     dft->writeTrace("\n%s: ===%d===pe list: ", tag, patch);
00235     int *p = allPes;
00236     for(int i=0; i<numNodesWithProxies; i++) {
00237         for(int j=0; j<numPesOfNode[i]; j++) {
00238             dft->writeTrace("%d ", *p);
00239             p++;
00240         }
00241     }
00242     dft->writeTrace("\n");    
00243     dft->closeTrace();
00244 #endif
00245 }


Member Data Documentation

int* ProxyNodeAwareSpanningTreeMsg::allPes

Definition at line 207 of file ProxyMgr.h.

Referenced by getANewMsg(), printOut(), ProxyMgr::recvNodeAwareSpanningTree(), and ProxyMgr::sendNodeAwareSpanningTree().

int ProxyNodeAwareSpanningTreeMsg::numNodesWithProxies

Definition at line 205 of file ProxyMgr.h.

Referenced by getANewMsg(), printOut(), and ProxyMgr::recvNodeAwareSpanningTree().

int* ProxyNodeAwareSpanningTreeMsg::numPesOfNode

Definition at line 206 of file ProxyMgr.h.

Referenced by getANewMsg(), printOut(), and ProxyMgr::recvNodeAwareSpanningTree().

PatchID ProxyNodeAwareSpanningTreeMsg::patch

Definition at line 203 of file ProxyMgr.h.

Referenced by getANewMsg(), printOut(), ProxyMgr::recvNodeAwareSpanningTree(), ProxyMgr::recvNodeAwareSpanningTreeOnHomePatch(), and ProxyMgr::sendNodeAwareSpanningTree().

NodeID ProxyNodeAwareSpanningTreeMsg::procID

Definition at line 204 of file ProxyMgr.h.

Referenced by getANewMsg(), printOut(), and ProxyMgr::recvNodeAwareSpanningTree().


The documentation for this class was generated from the following files:
Generated on Mon Sep 25 01:17:19 2017 for NAMD by  doxygen 1.4.7