Basic HTML version of Foils prepared 6 December 96

Foil 20 Cartesian Topology in MPI -- General

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


Under the new MPI cartesian topology, there are two functions which convert between the logical process coordinates, such as [i,j] in our 2D topology, to the (possibly new) 1D topolgy rank number required by the send and receive functions.
MPI_CART_COORDS(comm2d, myrank, 2, coords)
Takes a processor number myrank, in a 2 dim communicator called comm2d, and returns the 2 element vector cooresponding to the [i,j] position of this processor in the new system.
MPI_CART_RANK(comm2d, [i,j], myrank)
Takes a 2 element int array with logical process coordinates i and j and returns a 1D processor rank in the variable myrank.



© on Tue Oct 7 1997