OpenMPI error while loading shared libraries: libopen-rte.so.40解决方案

在安装好OpenMPI后,执行命令mpirun -np 2 -hostfile hostfile --allow-run-as-root hello_c

出现了如下错误:

orted: error while loading shared libraries: libopen-rte.so.40: cannot open shared object file: No such file or directory
--------------------------------------------------------------------------
ORTE was unable to reliably start one or more daemons.
This usually is caused by:

* not finding the required libraries and/or binaries on
  one or more nodes. Please check your PATH and LD_LIBRARY_PATH
  settings, or configure OMPI with --enable-orterun-prefix-by-default

* lack of authority to execute on one or more specified nodes.
  Please verify your allocation and authorities.

* the inability to write startup files into /tmp (--tmpdir/orte_tmpdir_base).
  Please check with your sys admin to determine the correct location to use.

*  compilation of the orted with dynamic libraries when static are required
  (e.g., on Cray). Please check your configure cmd line and consider using
  one of the contrib/platform definitions for your system type.

* an inability to create a connection back to mpirun due to a
  lack of common network interfaces and/or no route found between
  them. Please check network connectivity (including firewalls
  and network routing requirements).

网上的解决方案都是将openmpi路径添加到环境变量LD_LIBRARY_PATH中,但这里在安装openmpi时已经配置好了,实际上路径并没有问题。

最终的解决方案为运行命令:ldconfig 然后就解决了,当然也实在不行可以试试重启系统


版权声明:本文为baidu_27167467原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。