<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783"></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=765373802-04072009><FONT color=#0000ff
size=2 face=Arial>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765373802-04072009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765373802-04072009><FONT color=#0000ff
size=2 face=Arial>Rajeev</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> mpich-discuss-bounces@mcs.anl.gov
[mailto:mpich-discuss-bounces@mcs.anl.gov] <B>On Behalf Of </B>Rolf
Kuiper<BR><B>Sent:</B> Friday, July 03, 2009 3:32 PM<BR><B>To:</B>
mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [mpich-discuss] change the rank
ordering<BR></FONT><BR></DIV>
<DIV></DIV>Hi MPICH-users,
<DIV><BR></DIV>
<DIV>to merge to applications I have to create a communicator with coordinates
in a reversed ordering of the coordinates than the default in MPI.</DIV>
<DIV>E.g.: The default MPI layout sets the ranks of the communicators to first
in z than in y than in x direction, like:</DIV>
<DIV><BR></DIV>
<DIV>y</DIV>
<DIV>^<BR>| 2-4-6<BR>| 1-3-5<BR>|--------> x<BR><BR>Now I want to change
the ordering to loop first in x than in y, like:</DIV>
<DIV><BR>y<BR>^<BR>| 4-5-6<BR>| 1-2-3<BR>|--------> x</DIV>
<DIV><BR></DIV>
<DIV>So far I can create a cartesian communicator and test its coords
with </DIV>
<DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(127,0,85)">int</SPAN> dims[3] = {0,0,0};</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(127,0,85)">int</SPAN> ndims=3;</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(100,40,128)">MPI_Dims_create</SPAN>(NumberOfProcessors,
ndims, dims);</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(127,0,85)">int</SPAN> false = 0; <SPAN
style="COLOR: rgb(127,0,85)">int</SPAN> true = 1;</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(127,0,85)">int</SPAN> periods[3] = { false, false, true
};</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(127,0,85)">int</SPAN> reorder = true;</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(0,80,50)">MPI_Comm</SPAN> MyComm;</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(100,40,128)">MPI_Cart_create</SPAN>(MPI_COMM_WORLD, ndims,
dims, periods, reorder, &MyComm);</DIV>
<DIV style="MARGIN: 0px; FONT: 11px Monaco"><SPAN
style="COLOR: rgb(100,40,128)">MPI_Cart_coords</SPAN>(MyComm, LocalRank,
ndims, coords);</DIV></DIV>
<DIV><BR></DIV>
<DIV>But how can I get access to change either the current rank or the
associated coords?</DIV>
<DIV><BR></DIV>
<DIV>Thanks for your help in advance,</DIV>
<DIV>Rolf</DIV></BLOCKQUOTE></BODY></HTML>