Thank you so much Hui. Really appreciate it. I now understand it. From: Zhou, Hui <zhouh@ anl. gov> Date: Monday, July 1, 2024 at 4: 37 PM To: Niyaz Murshed <Niyaz. Murshed@ arm. com>, discuss@ mpich. org <discuss@ mpich. org>, Jenke,
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd

Thank you so much Hui. Really appreciate it. I now understand it.

 

From: Zhou, Hui <zhouh@anl.gov>
Date: Monday, July 1, 2024 at 4:37
PM
To: Niyaz Murshed <Niyaz.Murshed@arm.com>, discuss@mpich.org <discuss@mpich.org>, Jenke, Joachim <jenke@itc.rwth-aachen.de>
Cc: nd <nd@arm.com>
Subject: Re: Custom rank for processes

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.

 

The -hosts options is convenient if you have somewhat uniform assignment. If you want arbitrary assignment, just use -rankmap option.

 

--

Hui


From: Niyaz Murshed <Niyaz.Murshed@arm.com>
Sent: Monday, July 1, 2024 4:30 PM
To: Zhou, Hui <zhouh@anl.gov>; discuss@mpich.org <discuss@mpich.org>; Jenke, Joachim <jenke@itc.rwth-aachen.de>
Cc: nd <nd@arm.com>
Subject: Re: Custom rank for processes

 

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.168.2.100:2,192.168.2.200:3 : this will give 2 process in

ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

 

ZjQcmQRYFpfptBannerEnd

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.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?

 

 

From: Zhou, Hui <zhouh@anl.gov>
Date: Monday, July 1, 2024 at 4:09
PM
To: Niyaz Murshed <Niyaz.Murshed@arm.com>, discuss@mpich.org <discuss@mpich.org>, Jenke, Joachim <jenke@itc.rwth-aachen.de>
Cc: nd <nd@arm.com>
Subject: Re: Custom rank for processes

> 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

Hello world from processor ampere-altra-2-1, rank 1 out of 5 processors

Hello world from processor ampere-altra-2-1, rank 3 out of 5 processors

Hello world from processor dpr740, rank 0 out of 5 processors

Hello world from processor dpr740, rank 4 out of 5 processors

Hello world from processor dpr740, rank 2 out of 5 processors

 

> -bind-to user:10,11,12,13

> This would mean on host 192.168.2.100

> P0=>10 , P2=>11

> This would mean on host 192.168.2.200

> P0=>10 , P2=>11, P3=12

> Is this correct understanding ?  Is it also possible to say which rank process will be pinned to which core ?

Yes, that is correct. The ranks are assigned to hosts as shown in the hello world output.

 

 

> 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.

> Can I specify the below ranks?

> 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

> Hello world from processor ampere-altra-2-1, rank 1 out of 5 processors => rank0

> Hello world from processor ampere-altra-2-1, rank 3 out of 5 processors. => rank1

> Hello world from processor dpr740, rank 0 out of 5 processors           =>rank2

> Hello world from processor dpr740, rank 4 out of 5 processors           =>rank3

> Hello world from processor dpr740, rank 2 out of 5 processors           =>rank4

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.

 

--

Hui