Learn R Programming

npRmpi (version 0.60-20)

mpi.cart.coords: MPI_Cart_coords

Description

mpi.cart.coords translates a rank to its Cartesian topology coordinate.

Usage

mpi.cart.coords(comm=3, rank, maxdims)

Value

mpi.cart.coords returns an integer array containing the Cartesian coordinates of a specified process.

Arguments

comm

Communicator with Cartesian structure

rank

rank of a process within group

maxdims

length of vector coord in the calling program

Author

Alek Hunchak and Hao Yu

Details

This function is the rank-to-coordinates translator. It is the inverse map of mpi.cart.rank. maxdims is at least as big as ndims as returned by mpi.cartdim.get.

References

https://www.mpich.org/, https://www.mpich.org/static/docs/latest/www3/

See Also

mpi.cart.rank

Examples

Run this code
if (FALSE) {
# Not run in checks: requires a Cartesian communicator built from spawned slaves.
#Need at least 9 slaves
mpi.bcast.cmd(mpi.cart.create(1,c(3,3),c(F,T)))
mpi.cart.create(1,c(3,3),c(F,T))
mpi.cart.coords(3,4,2)
}

Run the code above in your browser using DataLab