Module mpi::comm [] [src]

Functions

new

Creates an unitialized (on the C side) comm.

Examples

let comm = comm::new();
// In C
MPI_Comm comm;
null

Gives MPI_COMM_NULL. Causes mpi fns to panic when null comm is given as an argument.

rank

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);
slf

Gives MPI_COMM_SELF.

Examples

let rank = comm::rank(comm::slf());
world

Gives MPI_COMM_WORLD.

Examples

let comm_world = comm::world();
let rank_in_world = comm::rank(world);