#include <TopoManager.h>
Public Member Functions | |
TopoManager () | |
TopoManager (int NX, int NY, int NZ, int NT) | |
~TopoManager () | |
int | getDimNX () const |
int | getDimNY () const |
int | getDimNZ () const |
int | getDimNA () const |
int | getDimNB () const |
int | getDimNC () const |
int | getDimND () const |
int | getDimNE () const |
int | getDimNT () const |
int | getNumDims () const |
int | getDimSize (unsigned int i) const |
bool | haveTopologyInfo () const |
int | getProcsPerNode () const |
bool | hasMultipleProcsPerNode () const |
void | rankToCoordinates (int pe, std::vector< int > &coords) const |
void | rankToCoordinates (int pe, int &x, int &y, int &z, int &t) const |
void | rankToCoordinates (int pe, int &a, int &b, int &c, int &d, int &e, int &t) const |
int | coordinatesToRank (int x, int y, int z, int t) const |
Return pe at specified coordinates, or -1 if doesn't exist. | |
int | coordinatesToRank (int a, int b, int c, int d, int e, int t) const |
Return pe at specified coordinates, or -1 if doesn't exist. | |
int | getHopsBetweenRanks (int pe1, int pe2) const |
int | getHopsBetweenRanks (int *pe1, int pe2) const |
void | sortRanksByHops (int pe, int *pes, int *idx, int n) const |
void | sortRanksByHops (int *pe, int *pes, int *idx, int n) const |
int | pickClosestRank (int mype, int *pes, int n) const |
int | areNeighbors (int pe1, int pe2, int pe3, int distance) const |
void | printAllocation (FILE *fp) const |
int | getDimX () const |
The next 5 functions are only there for backward compatibility and should not be used. | |
int | getDimY () const |
int | getDimZ () const |
void | rankToCoordinates (int pe, int &x, int &y, int &z) const |
int | coordinatesToRank (int x, int y, int z) const |
int | absX (int x) const |
int | absY (int y) const |
int | absZ (int z) const |
int | absA (int a) const |
int | absB (int b) const |
int | absC (int c) const |
int | absD (int d) const |
int | absE (int e) const |
Static Public Member Functions | |
static TopoManager * | getTopoManager () |
Private Attributes | |
int | dimX |
int | dimY |
int | dimZ |
int | dimNX |
int | dimNY |
int | dimNZ |
int | dimNT |
int | numPes |
int | torusX |
int | torusY |
int | torusZ |
int | torusT |
int | dimNA |
int | dimNB |
int | dimNC |
int | dimND |
int | dimNE |
int | torusA |
int | torusB |
int | torusC |
int | torusD |
int | torusE |
int | procsPerNode |
BGQTorusManager | bgqtm |
XTTorusManager | xttm |
Definition at line 75 of file TopoManager.h.
TopoManager::TopoManager | ( | ) |
Definition at line 32 of file TopoManager.C.
References bgqtm, CmiNumPesOnPhysicalNode(), CmiNumPhysicalNodes(), dimNA, dimNB, dimNC, dimND, dimNE, dimNT, dimNX, dimNY, dimNZ, dimX, dimY, dimZ, BGQTorusManager::getDimNA(), BGQTorusManager::getDimNB(), BGQTorusManager::getDimNC(), BGQTorusManager::getDimND(), BGQTorusManager::getDimNE(), XTTorusManager::getDimNT(), BGQTorusManager::getDimNT(), XTTorusManager::getDimNX(), BGQTorusManager::getDimNX(), XTTorusManager::getDimNY(), BGQTorusManager::getDimNY(), XTTorusManager::getDimNZ(), BGQTorusManager::getDimNZ(), XTTorusManager::getDimX(), BGQTorusManager::getDimX(), XTTorusManager::getDimY(), BGQTorusManager::getDimY(), XTTorusManager::getDimZ(), BGQTorusManager::getDimZ(), XTTorusManager::getProcsPerNode(), BGQTorusManager::getProcsPerNode(), XTTorusManager::isTorus(), BGQTorusManager::isTorus(), n, numPes, procsPerNode, torusA, torusB, torusC, torusD, torusE, torusT, torusX, torusY, torusZ, and xttm.
TopoManager::~TopoManager | ( | ) | [inline] |
Definition at line 79 of file TopoManager.h.
TopoManager * TopoManager::getTopoManager | ( | ) | [static] |
Definition at line 410 of file TopoManager.C.
Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::numHops(), and ST_RecursivePartition< Iterator >::ST_RecursivePartition().
int TopoManager::getDimNX | ( | ) | const [inline] |
Definition at line 88 of file TopoManager.h.
References dimNX.
Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), getDimSize(), TopoManager_init(), and ScotchTopoLB::work().
int TopoManager::getDimNY | ( | ) | const [inline] |
Definition at line 89 of file TopoManager.h.
References dimNY.
Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), getDimSize(), TopoManager_init(), and ScotchTopoLB::work().
int TopoManager::getDimNZ | ( | ) | const [inline] |
Definition at line 90 of file TopoManager.h.
References dimNZ.
Referenced by topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), getDimSize(), TopoManager_init(), and ScotchTopoLB::work().
int TopoManager::getDimNA | ( | ) | const [inline] |
Definition at line 92 of file TopoManager.h.
References dimNA.
Referenced by getDimSize(), and TopoManager_init().
int TopoManager::getDimNB | ( | ) | const [inline] |
Definition at line 93 of file TopoManager.h.
References dimNB.
Referenced by getDimSize(), and TopoManager_init().
int TopoManager::getDimNC | ( | ) | const [inline] |
Definition at line 94 of file TopoManager.h.
References dimNC.
Referenced by getDimSize(), and TopoManager_init().
int TopoManager::getDimND | ( | ) | const [inline] |
Definition at line 95 of file TopoManager.h.
References dimND.
Referenced by getDimSize(), and TopoManager_init().
int TopoManager::getDimNE | ( | ) | const [inline] |
Definition at line 96 of file TopoManager.h.
References dimNE.
Referenced by getDimSize(), and TopoManager_init().
int TopoManager::getDimNT | ( | ) | const [inline] |
Definition at line 98 of file TopoManager.h.
References dimNT.
Referenced by TopoManager_init().
int TopoManager::getNumDims | ( | ) | const [inline] |
Definition at line 99 of file TopoManager.h.
Referenced by ST_RecursivePartition< Iterator >::maxSpreadDimension(), rankToCoordinates(), ST_RecursivePartition< Iterator >::ST_RecursivePartition(), and ST_RecursivePartition< Iterator >::translateCoordinates().
Definition at line 106 of file TopoManager.h.
References getDimNA(), getDimNB(), getDimNC(), getDimND(), getDimNE(), getDimNX(), getDimNY(), and getDimNZ().
Referenced by ST_RecursivePartition< Iterator >::ST_RecursivePartition(), and ST_RecursivePartition< Iterator >::translateCoordinates().
bool TopoManager::haveTopologyInfo | ( | ) | const [inline] |
Definition at line 127 of file TopoManager.h.
Referenced by ST_RecursivePartition< Iterator >::bisect(), ST_RecursivePartition< Iterator >::build(), ST_RecursivePartition< Iterator >::maxSpreadDimension(), ST_RecursivePartition< Iterator >::PhyNode< Iterator >::PhyNode(), ST_RecursivePartition< Iterator >::ST_RecursivePartition(), and ST_RecursivePartition< Iterator >::trisect().
int TopoManager::getProcsPerNode | ( | ) | const [inline] |
bool TopoManager::hasMultipleProcsPerNode | ( | ) | const [inline] |
Definition at line 133 of file TopoManager.C.
References getNumDims().
Referenced by areNeighbors(), topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), getHopsBetweenRanks(), LrtsInitCpuTopo(), ST_RecursivePartition< Iterator >::PhyNode< Iterator >::PhyNode(), printAllocation(), sortRanksByHops(), and TopoManager_init().
Definition at line 176 of file TopoManager.C.
References bgqtm, CmiPhysicalNodeID(), CmiPhysicalRank(), dimNT, dimNX, dimNY, numPes, XTTorusManager::rankToCoordinates(), BGQTorusManager::rankToCoordinates(), and xttm.
void TopoManager::rankToCoordinates | ( | int | pe, | |
int & | a, | |||
int & | b, | |||
int & | c, | |||
int & | d, | |||
int & | e, | |||
int & | t | |||
) | const |
Definition at line 212 of file TopoManager.C.
References bgqtm, numPes, and BGQTorusManager::rankToCoordinates().
Return pe at specified coordinates, or -1 if doesn't exist.
Definition at line 239 of file TopoManager.C.
References bgqtm, CmiGetFirstPeOnPhysicalNode(), CmiNumPesOnPhysicalNode(), XTTorusManager::coordinatesToRank(), BGQTorusManager::coordinatesToRank(), dimNT, dimNX, dimNY, and xttm.
Referenced by LrtsInitCpuTopo(), ReadFileMap::registerArray(), and TopoManager_init().
Return pe at specified coordinates, or -1 if doesn't exist.
Definition at line 264 of file TopoManager.C.
References bgqtm, BGQTorusManager::coordinatesToRank(), and dimNT.
Definition at line 271 of file TopoManager.C.
References absA(), absB(), absC(), absD(), absE(), absX(), absY(), absZ(), e1, numPes, and rankToCoordinates().
Referenced by CompareRankDist::CompareRankDist(), ST_RecursivePartition< Iterator >::PhyNode< Iterator >::distance(), topo::numHops(), pickClosestRank(), and TopoManager_init().
Definition at line 301 of file TopoManager.C.
References rankToCoordinates().
Definition at line 314 of file TopoManager.C.
References sort().
Definition at line 321 of file TopoManager.C.
References getHopsBetweenRanks().
void TopoManager::printAllocation | ( | FILE * | fp | ) | const |
Definition at line 365 of file TopoManager.C.
References PUP::a, PUP::b, c, CmiNodeOf(), PUP::d, dimNA, dimNB, dimNC, dimND, dimNE, numPes, rankToCoordinates(), and PUP::t.
Referenced by TopoManager_init().
int TopoManager::getDimX | ( | ) | const [inline] |
The next 5 functions are only there for backward compatibility and should not be used.
Definition at line 159 of file TopoManager.h.
References dimX.
int TopoManager::getDimY | ( | ) | const [inline] |
int TopoManager::getDimZ | ( | ) | const [inline] |
Definition at line 142 of file TopoManager.C.
References CmiPhysicalNodeID(), dimX, dimY, numPes, XTTorusManager::rankToCoordinates(), PUP::t, and xttm.
Definition at line 218 of file TopoManager.C.
References CmiGetFirstPeOnPhysicalNode(), XTTorusManager::coordinatesToRank(), dimX, dimY, dimZ, and xttm.
Definition at line 165 of file TopoManager.h.
References abs(), dimNX, and torusX.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 175 of file TopoManager.h.
References abs(), dimNY, and torusY.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 185 of file TopoManager.h.
References abs(), dimNZ, and torusZ.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 195 of file TopoManager.h.
References abs(), dimNA, sa, and torusA.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 205 of file TopoManager.h.
References abs(), dimNB, and torusB.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 215 of file TopoManager.h.
References abs(), dimNC, and torusC.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 225 of file TopoManager.h.
References abs(), dimND, and torusD.
Referenced by areNeighbors(), and getHopsBetweenRanks().
Definition at line 235 of file TopoManager.h.
Referenced by areNeighbors(), and getHopsBetweenRanks().
int TopoManager::dimX [private] |
Definition at line 243 of file TopoManager.h.
Referenced by coordinatesToRank(), getDimX(), rankToCoordinates(), and TopoManager().
int TopoManager::dimY [private] |
Definition at line 244 of file TopoManager.h.
Referenced by coordinatesToRank(), getDimY(), rankToCoordinates(), and TopoManager().
int TopoManager::dimZ [private] |
Definition at line 245 of file TopoManager.h.
Referenced by coordinatesToRank(), getDimZ(), and TopoManager().
int TopoManager::dimNX [private] |
Definition at line 246 of file TopoManager.h.
Referenced by absX(), coordinatesToRank(), getDimNX(), rankToCoordinates(), and TopoManager().
int TopoManager::dimNY [private] |
Definition at line 247 of file TopoManager.h.
Referenced by absY(), coordinatesToRank(), getDimNY(), rankToCoordinates(), and TopoManager().
int TopoManager::dimNZ [private] |
int TopoManager::dimNT [private] |
Definition at line 249 of file TopoManager.h.
Referenced by coordinatesToRank(), getDimNT(), rankToCoordinates(), and TopoManager().
int TopoManager::numPes [private] |
Definition at line 250 of file TopoManager.h.
Referenced by getHopsBetweenRanks(), printAllocation(), rankToCoordinates(), and TopoManager().
int TopoManager::torusX [private] |
int TopoManager::torusY [private] |
int TopoManager::torusZ [private] |
int TopoManager::torusT [private] |
int TopoManager::dimNA [private] |
Definition at line 253 of file TopoManager.h.
Referenced by absA(), getDimNA(), printAllocation(), and TopoManager().
int TopoManager::dimNB [private] |
Definition at line 253 of file TopoManager.h.
Referenced by absB(), getDimNB(), printAllocation(), and TopoManager().
int TopoManager::dimNC [private] |
Definition at line 253 of file TopoManager.h.
Referenced by absC(), getDimNC(), printAllocation(), and TopoManager().
int TopoManager::dimND [private] |
Definition at line 253 of file TopoManager.h.
Referenced by absD(), getDimND(), printAllocation(), and TopoManager().
int TopoManager::dimNE [private] |
Definition at line 253 of file TopoManager.h.
Referenced by absE(), getDimNE(), printAllocation(), and TopoManager().
int TopoManager::torusA [private] |
int TopoManager::torusB [private] |
int TopoManager::torusC [private] |
int TopoManager::torusD [private] |
int TopoManager::torusE [private] |
int TopoManager::procsPerNode [private] |
Definition at line 256 of file TopoManager.h.
Referenced by getProcsPerNode(), hasMultipleProcsPerNode(), and TopoManager().
BGQTorusManager TopoManager::bgqtm [private] |
Definition at line 258 of file TopoManager.h.
Referenced by coordinatesToRank(), rankToCoordinates(), and TopoManager().
XTTorusManager TopoManager::xttm [private] |
Definition at line 260 of file TopoManager.h.
Referenced by coordinatesToRank(), rankToCoordinates(), and TopoManager().