<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sounds great! But how?<div>Rolf</div><div><br><div><div>Am 04.07.2009 um 04:40 schrieb Rajeev Thakur:</div><blockquote type="cite"> <div 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>&nbsp;</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   [<a href="mailto:mpich-discuss-bounces@mcs.anl.gov">mailto:mpich-discuss-bounces@mcs.anl.gov</a>] <b>On Behalf Of </b>Rolf   Kuiper<br><b>Sent:</b> Friday, July 03, 2009 3:32 PM<br><b>To:</b>   <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><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>|--------&gt; 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>|--------&gt; x</div>  <div><br></div>  <div>So far I can create a cartesian communicator and test its coords   with&nbsp;</div>  <div>  <div style="MARGIN: 0px; FONT: 11px Monaco"><span style="COLOR: rgb(127,0,85)">int</span>&nbsp;dims[3] = {0,0,0};</div>  <div style="MARGIN: 0px; FONT: 11px Monaco"><span style="COLOR: rgb(127,0,85)">int</span>&nbsp;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>&nbsp;false = 0;&nbsp;<span style="COLOR: rgb(127,0,85)">int</span>&nbsp;true = 1;</div>  <div style="MARGIN: 0px; FONT: 11px Monaco"><span style="COLOR: rgb(127,0,85)">int</span>&nbsp;periods[3] = { false, false, true   };</div>  <div style="MARGIN: 0px; FONT: 11px Monaco"><span style="COLOR: rgb(127,0,85)">int</span>&nbsp;reorder = true;</div>  <div style="MARGIN: 0px; FONT: 11px Monaco"><span style="COLOR: rgb(0,80,50)">MPI_Comm</span>&nbsp;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, &amp;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></div></blockquote></div><br></div></body></html>