BDMPI - Big Data Message Passing Interface  Release 0.1
Functions for further communicator interrogation

Detailed Description

The description of the functions that follow assume that each compute node runs a single instance of the bdmprun master process. In that case, there is a one-to-one mapping between the set of slaves spawn by the bdmprun process and the set of ranks of the BDMPI program that execute on the node. However, when mpiexec assigns multiple instances of bdmprun on the same compute node, then the above mapping does not hold. In such cases, the term node does not correspond to a compute node but to a bdmprun process and the set of ranks that execute on that node correspond to the slave processes spawned by that bdmprun instance.

Functions

int BDMPI_Comm_lsize (BDMPI_Comm comm, int *lsize)
 
int BDMPI_Comm_lrank (BDMPI_Comm comm, int *lrank)
 
int BDMPI_Comm_nsize (BDMPI_Comm comm, int *nsize)
 
int BDMPI_Comm_nrank (BDMPI_Comm comm, int *nrank)
 
int BDMPI_Comm_rrank (BDMPI_Comm comm, int *rrank)
 

Function Documentation

int BDMPI_Comm_lsize ( BDMPI_Comm  comm,
int *  lsize 
)

It is used to get the local size of a communicator. The local size is the number of ranks of the supplied communicator that are assigned to the same node as the calling process. For example, if a communicator has 5, 3, and 8 processes assigned to three different nodes, then the local size of all the processes in the first node will be 5, for the second node will be 3, and for the third node will be 8.

Parameters
[in]commis the communicator being interrogated.
[out]lsizereturns the local size of the calling process in comm.
int BDMPI_Comm_lrank ( BDMPI_Comm  comm,
int *  lrank 
)

It is used to get the local rank of the calling process within the supplied communicator. The local rank of process is the number of lower-ranked processes that are assigned to the same node in the communicator. For example, if comm has 20 ranks and ranks 4, 5, 8, and 15 are assigned to the same node, then the intra-node ranks of these four ranks are 0, 1, 2, and 3, respectively.

Parameters
[in]commis the communicator being interrogated.
[out]lrankreturns the intra-node rank of the calling process in the comm.
int BDMPI_Comm_nsize ( BDMPI_Comm  comm,
int *  nsize 
)

It is used to get the number of nodes used by the processes of the supplied communicator.

Parameters
[in]commis the communicator being interrogated.
[out]nsizereturns the number of nodes used by the union of the ranks in comm.
int BDMPI_Comm_nrank ( BDMPI_Comm  comm,
int *  nrank 
)

It is used to get the rank of the node on which the calling process is assigned.

Parameters
[in]commis the communicator being interrogated.
[out]nrankreturns the rank of the node in comm of the calling process. Note that all the slaves that are assigned to the same node in comm will return the same node rank.
int BDMPI_Comm_rrank ( BDMPI_Comm  comm,
int *  rrank 
)

It is used to get the rank of the process on the same node that has a local rank of 0. This is referred to as root rank. For example, if a communicator has 10 processes that are distributed among three nodes as follows: {0, 1, 2, 3}, {4, 5}, and {6, 7, 8, 9}; then, the root rank for all processes in the first node will be 0, the root rank for all processes in the second node will be 4, whereas for the third node will be 6.

Parameters
[in]commis the communicator being interrogated.
[out]rrankreturns the root rank of calling process in comm.