tp_network.cpp 1.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
#include "tp_network.hpp"

#define MAX_IONODES 1

/**********************/
/*  |-- Nodes         */
/**********************/
int Topology::IONodeId () {
  return 0;
}


int Topology::BridgeNodeId () {
  return 0;
}


int Topology::ComputeNodeId () {
  return 0;
}


int Topology::ProcessPerNode () {
  return 12;
}


int Topology::IONodesPerFile ( char* filename, int *nodesList ) {
  return 1;
}


/**********************/
/*  |-- Network       */
/**********************/
int Topology::NetworkDimensions () {
  return 1;
}


/*  |---- Coordinates */
void Topology::RankToCoordinates ( int rank, int* coord ) {
  int size, node, core;
  
  node = rank / this->ProcessPerNode ();
  core = sched_getcpu();

  coord[0] = node;
  coord[1] = core;

  return;
}


void Topology::IONodeCoordinates ( int* coord ) {
  return;
}


/*  |---- Distance    */
int Topology::DistanceToIONode ( int srcRank ) {
  return 1;
}

 
int Topology::DistanceBetweenRanks ( int srcRank, int destRank ) {
  return 1;
}


/*  |---- Routes      */
int Topology::RouteToIONode ( int srcRank, int* path ) {
  return 0;
}


int Topology::RouteBetweenRanks ( int srcRank, int destRank, int* path ) {
  return 0;
}

/*  |---- Links       */
void Topology::LinksList ( int* linksList ) {
  return;
}