OpenMPI + mpi4py broken: rank=0

  • Open
  • quality assurance status badge
Details
2 participants
  • Lars Bilke
  • Antero Mejr
Owner
unassigned
Submitted by
Antero Mejr
Severity
normal
A
A
Antero Mejr wrote on 6 Oct 03:01 +0200
(address . bug-guix@gnu.org)
87ttdqjb82.fsf@antr.me
Running this command:

guix shell python python-mpi4py openmpi -- mpirun -n 12 python3 \
-c "from mpi4py import MPI; comm = MPI.COMM_WORLD;
print(comm.Get_rank())"

should print the numbers 0-11. Instead it prints 0 11 times. The same
behavior occurs in a container or pure environment.

This breaks any code using mpi4py, because ranks >0 must be available
for multi-threaded code to work.
L
L
Lars Bilke wrote on 10 Dec 14:03 +0100
(address . mail@antr.me)(address . 73649@debbugs.gnu.org)
B416E6A1-3198-4433-AF5C-C3EDE3A2B7EA@ufz.de
The issue seems that openmpi is version 5.x but mpi4py is compiled against version 4.x. You can get a consistent version by using this flag: --with-input=openmpi=openmpi@4.1.6. I could fix the issue with this call:

guix shell python python-mpi4py openmpi \
--with-input=openmpi=openmpi@4.1.6 -- \
mpirun -n 12 python3 ...
A
A
Antero Mejr wrote on 12 Dec 00:35 +0100
(name . Lars Bilke)(address . lars.bilke@ufz.de)(address . 73649@debbugs.gnu.org)
871pydrdxc.fsf@antr.me
Lars Bilke <lars.bilke@ufz.de> writes:

Toggle quote (3 lines)
> The issue seems that openmpi is version 5.x but mpi4py is compiled against
> version 4.x.

That does fix it, thanks. Maybe packages built against MPI 4.x should
be upgraded to the default MPI version, because the docs say:

"The Open MPI v5.0.x series shared libraries are ABI compatible with
Open MPI v4.0.x and v4.1.x, with a few exceptions for Fortran."

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73649@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73649
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch