mpi.cart.rank
translates a Cartesian topology coordinate to its rank.
mpi.cart.rank(comm=3, coords)
Communicator with Cartesian structure
Specifies the Cartesian coordinates of a process
mpi.cart.rank
returns the rank of the specified process.
For a process group with a Cartesian topology, this function translates the logical
process coordinates to process ranks as they are used by the point-to-point routines.
It is the inverse map of mpi.cart.coords
.
# NOT RUN {
#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.rank(3,c(1,0))
# }
Run the code above in your browser using DataLab