<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
>What Joachim points out is that you can set a rank of 2, 3, 20, 30 if your total number of processes is 4.<br>
<br>
Of course, I meant for "can't".<br>
<br>
Here are some additional pointers:<br>
* The PR adding the rankmap option: <a href="https://urldefense.us/v3/__https://github.com/pmodels/mpich/pull/6213__;!!G_uCfscf7eWS!aYjh-lLSNtgHLhNQwJ3-6DMhJFW7_EjsfQQz31L5c3FoOQp-tksDDmeTD_7QuRdQHyzTXI3MbjLR$" id="LPlnk">
https://github.com/pmodels/mpich/pull/6213</a><br>
* Other options for specifying rank ordering and binding:<a href="https://urldefense.us/v3/__https://github.com/pmodels/mpich/blob/main/doc/wiki/how_to/Using_the_Hydra_Process_Manager.md__;!!G_uCfscf7eWS!aYjh-lLSNtgHLhNQwJ3-6DMhJFW7_EjsfQQz31L5c3FoOQp-tksDDmeTD_7QuRdQHyzTXAQULsgE$" id="LPlnk">https://github.com/pmodels/mpich/blob/main/doc/wiki/how_to/Using_the_Hydra_Process_Manager.md</a><br>
<br>
Hui</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Zhou, Hui <zhouh@anl.gov><br>
<b>Sent:</b> Monday, July 1, 2024 3:04 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org>; Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Cc:</b> Niyaz Murshed <Niyaz.Murshed@arm.com>; nd <nd@arm.com><br>
<b>Subject:</b> Re: Custom rank for processes</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi Niyaz,</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Yes, you can use the <code>-rankmap</code>​ option to specify a full rank ordering. The syntax for rankmap string is:<br>
<br>
```<br>
/* rankmap string format (used in PMI_process_mapping) in ABNF:</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * mapping = '(' format ',' (block / block_repeats) *[',' (block / block_repeats)] ')'</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * format = 'vector'</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * block = num / '(' num ',' num ',' num ')'</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * block_repeats = '[' block *[',' block] ']x' num</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * num = 1*DIGIT</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * If a block is in 3-tuple of (X,Y,Z), the meaning is:</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *     X - node id start value</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *     Y - number of nodes with size Z</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *     Z - number of processes assigned to each node</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * If a block is a single number id, it denotes the node id, which is equivallen to</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * (id, 1, 1).</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 *</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 * A block_repeat repeats the bracketed block list by num of times.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 */<br>
```<br>
<br>
What Joachim points out is that you can set a rank of 2, 3, 20, 30 if your total number of processes is 4. You can only order the processes.<br>
<br>
Hope that helps.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
--</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hui</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Niyaz Murshed via discuss <discuss@mpich.org><br>
<b>Sent:</b> Monday, July 1, 2024 2:43 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org>; Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Cc:</b> Niyaz Murshed <Niyaz.Murshed@arm.com>; nd <nd@arm.com><br>
<b>Subject:</b> Re: [mpich-discuss] Custom rank for processes</font>
<div> </div>
</div>
<div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
Am actually trying to understand how/if I can pin a rank to a process .. also pin a core to a process. From: Niyaz Murshed via discuss <discuss@ mpich. org> Date: Monday, July 1, 2024 at 2: 34 PM To: Jenke, Joachim <jenke@ itc. rwth-aachen. de>,
</div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
ZjQcmQRYFpfptBannerStart</div>
<div dir="ltr" id="x_x_pfptBanner0myfnps" style="display:block!important; text-align:left!important; margin:16px 0px 16px 0px!important; padding:8px 16px 8px 16px!important; border-radius:4px!important; min-width:200px!important; background-color:#D0D8DC!important; background-color:#D0D8DC; border-top:4px solid #90a4ae!important; border-top:4px solid #90a4ae">
<div id="x_x_pfptBanner0myfnps" style="float:left!important; display:block!important; margin:0px 0px 1px 0px!important; max-width:600px!important">
<div id="x_x_pfptBanner0myfnps" style="display:block!important; visibility:visible!important; background-color:#D0D8DC!important; color:#000000!important; color:#000000; font-family:'Arial',sans-serif!important; font-family:'Arial',sans-serif; font-weight:bold!important; font-weight:bold; font-size:14px!important; line-height:18px!important; line-height:18px">
This Message Is From an External Sender </div>
<div id="x_x_pfptBanner0myfnps" style="display:block!important; visibility:visible!important; background-color:#D0D8DC!important; color:#000000!important; color:#000000; font-weight:normal; font-family:'Arial',sans-serif!important; font-family:'Arial',sans-serif; font-size:12px!important; line-height:18px!important; line-height:18px; margin-top:2px!important">
This message came from outside your organization. </div>
</div>
<div style="clear:both!important; display:block!important; visibility:hidden!important; line-height:0!important; font-size:0.01px!important; height:0px">
 </div>
