Closed IncubatorShokuhou closed 2 months ago
BTW, nothing went wrong when I used python on bash.
Hey @IncubatorShokuhou, I've had similar problems on a couple of different SC systems. I've found that exactly which MPI executable you call, and how mpi4py is installed makes a big difference.
For example, on one of my systems I need to:
# load in system mpi4py module
module load mpi4py
# Use SRUN instead of mpirun or mpiexec
srun -n 20 python mpi_test.py
Hopefully this is helpful!
Edit:
Also, the mpi4py hello world is really useful for diagnosing these kinds of issues
@AlecThomson Thank you for your suggestions, but seens that the error still occured. BTW, the mpi4py hello world works fine.
Hi @IncubatorShokuhou - Unfortunately it looks like it may be an issue with your MPI or mpi4py installation. I tried running this script on my laptop (Mac, openmpi installed via homebrew, mpi4py installed via pip) calling mpiexec directly from the terminal and it runs fine. I also tried running on our cluster, which is a linux cluster with slurm 20.02.5, openmpi 2.1.6, and mpi4py 3.7.3 and it also runs as expected.
I tried to use MPIPool in slurm but some errors occours:
Here is my python script:
and here is my slurm script:
Could anyone give me some suggestions? Is there something wrong with my python or slurm script?