root/ompi/mca/io/romio321/romio/adio/ad_gpfs/bg/ad_bg_pset.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* ---------------------------------------------------------------- */
   2 /* (C)Copyright IBM Corp.  2007, 2008                               */
   3 /* ---------------------------------------------------------------- */
   4 /**
   5  * \file ad_bg_pset.h
   6  * \brief ???
   7  */
   8 
   9 /* File: ad_bg_pset.h
  10  *
  11  * Defines two structures that keep BlueGene PSET specific information and their public interfaces:
  12  *      . ADIOI_BG_ProcInfo_t object keeps specific information to each process
  13  *      . ADIOI_BG_ConfInfo_t object keeps general information for the whole communicator, only kept
  14  *        on process 0.
  15  */
  16 
  17 #ifndef AD_BG_PSET_H_
  18 #define AD_BG_PSET_H_
  19 
  20 
  21 /* Keeps specific information to each process, will be exchanged among processes */
  22 typedef struct {
  23    int ioNodeIndex; /* similar to psetNum on BGL/BGP */
  24    int rank; /* my rank */
  25    int ionID;  /* ion id this cn is using */
  26 /*   int myCoords[5]; */
  27    int bridgeRank; /* my bridge node (or proxy) rank */
  28    unsigned char threadID; /* unlikely to be useful but better than just padding */
  29    unsigned char __cpad[2];
  30    int myIOSize;  /* number of ranks sharing my bridge/IO
  31       node, i.e. psetsize*/
  32    int iamBridge; /* am *I* the bridge rank? */
  33    int __ipad[2];
  34    unsigned nodeRank; /* torus coords converted to an integer for use with gpfsmpio_bridgeringagg */
  35    unsigned numNodesInPartition; /* number of physical nodes in the job partition */
  36    unsigned manhattanDistanceToBridge; /* number of hops between this rank and the bridge node */
  37 } ADIOI_BG_ProcInfo_t __attribute__((aligned(16)));
  38 
  39 /* Keeps general information for the whole communicator, only on process 0 */
  40 typedef struct {
  41    int ioMinSize; /* Smallest number of ranks shareing 1 bridge node */
  42    int ioMaxSize; /* Largest number of ranks sharing 1 bridge node */
  43    /* ioMaxSize will be the "psetsize" */
  44    int nAggrs;
  45    int numBridgeRanks;
  46    /*int virtualPsetSize; ppn * pset size */
  47    int nProcs;
  48    int cpuIDsize; /* num ppn */
  49    float aggRatio;
  50 
  51 } ADIOI_BG_ConfInfo_t __attribute__((aligned(16)));
  52 
  53 
  54 #undef MIN
  55 #define MIN(a,b) (((a)<(b) ? (a) : (b)))
  56 
  57 
  58 
  59 
  60 /* public funcs for ADIOI_BG_ProcInfo_t objects */
  61     ADIOI_BG_ProcInfo_t * ADIOI_BG_ProcInfo_new();
  62     ADIOI_BG_ProcInfo_t * ADIOI_BG_ProcInfo_new_n( int n );
  63     void ADIOI_BG_ProcInfo_free( ADIOI_BG_ProcInfo_t *info );
  64 
  65 
  66 /* public funcs for ADIOI_BG_ConfInfo_t objects */
  67     ADIOI_BG_ConfInfo_t * ADIOI_BG_ConfInfo_new ();
  68     void ADIOI_BG_ConfInfo_free( ADIOI_BG_ConfInfo_t *info );
  69 
  70 
  71 /* public funcs for a pair of ADIOI_BG_ConfInfo_t and ADIOI_BG_ProcInfo_t objects */
  72     int BGQ_IO_node_id ();
  73     void ADIOI_BG_persInfo_init( ADIOI_BG_ConfInfo_t *conf,
  74                                   ADIOI_BG_ProcInfo_t *proc,
  75                                   int s, int r, int n_aggrs, MPI_Comm comm);
  76     void ADIOI_BG_persInfo_free( ADIOI_BG_ConfInfo_t *conf,
  77                                   ADIOI_BG_ProcInfo_t *proc );
  78 
  79 
  80 #endif  /* AD_BG_PSET_H_ */

/* [<][>][^][v][top][bottom][index][help] */