[OMPI users] Binding to thread 0

2023-09-08 Thread Luis Cebamanos via users
Hello,

Up to now, I have been using numerous ways of binding with wrappers
(numactl, taskset) whenever I wanted to play with core placing. Another way
I have been using is via -rankfile, however I notice that some ranks jump
from thread 0 to thread 1 on SMT chips. I can control this with numactl for
instance, but it would be great to see similar behaviour when using
-rankfile. Is there a way to pack all ranks to one of the threads of each
core (preferibly to thread 0) so I can nicely see all ranks with htop on
either left or right of the screen?

The command I am using is pretty simple:

mpirun -np $MPIRANKS --rankfile ./myrankfile

and ./myrankfile looks like

rank 33=argon slot=33
rank 34=argon slot=34
rank 35=argon slot=35
rank 36=argon slot=36

Thanks!


Re: [OMPI users] Binding to thread 0

2023-09-08 Thread Gilles Gouaillardet via users
Luis,

you can pass the --bind-to hwthread option in order to bind on the first
thread of each core


Cheers,

Gilles

On Fri, Sep 8, 2023 at 8:30 PM Luis Cebamanos via users <
users@lists.open-mpi.org> wrote:

> Hello,
>
> Up to now, I have been using numerous ways of binding with wrappers
> (numactl, taskset) whenever I wanted to play with core placing. Another way
> I have been using is via -rankfile, however I notice that some ranks jump
> from thread 0 to thread 1 on SMT chips. I can control this with numactl for
> instance, but it would be great to see similar behaviour when using
> -rankfile. Is there a way to pack all ranks to one of the threads of each
> core (preferibly to thread 0) so I can nicely see all ranks with htop on
> either left or right of the screen?
>
> The command I am using is pretty simple:
>
> mpirun -np $MPIRANKS --rankfile ./myrankfile
>
> and ./myrankfile looks like
>
> rank 33=argon slot=33
> rank 34=argon slot=34
> rank 35=argon slot=35
> rank 36=argon slot=36
>
> Thanks!
>


Re: [OMPI users] Binding to thread 0

2023-09-08 Thread Jeff Squyres (jsquyres) via users
In addition to what Gilles mentioned, I'm curious: is there a reason you have 
hardware threads enabled?  You could disable them in the BIOS, and then each of 
your MPI processes can use the full core, not just a single hardware thread.

From: users  on behalf of Luis Cebamanos via 
users 
Sent: Friday, September 8, 2023 7:10 AM
To: Ralph Castain via users 
Cc: Luis Cebamanos 
Subject: [OMPI users] Binding to thread 0

Hello,

Up to now, I have been using numerous ways of binding with wrappers (numactl, 
taskset) whenever I wanted to play with core placing. Another way I have been 
using is via -rankfile, however I notice that some ranks jump from thread 0 to 
thread 1 on SMT chips. I can control this with numactl for instance, but it 
would be great to see similar behaviour when using -rankfile. Is there a way to 
pack all ranks to one of the threads of each core (preferibly to thread 0) so I 
can nicely see all ranks with htop on either left or right of the screen?

The command I am using is pretty simple:

mpirun -np $MPIRANKS --rankfile ./myrankfile

and ./myrankfile looks like

rank 33=argon slot=33
rank 34=argon slot=34
rank 35=argon slot=35
rank 36=argon slot=36

Thanks!