Function mpi::comm::rank [] [src]

pub fn rank(comm: MPI_Comm) -> Result<i32, Error>

Gets the rank of the process in the communicator. Doesn't "return" rank as a pointer like in C. Replacement for MPI_Comm_rank.

Examples

let rank_in_world = comm::rank(comm::world());
// In C
int rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);