【问题标题】:Install openmpi and compilation failed with linking mpi_cxx安装openmpi,编译失败,链接mpi_cxx
【发布时间】:2021-05-12 02:34:27
【问题描述】:

大家好

我目前正在通过tar.gz 文件在ubuntu18.04 上安装openmpi-4.1.1。 但是,当我将nvcc (CUDA 11.2.2) 编译器与-lmpi_cxx 一起使用时,它会报告此链接选项不存在。

在构建和安装 openmpi 时有什么问题吗? 在构建具有 CUDA 感知能力的 openmpi 时,我使用以下命令。

./configure --with-cuda 
make -j8 install

我尝试删除-lmpi_cxx,只保留-lmpi,编译器会报告类似的错误

undefined reference to `MPI::Comm::Comm()'

非常感谢!

【问题讨论】:

    标签: openmpi nvcc


    【解决方案1】:

    我只是自己解决这个问题。 在构建openmpi 时,我需要启用 MPI 的 c++ 绑定。 以下是命令

    ./configure --enable-mpi-cxx --with-cuda
    make all install
    

    【讨论】:

      猜你喜欢
      • 2012-11-23
      • 1970-01-01
      • 1970-01-01
      • 2020-10-10
      • 2014-06-01
      • 1970-01-01
      • 2012-11-04
      • 2020-10-03
      • 1970-01-01
      相关资源
      最近更新 更多