Closed avivajpeyi closed 3 weeks ago
👋 Hey @avivajpeyi
It looks like you are running on a mac or linux machine - if on Mac, can you try:
sysctl -n hw.ncpu
Or if on linux:
grep -c processor /proc/cpuinfo
and see how many processors are available?
Also, is this with openMPI or mpich2? And how did you install it?
thanks!
Hey @adrn !
Thanks for your reply!
On running the above command on my mac, I get:
$ sysctl -n hw.ncpu
12
Im not exactly sure if I used OpenMPI or MPICH... I have both installed?
I had pip
installed mpi4py
and schwimmbad
Although I get an error when I run your demo, I seem to be able to run a simple command without issues:
$ mpiexec -n 2 echo "hi"
hi
hi
OK a few more tests.
First off, let's see which version of MPI your shell finds first:
$ which -a mpiexec
Just because mpiexec
is running with a bash command doesn't mean mpi4py is configured properly. Can you try:
$ mpiexec -n 4 python -c "from mpi4py import MPI; print(MPI.COMM_WORLD.Get_size(), MPI.COMM_WORLD.Get_rank());"
When I try to run the MPI demo on my local machine:
I get the following error:
Any suggestions?