今天早上,我升级了gfortran(从4.7到6.1.0)和OpenMPI(从1.10到2.0.1)编译器。我写了这个简单的程序:

program main
    use mpi_f08
    implicit none
    integer :: ierror

    call mpi_init(ierror)
    call mpi_finalize(ierror)
end program main


当我直接编译(没有mpirun,只有./a.out)时,我收到以下消息(由于程序按预期运行,它们并不是真正的错误):

[username:79762] mca_base_component_repository_open: unable to open mca_grpcomm_bad: dlopen(/usr/local/lib/openmpi/mca_grpcomm_bad.so, 9): Symbol not found: _orte_grpcomm_base_modex
  Referenced from: /usr/local/lib/openmpi/mca_grpcomm_bad.so
  Expected in: flat namespace
 in /usr/local/lib/openmpi/mca_grpcomm_bad.so (ignored)
[username:79761] mca_base_component_repository_open: unable to open mca_grpcomm_bad: dlopen(/usr/local/lib/openmpi/mca_grpcomm_bad.so, 9): Symbol not found: _orte_grpcomm_base_modex
  Referenced from: /usr/local/lib/openmpi/mca_grpcomm_bad.so
  Expected in: flat namespace
 in /usr/local/lib/openmpi/mca_grpcomm_bad.so (ignored)
[username:79761] mca_base_component_repository_open: unable to open mca_pml_bfo: dlopen(/usr/local/lib/openmpi/mca_pml_bfo.so, 9): Symbol not found: _ompi_free_list_item_t_class
  Referenced from: /usr/local/lib/openmpi/mca_pml_bfo.so
  Expected in: flat namespace
 in /usr/local/lib/openmpi/mca_pml_bfo.so (ignored)
[username:79761] mca_base_component_repository_open: coll "/usr/local/lib/openmpi/mca_coll_hierarch" uses an MCA interface that is not recognized (component MCA v2.0.0 != supported MCA v2.1.0) -- ignored
[username:79761] mca_base_component_repository_open: unable to open mca_coll_ml: dlopen(/usr/local/lib/openmpi/mca_coll_ml.so, 9): Symbol not found: _mca_bcol_base_components_in_use
  Referenced from: /usr/local/lib/openmpi/mca_coll_ml.so
  Expected in: flat namespace
 in /usr/local/lib/openmpi/mca_coll_ml.so (ignored)


我记得当我使用openmpi编译代码并使用mpich或intel的mpirun版本运行代码时收到类似的警告。显然现在不是这种情况,但我想我提一提。

知道导致这些警告的原因是什么?

编辑:

为了确保我的运行时OpenMPI库确实是2.0.1,我在上面显示的代码行中添加了以下代码:

print'(3(A,I1))', "OpenMPI version = ", OMPI_MAJOR_VERSION, ".", OMPI_MINOR_VERSION, ".",&
  8                       OMPI_RELEASE_VERSION


它给出了以下输出:

OpenMPI version = 2.0.1


遵循VladimirF的建议,我运行了mpirun -v,它输出以下内容:

 [username:02210] mca_base_component_repository_open: unable to open mca_grpcomm_bad: dlopen(/usr/local/lib/openmpi/mca_grpcomm_bad.so, 9): Symbol not found: _orte_grpcomm_base_modex
  Referenced from: /usr/local/lib/openmpi/mca_grpcomm_bad.so
  Expected in: flat namespace
 in /usr/local/lib/openmpi/mca_grpcomm_bad.so (ignored)
--------------------------------------------------------------------------
No executable was specified on the mpirun command line.

Aborting.


此外,mpirun --version返回:mpirun (Open MPI) 2.0.1

最佳答案

感谢Gilles Gouaillardet在OpenMPI论坛上的帮助,我找到了问题所在。

问题:

我安装了较新的版本2.0.1,而未卸载1.10。由于我将其安装在同一位置,因此某些mca文件被覆盖,而其他mca文件在较新版本中已被删除或重命名,因此仍存在于目录中。最后,版本2.0.1无法识别这些模块文件,从而导致上述警告。

解:


删除所有插入文件:rm -rf /usr/local/lib/openmpi
重新安装Openmpi:make install

关于macos - openmpi忽略错误:无法识别mca接口(interface),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41380194/

10-09 16:31