Basic HTML version of Foils prepared 6 December 96

Foil 23 Cartesian Topology in MPI -- MPI_CART_shift

From Full Matrices - December 4, 1995 CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. by Geoffrey C. Fox, Nancy J. McCracken


Now we can also use the CART functions to define processor neighbors in the 2D grid of processors.
MPI_CART_shift(comm2d, dir=0,disp=-1,sourceproc, top_neighbor)
For each processor, this takes a direction (given here as 0 for columns in C, but would be 1 for columns in Fortran) and a displacement, which is here -1 to go to next highest index.
This returns the two processor ranks for the source and destination of a communication function.



© on Tue Oct 7 1997