【问题标题】:Could NOT find MPI_C and MPI cmake on Ubuntu 18.04在 Ubuntu 18.04 上找不到 MPI_C 和 MPI cmake
【发布时间】:2020-07-25 11:39:48
【问题描述】:
- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libusb-1.0>=1.0.17'
--   Found libusb-1.0, version 1.0.21
-- Checking for module 'opencv>=3.0'
--   Found opencv, version 3.2.0
-- Checking for module 'libcaer>=2.0'
--   Found libcaer, version 3.3.7
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1")
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindMPI.cmake:1444 (find_package_handle_standard_args)
  CMakeLists.txt:193 (find_package)

尝试了所有导出的路径,我在谷歌上找到的所有东西仍然有这个烦人的错误。

Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.10.2-1ubuntu2.18.04.1).

哪个命令结果:

endrel@Siraly:~/Developer/BrainHarmonics/build$ which mpicc
/usr/bin/mpicc
endrel@Siraly:~/Developer/BrainHarmonics/build$ which mpicxx
/usr/bin/mpicxx

【问题讨论】:

  • 你能把CMakeFiles/CMakeError.log的输出从你的构建目录中发布出来吗?

标签: c++ c cmake mpi ubuntu-16.04


【解决方案1】:

来自FindMPI.cmake module

如果对变量MPI_<lang>_WORKS 的查找过程失败,则由模块检测或传递给模块的设置不起作用,甚至一个简单的 MPI 测试程序也无法编译。

-- 找不到 MPI_C(缺少:MPI_C_WORKS)

您的 mpicc 已找到,但可能无法正常工作。

可能你的CMakeLists.txt是错误的,但你没有提供它的内容,所以很难说。

【讨论】:

    猜你喜欢
    • 2019-01-12
    • 2018-10-22
    • 2020-03-01
    • 2021-04-19
    • 1970-01-01
    • 1970-01-01
    • 2019-11-20
    • 1970-01-01
    • 2023-03-17
    相关资源
    最近更新 更多