在 Ubuntu 18.04 上找不到 MPI_C 和 MPI cmake [英] Could NOT find MPI_C and MPI cmake on Ubuntu 18.04

查看:472
本文介绍了在 Ubuntu 18.04 上找不到 MPI_C 和 MPI cmake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

- 找到 PkgConfig:/usr/bin/pkg-config(找到版本0.29.1")-- 检查模块'libusb-1.0>=1.0.17'-- 找到 libusb-1.0,版本 1.0.21-- 检查模块'opencv>=3.0'--找到opencv,版本3.2.0-- 检查模块'libcaer>=2.0'-- 找到 libcaer,版本 3.3.7-- 找不到 MPI_C(缺少:MPI_C_WORKS)-- 找到 MPI_CXX:/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so(找到版本3.1")/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake 处的 CMake 错误:137(消息):找不到 MPI(缺少:MPI_C_FOUND)(找到版本3.1")调用堆栈(最近调用优先):/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)

尝试了所有导出的路径完成了我在谷歌上找到的所有内容仍然有这个烦人的错误.

正在读取包列表...完成构建依赖树读取状态信息...完成cmake 已经是最新版本 (3.10.2-1ubuntu2.18.04.1).

哪个命令结果:

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

解决方案

来自 FindMPI.cmake 模块:

<块引用>

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

<块引用>

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

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

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

- 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)

Tried everything exported the paths done everything I've found on google still have this annoying error.

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

Which command results:

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

解决方案

From FindMPI.cmake module:

If the find procedure fails for a variable MPI_<lang>_WORKS, then the settings detected by or passed to the module did not work and even a simple MPI test program failed to compile.

-- Could NOT find MPI_C (missing: MPI_C_WORKS)

Your mpicc is found but probably not working correctly.

Maybe your CMakeLists.txt is wrong, but you didn't provide it's content, so it's hard to say.

这篇关于在 Ubuntu 18.04 上找不到 MPI_C 和 MPI cmake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