Description Usage Arguments Details Value Author(s) References See Also Examples
mpi.cart.shift
shifts the Cartesian topology in both manners, displacement
and direction.
1 | mpi.cart.shift(comm=3, direction, disp)
|
comm |
Communicator with Cartesian structure |
direction |
Coordinate dimension of the shift |
disp |
displacement (>0 for upwards or left shift, <0 for downwards or right shift) |
mpi.cart.shift
provides neighbor ranks from given direction and displacement.
The direction argument indicates the dimension of the shift. direction=1 means the first dim,
direction=2 means the second dim, etc. disp=1 or -1 provides immediate neighbor ranks and disp=2
or -2 provides neighbor's neighbor ranks. Negative ranks mean out of boundary. They correspond to
mpi.proc.null
.
mpi.cart.shift
returns a vector containing information regarding the
rank of the source process and rank of the destination process.
Alek Hunchak and Hao Yu
http://www.lam-mpi.org/, http://www-unix.mcs.anl.gov/mpi/www/www3/
1 2 3 4 5 6 7 8 | ## 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.remote.exec(mpi.cart.shift(3,2,1))#get neighbor ranks
mpi.remote.exec(mpi.cart.shift(3,1,1))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.