http://scuchj.blog.sohu.com/186627000.html
执行文件mpirun -np 4 /home/slx/Downloads/openmpi-1.4.3/examples/hello_f90时,
出现错误 mpirun: error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory
这时将intel的库加入 /etc/ld.so.conf, 然后更新文件 /sbin/ldconfig -v
(但诡异的是如果我更新profile文件,用 source/etc/profile,这次打开的bash可以正常运行mpirun,但下次打开的就不可以了)再执行又出现错误 error while loading shared libraries: xxx.so.0:cannot open... 一样将openmpi下有该文件的库加入ld.so.conf文件即可,记得更新文件,再无论你怎么关闭bash后执行mpirun都会正确运行。
可能需要加入在 export LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/056/lib/intel64/ (自己根据目录改变)
和 vi /etc/ld.so.conf 最后增加一行
/usr/local/openmpi/lib 等等 根据提示缺少什么库就加在 /etc/profile 或 /etc/ld.so.conf 文件中, 一般*.so *.so.5 等文件要加在/etc/ld.so.conf文件中。记住一定要用命令更新文件
和 vi /etc/ld.so.conf 最后增加一行
/usr/local/openmpi/lib 等等 根据提示缺少什么库就加在 /etc/profile 或 /etc/ld.so.conf 文件中, 一般*.so *.so.5 等文件要加在/etc/ld.so.conf文件中。记住一定要用命令更新文件
/sbin/ldconfig -v 否则问题依旧。

文章详细介绍了在使用OpenMPI进行并行计算时遇到动态链接库加载失败的问题,通过修改ld.so.conf文件、设置LD_LIBRARY_PATH环境变量及重新运行ldconfig来解决问题的过程。强调了正确配置环境变量的重要性,确保程序能够正常运行。

1976

被折叠的 条评论
为什么被折叠?