</div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
ZjQcmQRYFpfptBannerEnd</div>
<style>
<!--
#x_x_pfptBanner0myfnps
        {display:block!important;
        visibility:visible!important;
        opacity:1!important;
        background-color:#D0D8DC!important;
        max-width:none!important;
        max-height:none!important}
-->
</style>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Aptos}
p.x_x_MsoNormal, li.x_x_MsoNormal, div.x_x_MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif}
p.x_x_xxmsonormal, li.x_x_xxmsonormal, div.x_x_xxmsonormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif}
span.x_x_EmailStyle21
        {font-family:"Aptos",sans-serif;
        color:windowtext}
.x_x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style>
<div class="x_x_WordSection1">
<p class="x_x_MsoNormal"><span style="font-size:11.0pt">Am actually trying to understand how/if I can pin a rank to a process .. also pin a core to a process.</span></p>
<p class="x_x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div id="x_x_mail-editor-reference-message-container">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_x_MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Niyaz Murshed via discuss <discuss@mpich.org><br>
<b>Date: </b>Monday, July 1, 2024 at 2:34</span><span style="font-family:"Arial",sans-serif; color:black"> </span><span style="color:black">PM<br>
<b>To: </b>Jenke, Joachim <jenke@itc.rwth-aachen.de>, discuss@mpich.org <discuss@mpich.org><br>
<b>Cc: </b>Niyaz Murshed <Niyaz.Murshed@arm.com>, nd <nd@arm.com><br>
<b>Subject: </b>Re: [mpich-discuss] Custom rank for processes</span></p>
</div>
<div>
<p class="x_x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">What is the rankmap used for ? From: Jenke, Joachim <jenke@</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">itc.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">rwth-aachen.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">de>
 Sent: Monday, July 1, 2024 2:</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">21:</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">53
 PM To: discuss@</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">mpich.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">org
 <discuss@</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">mpich.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">org>
 Cc: Niyaz Murshed <Niyaz.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">Murshed@</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">arm.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">com>;
 nd <nd@</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">arm.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">com>
