0

I installed mpich2 using:

./configure --prefix=/usr/mpich2-install --enable-threads --enable-shared

make

make install

But when I run a MPI program, there is a error:

./exe_framework: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory

Then, I modified LD_LIBRARY_PATH to : /usr/mpich2-install/lib. But the error is still there. I checked /usr/mpich2-install/lib. The out put of ls is:

-rw-r--r--. 1 root root  673560 Apr  8 17:44 libfmpich.a
-rwxr-xr-x. 1 root root     959 Apr  8 17:44 libfmpich.la
lrwxrwxrwx. 1 root root      19 Apr  8 17:44 libfmpich.so -> libfmpich.so.10.0.4
lrwxrwxrwx. 1 root root      19 Apr  8 17:44 libfmpich.so.10 -> libfmpich.so.10.0.4
-rwxr-xr-x. 1 root root  256790 Apr  8 17:44 libfmpich.so.10.0.4
-rw-r--r--. 1 root root 5631824 Apr  8 17:44 libmpich.a
-rw-r--r--. 1 root root  259262 Apr  8 17:44 libmpichcxx.a
-rwxr-xr-x. 1 root root     973 Apr  8 17:44 libmpichcxx.la
lrwxrwxrwx. 1 root root      21 Apr  8 17:44 libmpichcxx.so -> libmpichcxx.so.10.0.4
lrwxrwxrwx. 1 root root      21 Apr  8 17:44 libmpichcxx.so.10 -> libmpichcxx.so.10.0.4
-rwxr-xr-x. 1 root root  184546 Apr  8 17:44 libmpichcxx.so.10.0.4
-rw-r--r--. 1 root root   10994 Apr  8 17:44 libmpichf90.a
-rwxr-xr-x. 1 root root     973 Apr  8 17:44 libmpichf90.la
lrwxrwxrwx. 1 root root      21 Apr  8 17:44 libmpichf90.so -> libmpichf90.so.10.0.4
lrwxrwxrwx. 1 root root      21 Apr  8 17:44 libmpichf90.so.10 -> libmpichf90.so.10.0.4
-rwxr-xr-x. 1 root root   12833 Apr  8 17:44 libmpichf90.so.10.0.4
-rwxr-xr-x. 1 root root    1051 Apr  8 17:44 libmpich.la
lrwxrwxrwx. 1 root root      18 Apr  8 17:44 libmpich.so -> libmpich.so.10.0.4
lrwxrwxrwx. 1 root root      18 Apr  8 17:44 libmpich.so.10 -> libmpich.so.10.0.4
-rwxr-xr-x. 1 root root 2764100 Apr  8 17:44 libmpich.so.10.0.4
-rw-r--r--. 1 root root   23530 Apr  8 17:44 libmpl.a
-rwxr-xr-x. 1 root root     919 Apr  8 17:44 libmpl.la
lrwxrwxrwx. 1 root root      15 Apr  8 17:44 libmpl.so -> libmpl.so.1.0.0
lrwxrwxrwx. 1 root root      15 Apr  8 17:44 libmpl.so.1 -> libmpl.so.1.0.0
-rwxr-xr-x. 1 root root   20623 Apr  8 17:44 libmpl.so.1.0.0
-rw-r--r--. 1 root root    4052 Apr  8 17:44 libopa.a
-rwxr-xr-x. 1 root root     929 Apr  8 17:44 libopa.la
lrwxrwxrwx. 1 root root      15 Apr  8 17:44 libopa.so -> libopa.so.1.0.0
lrwxrwxrwx. 1 root root      15 Apr  8 17:44 libopa.so.1 -> libopa.so.1.0.0
-rwxr-xr-x. 1 root root    7380 Apr  8 17:44 libopa.so.1.0.0
drwxr-xr-x. 2 root root    4096 Apr  8 17:44 pkgconfig

There is no libmpi.so. I installed openMPI before. Now I have delete it using make uninstall. libmpi.so.1 is a file in openmpi/lib.

The PATH is:

/usr/mpich2-install/bin/:/usr/mpich2-install/bin/:/usr/mpich2-install/bin/:/usr/openmpi-install/bin/:/usr/openmpi-install/bin/:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

The LD_LIBRARY_PATH is:

/usr/mpich2-install/lib/

ldd exe_framework is:

    linux-vdso.so.1 =>  (0x00007fff33bff000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00000036f1e00000)
    libm.so.6 => /lib64/libm.so.6 (0x00000036f2600000)
    libmpich.so.10 => /usr/mpich2-install/lib/libmpich.so.10 (0x00007f71533a2000)
    libopa.so.1 => /usr/mpich2-install/lib/libopa.so.1 (0x00007f71531a1000)
    libmpl.so.1 => /usr/mpich2-install/lib/libmpl.so.1 (0x00007f7152f9c000)
    librt.so.1 => /lib64/librt.so.1 (0x00000036f2200000)
    libc.so.6 => /lib64/libc.so.6 (0x00000036f1a00000)
    /lib64/ld-linux-x86-64.so.2 (0x00000036f1200000)
    libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007f7152ca9000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000036fd600000)

Am I wrong during installation?

user3392320
  • 67
  • 1
  • 8
  • You have to recompile the executable using `mpicc` (or `mpif90` or whatever the compiler wrapper) provided by MPICH2. – Hristo Iliev Apr 08 '14 at 11:07
  • It dose not work. The out put of "which mpicc" is "/usr/mpich2-install/bin/mpicc" I re-make the whole MPI program. The compile command is: "/usr/mpich2-install/bin/mpicc \*.c ../common/\*.c -O0 -o exe_framework -g -lpthread -lm -rdynamic -Werror". The error still exists. – user3392320 Apr 08 '14 at 11:26
  • What is the output of `ldd exe_framework`? – Hristo Iliev Apr 08 '14 at 11:37
  • Oh. It is too long for a comment. I have added it at the bottom of my question. – user3392320 Apr 08 '14 at 11:43
  • Oh! I try to run it on 2 machines. I just modified the setting of one machine! I need to set the other machine. The other machine did not have a right version of MPICH2. – user3392320 Apr 08 '14 at 11:46

0 Answers0