在香草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)
答案 0 :(得分:1)
您可以在执行以下操作后重试:
export MPI_C =`哪个mpicc`
export MPI_CXX =`哪个mpicxx`
这也可能是由于'spack'清洁了环境。因此,可能要尝试“ spack install --dirty ...”,或者将openmpi首选项放入packages.yaml
此外,我猜缺少的环境变量应该对应于以下路径或在以下路径下找到:
模块显示mpi
答案 1 :(得分:0)
答案 2 :(得分:0)
在运行cmake之前,将/ usr / lib64 / openmpi / bin /附加到PATH对我有用。