</span></p>
</div>
<div>
<p class="x_x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerStart</span></p>
</div>
<div id="x_x_pfptBanneroi3yihf" style="border:none; border-top:solid #90A4AE 3.0pt; padding:0in 0in 0in 0in; display:block!important; text-align:left!important; margin:0px!important; padding:16px!important; border-radius:4px!important; min-width:200px!important; background-color:#D0D8DC!important; border-top:#90a4ae!important">
<div id="x_x_pfptBanneroi3yihf">
<div id="x_x_pfptBanneroi3yihf">
<p class="x_x_MsoNormal" style="line-height:13.5pt; background:#D0D8DC"><b><span style="font-family:"Arial",sans-serif; color:black">This Message Is From an External Sender
</span></b></p>
</div>
<div id="x_x_pfptBanneroi3yihf">
<p class="x_x_MsoNormal" style="line-height:13.5pt; background:#D0D8DC"><span style="font-family:"Arial",sans-serif; color:black">This message came from outside your organization.
</span></p>
</div>
</div>
<div>
<p class="x_x_MsoNormal" style="background:#D0D8DC"><span style="color:black"> </span></p>
</div>
</div>
<div>
<p class="x_x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerEnd</span></p>
</div>
<div>
<div>
<div>
<p class="x_x_MsoNormal">What is the rankmap used for ? </p>
</div>
</div>
</div>
<div class="x_x_MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="x_x_divRplyFwdMsg">
<p class="x_x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black"> Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Sent:</b> Monday, July 1, 2024 2:21:53 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org><br>
<b>Cc:</b> Niyaz Murshed <Niyaz.Murshed@arm.com>; nd <nd@arm.com><br>
<b>Subject:</b> Re: Custom rank for processes</span> </p>
<div>
<p class="x_x_MsoNormal"> </p>
</div>
</div>
<div>
<div>
<p class="x_x_MsoNormal">MPI defines rank numbers to be consecutive from 0 to size-1. Your suggested numbering will not work.</p>
</div>
<div>
<p class="x_x_MsoNormal">-Joachim </p>
</div>
<div class="x_x_MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="x_x_x_divRplyFwdMsg">
<p class="x_x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black"> Niyaz Murshed via discuss <discuss@mpich.org><br>
<b>Sent:</b> Monday, July 1, 2024 9:09:41 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org><br>
<b>Cc:</b> Niyaz Murshed <Niyaz.Murshed@arm.com>; nd <nd@arm.com><br>
<b>Subject:</b> [mpich-discuss] Custom rank for processes</span> </p>
<div>
<p class="x_x_MsoNormal"> </p>
</div>
</div>
<div>
<div>
<p class="x_x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">Hello, Is it possible to provide custom ranks to processes ? I see a param called “-rankmap” .. Does it provide this option? Is it possible to do something like below : Node1 => 2
 processes => rank 2,3 Node2 => 2 processes => rank </span></p>
</div>
<div>
<p class="x_x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerStart</span></p>
</div>
<div id="x_x_x_x_pfptBannertxp8xy4" style="border:none; border-top:solid #90A4AE 3.0pt; padding:0in 0in 0in 0in; display:block!important; text-align:left!important; margin:0px!important; padding:16px!important; border-radius:4px!important; min-width:200px!important; background-color:#D0D8DC!important; border-top:#90a4ae!important">
<div id="x_x_x_x_pfptBannertxp8xy4">
<div id="x_x_x_x_pfptBannertxp8xy4">
<p class="x_x_MsoNormal" style="line-height:13.5pt; background:#D0D8DC"><b><span style="font-family:"Arial",sans-serif; color:black">This Message Is From an External Sender
</span></b></p>
</div>
<div id="x_x_x_x_pfptBannertxp8xy4">
<p class="x_x_MsoNormal" style="line-height:13.5pt; background:#D0D8DC"><span style="font-family:"Arial",sans-serif; color:black">This message came from outside your organization.
</span></p>
</div>
</div>
<div>
<p class="x_x_MsoNormal" style="background:#D0D8DC"><span style="color:black"> </span></p>
</div>
</div>
<div>
<p class="x_x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerEnd</span></p>
</div>
<div>
<p class="x_x_xxmsonormal">Hello, </p>
<p class="x_x_xxmsonormal">Is it possible to provide custom ranks to processes ?</p>
<p class="x_x_xxmsonormal">I see a param called “-rankmap” .. Does it provide this option?</p>
<p class="x_x_xxmsonormal"> </p>
<p class="x_x_xxmsonormal">Is it possible to do something like below :</p>
<p class="x_x_xxmsonormal">Node1 => 2 processes => rank 2,3</p>
<p class="x_x_xxmsonormal">Node2 => 2 processes => rank 20,30</p>
<p class="x_x_xxmsonormal"> </p>
<p class="x_x_xxmsonormal">Thanks.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>