<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);">
Use quote. Try <code>-rankmap '(vector,1,1,0,0,0)'</code>.</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);">
Actually, the <code>vector</code> part is optional, so this should also work: <code>
-rankmap 1,1,0,0,0</code>.</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 class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hui</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> Niyaz Murshed <Niyaz.Murshed@arm.com><br>
<b>Sent:</b> Monday, July 1, 2024 9:11 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org>; Zhou, Hui <zhouh@anl.gov>; Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Cc:</b> nd <nd@arm.com><br>
<b>Subject:</b> Re: 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">
I get the below error when trying. . am I trying it worng? root@ ampere-altra-2-1: /# mpirun -np 5 -hosts 192. 168. 2. 100,192. 168. 2. 200 -rankmap (vector,1,1,0,0,0) /mpitutorial/tutorials/mpi-hello-world/code/mpi_hello_world bash: syntax error near
</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_pfptBannerjmbng2y" 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_pfptBannerjmbng2y" style="float:left!important; display:block!important; margin:0px 0px 1px 0px!important; max-width:600px!important">
<div id="x_pfptBannerjmbng2y" 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_pfptBannerjmbng2y" 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_pfptBannerjmbng2y
{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}
@font-face
{font-family:Menlo}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif}
p.x_xmsonormal, li.x_xmsonormal, div.x_xmsonormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif}
span.x_EmailStyle21
{font-family:"Aptos",sans-serif;
color:windowtext}
p.x_p1, li.x_p1, div.x_p1
{margin:0in;
font-size:8.5pt;
font-family:Menlo;
color:black}
span.x_s1
{}
span.x_apple-converted-space
{}
.x_MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
-->
</style>
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt">I get the below error when trying.. am I trying it worng?</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_p1"><span class="x_s1">root@ampere-altra-2-1:/# mpirun </span><span class="x_apple-converted-space">
</span><span class="x_s1">-np 5</span><span class="x_apple-converted-space"> </span>
<span class="x_s1">-hosts 192.168.2.100,192.168.2.200 </span><span class="x_apple-converted-space">
</span><span class="x_s1">-rankmap (vector,1,1,0,0,0)</span><span class="x_apple-converted-space">
</span><span class="x_s1">/mpitutorial/tutorials/mpi-hello-world/code/mpi_hello_world</span></p>
<p class="x_p1"><span class="x_s1">bash: syntax error near unexpected token `('</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div id="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_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 4:42</span><span style="font-family:"Arial",sans-serif; color:black"> </span><span style="color:black">PM<br>
<b>To: </b>Zhou, Hui <zhouh@anl.gov>, 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</span></p>
</div>
<div>
<p class="x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">Thank you so much Hui. Really appreciate it. I now understand it. From: Zhou, Hui <zhouh@</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">anl.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">gov>
Date: Monday, July 1, 2024 at 4:</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">37 PM To: 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>,
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>,
Jenke, </span></p>
</div>
<div>
<p class="x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerStart</span></p>
</div>
<div id="x_pfptBannervdcy3qg" 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_pfptBannervdcy3qg">
<div id="x_pfptBannervdcy3qg">
<p class="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_pfptBannervdcy3qg">
<p class="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_MsoNormal" style="background:#D0D8DC"><span style="color:black"> </span></p>
</div>
</div>
<div>
<p class="x_MsoNormal" style=""><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerEnd</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:11.0pt">Thank you so much Hui. Really appreciate it. I now understand it.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div id="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_MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Zhou, Hui <zhouh@anl.gov><br>
<b>Date: </b>Monday, July 1, 2024 at 4:37</span><span style="font-family:"Arial",sans-serif; color:black"> </span><span style="color:black">PM<br>
<b>To: </b>Niyaz Murshed <Niyaz.Murshed@arm.com>, discuss@mpich.org <discuss@mpich.org>, Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Cc: </b>nd <nd@arm.com><br>
<b>Subject: </b>Re: Custom rank for processes</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Yes, you can use rankmap to simply list out the node assignment for each rank. "-rankmap (vector,1,1,0,0,0)" is a list of 5 node ids, one for each rank. So rank 0 gets node 1, rank 1 gets node 1, rank 2 gets
node 0, and so on.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">The -hosts options is convenient if you have somewhat uniform assignment. If you want arbitrary assignment, just use -rankmap option.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">--</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Hui</span></p>
</div>
<div class="x_MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="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 <Niyaz.Murshed@arm.com><br>
<b>Sent:</b> Monday, July 1, 2024 4:30 PM<br>
<b>To:</b> Zhou, Hui <zhouh@anl.gov>; discuss@mpich.org <discuss@mpich.org>; Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Cc:</b> nd <nd@arm.com><br>
<b>Subject:</b> Re: Custom rank for processes</span> </p>
<div>
<p class="x_MsoNormal"> </p>
</div>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-size:1.0pt; color:white">Sorry to bother you again with silly questions. How do I read the below : -rankmap (vector,1,1,0,0,0) I have 5 processes. 1 1 => means node1 will get first 2 processes ? -hosts 192.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">168.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">2.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">100:</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">2,192.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">168.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">2.</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">200:</span><span style="font-size:1.0pt; font-family:"Arial",sans-serif; color:white"> </span><span style="font-size:1.0pt; color:white">3
: this will give 2 process in </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerStart</span></p>
</div>
<div id="x_x_pfptBanner4epdvkz" 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_pfptBanner4epdvkz">
<div id="x_x_pfptBanner4epdvkz">
<p class="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_pfptBanner4epdvkz">
<p class="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_MsoNormal" style="background:#D0D8DC"><span style="color:black"> </span></p>
</div>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:1.0pt; color:white">ZjQcmQRYFpfptBannerEnd</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="font-size:11.0pt">Sorry to bother you again with silly questions.</span></p>
<p class="x_xmsonormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_xmsonormal"><span style="font-size:11.0pt">How do I read the below : </span>
</p>
<p class="x_xmsonormal"><span style="color:black; background:white">-rankmap (vector,1,1,0,0,0)</span></p>
<p class="x_xmsonormal"><span style="color:black; background:white"> </span></p>
<p class="x_xmsonormal"><span style="color:black; background:white">I have 5 processes. 1 1 => means node1 will get first 2 processes ?
</span></p>
<p class="x_xmsonormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_xmsonormal"><span style="color:black">-hosts 192.168.2.100:2,192.168.2.200:3 : this will give 2 process in 100 and 3 in 200 .. Still won’t be able to specify which ranks goes to which node. Rank0 will be on node 100 .. what If I want Rank0 on node
200?</span></p>
<p class="x_xmsonormal"><span style="color:black"> </span></p>
<p class="x_xmsonormal"><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_xmsonormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Zhou, Hui <zhouh@anl.gov><br>
<b>Date: </b>Monday, July 1, 2024 at 4:09</span><span style="font-family:"Arial",sans-serif; color:black"> </span><span style="color:black">PM<br>
<b>To: </b>Niyaz Murshed <Niyaz.Murshed@arm.com>, discuss@mpich.org <discuss@mpich.org>, Jenke, Joachim <jenke@itc.rwth-aachen.de><br>
<b>Cc: </b>nd <nd@arm.com><br>
<b>Subject: </b>Re: Custom rank for processes</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> root@ampere-altra-2-1:/# mpirun -n 5 -bind-to user:10,11,12,13 -hosts 192.168.2.200,192.168.2.100 /mpitutorial/tutorials/mpi-hello-world/code/mpi_hello_world</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">Hello world from processor ampere-altra-2-1, rank 1 out of 5 processors</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">Hello world from processor ampere-altra-2-1, rank 3 out of 5 processors</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">Hello world from processor dpr740, rank 0 out of 5 processors</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">Hello world from processor dpr740, rank 4 out of 5 processors</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">Hello world from processor dpr740, rank 2 out of 5 processors</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> -bind-to user:10,11,12,13</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> This would mean on host 192.168.2.100</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> P0=>10 , P2=>11</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> This would mean on host 192.168.2.200</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> P0=>10 , P2=>11, P3=12</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Is this correct understanding ? Is it also possible to say which rank process will be pinned to which core ?<br>
<br>
Yes, that is correct. The ranks are assigned to hosts as shown in the hello world output.</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> About the rankmap:, trying to understand if I can select where a particular rank would be from > list of hosts. Currently, the first host in the list always get rank0.</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Can I specify the below ranks?</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> mpirun -n 5 -bind-to user:10,11,12,13 -hosts 192.168.2.200,192.168.2.100 /mpitutorial/tutorials/mpi-hello-world/code/mpi_hello_world</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> </span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Hello world from processor ampere-altra-2-1, rank 1 out of 5 processors => rank0</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Hello world from processor ampere-altra-2-1, rank 3 out of 5 processors. => rank1</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Hello world from processor dpr740, rank 0 out of 5 processors =>rank2</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Hello world from processor dpr740, rank 4 out of 5 processors =>rank3</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">> Hello world from processor dpr740, rank 2 out of 5 processors =>rank4<br>
<br>
Yes. You can use "-rankmap (vector,1,1,0,0,0)". Alternatively, you can use "-hosts 192.168.2.100:2,192.168.2.200:3", the colon syntax specifies how many processes you want to assign to each host.</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">--</span></p>
</div>
<div>
<p class="x_xmsonormal"><span style="color:black">Hui</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>