I am trying to run a simple python program using mpi on Pop OS. I have installed MPICH
$ mpiexec --version
HYDRA build details:
Version: 4.2.1
Release Date: Wed Apr 17 15:30:02 CDT 2024
CC: gcc
Configure options: '--disable-option-checking' '--prefix=NONE' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'CFLAGS= -O2' 'LDFLAGS=' 'LIBS=' 'CPPFLAGS= -DNETMOD_INLINE=__netmod_inline_ofi__ -I/home/rafay/Downloads/mpich-4.2.1/src/mpl/include -I/home/rafay/Downloads/mpich-4.2.1/modules/json-c -D_REENTRANT -I/home/rafay/Downloads/mpich-4.2.1/src/mpi/romio/include -I/home/rafay/Downloads/mpich-4.2.1/src/pmi/include -I/home/rafay/Downloads/mpich-4.2.1/modules/yaksa/src/frontend/include -I/home/rafay/Downloads/mpich-4.2.1/modules/libfabric/include'
Process Manager: pmi
Launchers available: ssh rsh fork slurm ll lsf sge manual persist
Topology libraries available: hwloc
Resource management kernels available: user slurm ll lsf sge pbs cobalt
Demux engines available: poll select
My program: hello.py
from mpi4py import MPI
MPI = MPI.COMM_WORLD
size = comm.size
rank = comm.rank
print(f"{rank} of {size}")
The output that I get after I run: mpirun -np 4 python hello.py
or mpiexec -n 4 python hello.py
is the following message repeated 8 times
hwloc/linux: Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
with
hello 0 of 1
hello 0 of 1
hello 0 of 1
hello 0 of 1
The output should show processors, and each rank. But it clearly shows that MPI isn’t running properly.
I have dualboot system, so I ran the same program on my Windows, and it worked fine there. So I am not sure what the problem is. My doubts are that I may have installed MPICH incorrectly? (So I might have to reinstall that?), but I am clueless if that really is the case. Any help would be appreciated, thank you!