topoentry_t

Structure containing information about a level of the system topology

Synopsis

typedef struct topoentry_t {
    topoType_t  topoType;      /* e.g., unknown, torus, mesh, bus, tree */
    int         dim;           /* number of dimensions in topology */
    int         nranks;        /* number of ranks (in MPI_COMM_WORLD)
                               within this item.  Only valid for NODE */
    int         *ranks;        /* Ranks within this item; Only valid for NODE */
    topoCoord_t coords;        /* coordinates in topology */
    topoCoord_t maxtopocoords; /* maximum value of valid coordinate in
                               topology */
    topoCoord_t maxcoords;     /* maximum value of valid coordinates */
    topoCoord_t mincoords;     /* minimum value of valid coordinates */
    struct topoentry_t *next;
} topoentry_t;

Notes

This structure may be examined by the user to determine properties of the system topology. Most systems will have at least two levels, with topoType 'TOPO_CORE and TOPO_CHIP. Additional levels may include TOPO_NODE and for systems with a high performance mesh interconnect, TOPO_MESH. Other topology types are defined.

Each level may have siblings (e.g., cores on the same chip), children (e.g., cores of the chip), and parents (e.g., the node hosting a chip). Coordinates are provided to identify siblings. For simple arrangements, such as cores on a chip, this is just a numbering starting from zero; specifically, a one-tuple. For a TOPO_MESH or TOPO_TORUS topology, the coordinates will be an n-tuple, for an n-Dimensional mesh.

The source code for the routine topoPrint shows how to use some of the fields in this structure.