Closed mmckerns closed 10 years ago
a more succinct example is pyina/examples_other/nodes.py:
dude@shc-b>$ mpirun -np 2 python nodes.py
Node (1) of 2
Node (0) of 2
versus
dude@hilbert>$ mpirun -np 2 python2.7 nodes.py
Node (0) of 1
Node (0) of 1
As noted here: http://www.open-mpi.org/community/lists/users/2012/09/20328.php
Apparently, if all your outputs say "I am process 0 of 1"
, this typically means you've got a mismatch between the openmpi
version that you compiled mpi4py
with and the mpirun
that you used to launch it. You may even have compiled mpi4py
against mpich
, but used the mpirun
from openmpi
to launch it. That can easily lead to side effects like saying that your program exited incorrectly.
Conclusion, you need to be very careful to use the exact same version of openmpi
(or mpich
) to both compile mpi4py
and mpirun
whatever python program you are running.
Upon rebuilding mpi4py
with mpich
, and making sure the links were going to the correct executable… it now works on the mac. No changes need to the code, so not a bug.
scatter_gather.py should get this... (and does on linux cluster with python 2.6.4)
HOWEVER, on mac OSX with python 2.7.8, it gets this...
Should check which
mpirun
is being run, and which version is installed. Also check for path issues, and if some MPI daemon needs to be started first.