Using mpich 4.2.0-5build3 on Ubuntu24.04 and testing with the cpi.c small program that calculates the value of PI.
mpiexec -host host1 -n 2 cpi
The output is
Process 0 of 1 is on host1
pi is approximately 3.1415926544231341, Error is 0.0000000008333410
wall clock time = 0.000049
Process 0 of 1 is on host1
pi is approximately 3.1415926544231341, Error is 0.0000000008333410
wall clock time = 0.000046
It is running as if each process is in a cluster of 1?That means The MPI_Comm_size function is returning a value of 1.
I read this other thread about accidental mixing of shared libraries of different MPI installations but I did a
ldd on the cpi as well as on mpiexec to check the library dependencies. So I know what shared libraries that they are using.whereis mpiexec is also showing the one that is being used.
Any other ideas why MPI_Comm_size is always returning 1?