在 vanilla CentOS 7 机器上,我安装了 OpenMPI(库存版),并且做了:
module load mpi
将 MPI 内容加载到环境中。在此设置下,cmake(我尝试了 2.8 和最新的 3.12)似乎找不到 MPI。知道如何解决这个问题吗?谢谢
-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
CMake Error at /home/f7b/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/cmake-3.12.2-25n7srkgvu3elwswze6dckezvfkxqks7/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
Call Stack (most recent call first):
/home/f7b/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/cmake-3.12.2-25n7srkgvu3elwswze6dckezvfkxqks7/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/home/f7b/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/cmake-3.12.2-25n7srkgvu3elwswze6dckezvfkxqks7/share/cmake-3.12/Modules/FindMPI.cmake:1666 (find_package_handle_standard_args)
CMakeLists.txt:27 (find_package)