NAMD
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ProxyNodeAwareSpanningTreeMsg Class Reference

#include <ProxyMgr.h>

Inheritance diagram for ProxyNodeAwareSpanningTreeMsg:

Public Member Functions

void printOut (char *tag)
 

Static Public Member Functions

static
ProxyNodeAwareSpanningTreeMsg
getANewMsg (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().

197  {
198  int numAllPes = 0;
199  for(int i=0; i<size; i++) {
200  numAllPes += tree[i].numPes;
201  }
202  ProxyNodeAwareSpanningTreeMsg *retmsg = new(size, numAllPes, 0) ProxyNodeAwareSpanningTreeMsg;
203  retmsg->patch = pid;
204  retmsg->procID = nid;
205  retmsg->numNodesWithProxies = size;
206  int *pAllPes = retmsg->allPes;
207  for(int i=0; i<size; i++) {
208  retmsg->numPesOfNode[i] = tree[i].numPes;
209  for(int j=0; j<tree[i].numPes; j++) {
210  *pAllPes = tree[i].peIDs[j];
211  pAllPes++;
212  }
213  }
214  return retmsg;
215 }
void ProxyNodeAwareSpanningTreeMsg::printOut ( char *  tag)

Definition at line 218 of file ProxyMgr.C.

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

Referenced by ProxyMgr::recvNodeAwareSpanningTree().

218  {
219 #ifdef PROCTRACE_DEBUG
220  DebugFileTrace *dft = DebugFileTrace::Object();
221  dft->openTrace();
222  const char *patchname = "ProxyPatch";
223  if(procID == CkMyPe()) patchname = "HomePatch";
224  dft->writeTrace("%s: %s[%d] on proc %d node %d has ST (src %d) with %d nodes\n",
225  tag, patchname, patch, CkMyPe(), CkMyNode(), procID, numNodesWithProxies);
226  if(numNodesWithProxies==0) {
227  dft->closeTrace();
228  return;
229  }
230  dft->writeTrace("%s: ===%d===pes/node: ", tag, patch);
231  for(int i=0; i<numNodesWithProxies; i++) {
232  dft->writeTrace("%d ", numPesOfNode[i]);
233  }
234  dft->writeTrace("\n%s: ===%d===pe list: ", tag, patch);
235  int *p = allPes;
236  for(int i=0; i<numNodesWithProxies; i++) {
237  for(int j=0; j<numPesOfNode[i]; j++) {
238  dft->writeTrace("%d ", *p);
239  p++;
240  }
241  }
242  dft->writeTrace("\n");
243  dft->closeTrace();
244 #endif
245 }

Member Data Documentation

int* ProxyNodeAwareSpanningTreeMsg::allPes
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
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: