Skip to content

Process pinning with MPIPoolExecutor #476

Discussion options

You must be logged in to vote

I found what I needed, tested it, and I think it works.

So according to the OpenMPI documentation I can pass bind_to and map_by to MPI_Info:

https://www.open-mpi.org/doc/v4.1/man3/MPI_Comm_spawn.3.php

so all I had to do was:

+        mpi_info = MPI.Info.Create()
+        mpi_info['bind_to'] = 'numa'
+        mpi_info['map_by'] = 'numa'
+
+        executor = MPIPoolExecutor(max_workers=nranks, mpi_info=mpi_info)

and it seems like I'm getting what I needed

Thanks!

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dalcinl
Comment options

Comment options

You must be logged in to vote
1 reply
@mrogowski
Comment options

Comment options

You must be logged in to vote
1 reply
@dalcinl
Comment options

Answer selected by dalcinl
Comment options

You must be logged in to vote
1 reply
@dalcinl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #475 on March 15, 2024 13:44.