PPL Logo

util/CrayNid.c File Reference

Author: Abhinav S Bhatele Date created: October 10th, 2007. More...

Go to the source code of this file.

Functions

int getXTNodeID (int mpirank, int nummpiranks)
 getXTNodeID returns nodeID corresponding to the MPI rank (possibly obtained from CmiMyNode()/CmiNodeOf(pe)) passed to it
void getDimension (int *maxnid, int *xdim, int *ydim, int *zdim)
int getMeshCoord (int nid, int *x, int *y, int *z)
 getMeshCoord wrapper function for rca_get_meshcoord 0: success, -1: failure
void pidtonid (int numpes)
 pidtonid finds nids for pids 1 to CmiNumPes and stores them in an array correspondingly also creates an array for nids to pids
void craynid_init ()

Variables

CmiNodeLock cray_lock
CmiNodeLock cray_lock2
intpid2nid = NULL
int maxX = -1
int maxY = -1
int maxZ = -1
int maxNID = -1
rca_mesh_coord_t * coords = NULL


Detailed Description

Author: Abhinav S Bhatele Date created: October 10th, 2007.

This file is needed because including the cnos_mpi_os.h in a C++ leads to a compiler error. Hence we have defined a wrapper function here which can be called from C++ files

Definition in file CrayNid.c.


Function Documentation

int getXTNodeID ( int  mpirank,
int  nummpiranks 
)

getXTNodeID returns nodeID corresponding to the MPI rank (possibly obtained from CmiMyNode()/CmiNodeOf(pe)) passed to it

This scheme relies on using IP address to identify physical nodes written by Gengbin Zheng 9/2008.

Definition at line 28 of file CrayNid.c.

References free(), and malloc().

Referenced by CmiInitCPUAffinity(), and LrtsInitCpuTopo().

void getDimension ( int maxnid,
int xdim,
int ydim,
int zdim 
)

int getMeshCoord ( int  nid,
int x,
int y,
int z 
)

getMeshCoord wrapper function for rca_get_meshcoord 0: success, -1: failure

Definition at line 106 of file CrayNid.c.

References CmiAbort(), and coords.

Referenced by getDimension(), XT3TorusManager::XT3TorusManager(), and XTTorusManager::XTTorusManager().

void pidtonid ( int  numpes  ) 

pidtonid finds nids for pids 1 to CmiNumPes and stores them in an array correspondingly also creates an array for nids to pids

Definition at line 134 of file CrayNid.c.

References CmiLock(), CmiNodeOf(), CmiNumCores(), CmiUnlock(), coords, free(), getDimension(), and malloc().

Referenced by craynid_init(), and XT3TorusManager::XT3TorusManager().

void craynid_init (  ) 

Definition at line 236 of file CrayNid.c.

References CmiCreateLock(), CmiMyRank(), and pidtonid().

Referenced by TopoManager_init().


Variable Documentation

Definition at line 22 of file CrayNid.c.

Definition at line 22 of file CrayNid.c.

int* pid2nid = NULL

Definition at line 91 of file CrayNid.c.

int maxX = -1

Definition at line 92 of file CrayNid.c.

Referenced by XT3TorusManager::XT3TorusManager(), and XTTorusManager::XTTorusManager().

int maxY = -1

Definition at line 93 of file CrayNid.c.

Referenced by XT3TorusManager::XT3TorusManager(), and XTTorusManager::XTTorusManager().

int maxZ = -1

Definition at line 94 of file CrayNid.c.

Referenced by XT3TorusManager::XT3TorusManager(), and XTTorusManager::XTTorusManager().

int maxNID = -1

Definition at line 95 of file CrayNid.c.

rca_mesh_coord_t* coords = NULL


Generated on Tue May 15 07:51:30 2012 for Charm++ by  doxygen 1.5.5