MPIX_GetSocketAndCore

Get the socket and Core on which the calling process was running

Synopsis

int MPIX_GetSocketAndCPU(int *nsocket, int *socketrank, int *rankinsocket)

Output Parameters

nsocket
Number of sockets on the node
socketrank
Rank of the socket on which the process is running
rankinsocket
Rank of the core in the socket on which the process is running

Return Value

0 on success and -1 on failure

Notes

The values returned reflect the socket and core that was running the calling process at some time. The runtime system or operating system may move the process to another core or socket. The rankinsocket may not be consecutive; for example, on a Cray XE6, these might be only even values, since it is common to allocate processes to core-modules, which consist of a pair of cores.

Environment Variables

TOPO_CORESPERCHIP
If set to an integer value (as a string), then every socket (processor chip) is considered to have this many cores.
TOPO_CHIPSPERNODE
If set to an integer value (as a string), then every node is considered to have this many chips (sockets).