I am trying to install MPICH 2 on a 64-bit machine running on Ubuntu 11.04 (Natty Narwhal). I used
sudo apt-get install mpich2
First I was surp
I had this happen to me, and I found the issue. Somewhere on your system during startup LD_PRELOAD was set to point to libmpi.so in OpenMPI.
Example:
export LD_PRELOAD=<some_directory>/openmpi/1.4.4/lib/libmpi.so
The result is that MPICH2 fails. Just do 'unset LD_PRELOAD' before running MPICH2 and the issue goes away.
Note that setting LD_PRELOAD to OpenMPI's libmpi.so is actually required sometimes for OpenMPI to work, so unsetting may break OpenMPI for you. Just remember to reset it if you need to use OpenMPI.
I have the same problem on Ubuntu 12.04. I find my problem is because I have both open-mpi and mpich2 on my computer. When I compile my program using mpicc, it will be linked to open-mpi not mpich2. To fix this problem, you can use "mpicc.mpich2" to compile your program and then use "mpiexec.mpich2" to execute your code.
Indeed, these error messages are all Open MPI errors. For some reason, you appear to also have a (badly configured?) copy of Open MPI installed somewhere. You can check which particular file you are executing when you type mpiexec
by running which mpiexec
. I believe that you can compare this with the result of:
dpkg --listfiles mpich2
(or similar) in order to figure out where the MPICH2 package was installed.