[mpich-discuss] change the rank ordering

Rajeev Thakur thakur at mcs.anl.gov
Sat Jul 4 09:32:58 CDT 2009


As Dorian said, you can do the calculations yourself in your program to give rank 0 coordinates 000, rank 1 coordinates 100, rank 2
coordinates 200, and so on. Those are all virtual coordinates anyway.
 
Rajeev
 


  _____  

From: mpich-discuss-bounces at mcs.anl.gov [mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Rolf Kuiper
Sent: Saturday, July 04, 2009 3:39 AM
To: mpich-discuss at mcs.anl.gov
Subject: Re: [mpich-discuss] change the rank ordering


Sounds great! But how? 
Rolf

Am 04.07.2009 um 04:40 schrieb Rajeev Thakur:

As pg 243 of the MPI 2.1 standard says, MPI assumes a row-major ordering of processes for cartesian topologies. If you need a
different ordering such as column major, you probably don't want to use the cartesian topology functions. You can do the mapping
yourself.
 
Rajeev


  _____  

From: mpich-discuss-bounces at mcs.anl.gov [mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Rolf Kuiper
Sent: Friday, July 03, 2009 3:32 PM
To: mpich-discuss at mcs.anl.gov
Subject: [mpich-discuss] change the rank ordering


Hi MPICH-users, 

to merge to applications I have to create a communicator with coordinates in a reversed ordering of the coordinates than the default
in MPI.
E.g.: The default MPI layout sets the ranks of the communicators to first in z than in y than in x direction, like:

y
^
| 2-4-6
| 1-3-5
|--------> x

Now I want to change the ordering to loop first in x than in y, like:

y
^
| 4-5-6
| 1-2-3
|--------> x

So far I can create a cartesian communicator and test its coords with 
int dims[3] = {0,0,0};
int ndims=3;
MPI_Dims_create(NumberOfProcessors, ndims, dims);
int false = 0; int true = 1;
int periods[3] = { false, false, true };
int reorder = true;
MPI_Comm MyComm;
MPI_Cart_create(MPI_COMM_WORLD, ndims, dims, periods, reorder, &MyComm);
MPI_Cart_coords(MyComm, LocalRank, ndims, coords);

But how can I get access to change either the current rank or the associated coords?

Thanks for your help in advance,
Rolf


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20090704/d2e4a061/attachment-0001.htm>


More information about the mpich-discuss mailing list