I am running Linux (Pop!_OS), and I am trying to run my program using mpi. However,
It doesn't work for python scripts (with mpi4py)
but it kinda works for C scripts. (with mpi.h)
To test it out I've ran a simple program where the program should output hello {rank} out of {size}. Where rank is the current processor that will print the line and size is the total number of processors that are used.
My program: hello.py
### hello.py ###from mpi4py import MPIMPI = MPI.COMM_WORLDsize = comm.sizerank = comm.rankprint(f"{rank} of {size}")This is the output that I get for mpirun -np 4 python3 hello.py
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).above messages is repeated 8 times with the following at the end
hello 0 of 1hello 0 of 1hello 0 of 1hello 0 of 1I have a similar program that I made in C, hello.c
/*hello.c*/#include <stdio.h>#include <mpi.h>int main(int argc, char *argv[]){ int size, rank; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); printf("Hello %d out of %d\n", rank, size); MPI_Finalize();}compiled using mpicc and then running: mpirun -np 4 ./hello. I get the same error message but only once with the output at the end:
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).Hello 0 out of 4Hello 2 out of 4Hello 3 out of 4Hello 1 out of 4Though this gives the desired output, I don't know what do do with get the hwloc/linux... prompt. I want to fix it so it can run correctly for mpi4py as well.
Additional Detail:
- I have a dual-boot system, the other OS is Windows on a separate SSD. The same programs work fine on Windows.