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 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

◆ getANewMsg()

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

Definition at line 196 of file ProxyMgr.C.

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

Referenced by ProxyMgr::sendNodeAwareSpanningTreeToHomePatch().

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

◆ printOut()

void ProxyNodeAwareSpanningTreeMsg::printOut ( char *  tag)

Definition at line 217 of file ProxyMgr.C.

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

Referenced by ProxyMgr::recvNodeAwareSpanningTree().

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

Member Data Documentation

◆ allPes

int* ProxyNodeAwareSpanningTreeMsg::allPes

◆ numNodesWithProxies

int ProxyNodeAwareSpanningTreeMsg::numNodesWithProxies

Definition at line 205 of file ProxyMgr.h.

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

◆ numPesOfNode

int* ProxyNodeAwareSpanningTreeMsg::numPesOfNode

Definition at line 206 of file ProxyMgr.h.

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

◆ patch

PatchID ProxyNodeAwareSpanningTreeMsg::patch

◆ procID

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: