I accidentally installed multiple versions of MPI's (openmpi
, mpich2
, ...) in my Ubuntu 12.04 machine. I removed them all, and installed openmpi
again; however, after fixing that (I never try before that), my MPI always gives rank=0, size = 1. The reason is that the removal process is incomplete, hence causes file sharing conflict. It can be seen from the following test
beta@landmark:~$ whereis mpicc
mpicc: /usr/bin/mpicc.mpich2 /usr/bin/mpicc.openmpi /usr/bin/mpicc
/usr/bin/X11/mpicc.mpich2 /usr/bin/X11/mpicc.openmpi /usr/bin/X11/mpicc
/usr/share/man/man1/mpicc.1.gz
It turns out that the packages libmpich2-3
and libmpich2-dev
failed to be removed. So after apt-get remove libmpich2-3 libmpich2-dev
, everything goes fine.