我使用:
安装了mpich2./configure --prefix=/usr/mpich2-install --enable-threads --enable-shared
make
make install
但是当我运行MPI程序时,出现错误:
./exe_framework: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
然后,我将LD_LIBRARY_PATH修改为:/ usr / mpich2-install / lib。但错误仍然存在。我检查了/ usr / mpich2-install / lib。 ls的输出是:
-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
没有libmpi.so。我以前安装过openMPI。现在我使用make uninstall删除它。 libmpi.so.1是openmpi / lib。
中的文件PATH是:
/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
LD_LIBRARY_PATH是:
/usr/mpich2-install/lib/
ldd exe_framework是:
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)
安装时我错了吗?