[mpich-discuss] change the rank ordering

Rolf Kuiper kuiper at mpia-hd.mpg.de
Sat Jul 4 03:39:26 CDT 2009


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/b9d4cfc9/attachment.htm>


More information about the mpich-discuss mailing list