我正在尝试编译 SimulateQCD 但是我正在努力弄清楚如何告诉 cmake 在哪里寻找 MPI 库。我已经安装了
openmpi-devel
并找到了头文件。我已经尝试提高特异性,但它似乎坚持here。既然我已经明确告诉它要查找,但它仍然没有找到 MPI,我就不知所措了。我以前没有使用过 CMake,所以我在解释它产生的相当神秘的消息时也遇到了一些麻烦。
[root@rockylinux build]# cmake ../simulateqcd/ -DARCHITECTURE="70" -DUSE_GPU_AWARE_MPI=ON -DUSE_GPU_P2P=ON -DMPI_CXX_LIB_NAMES=/usr/lib64/openmpi/lib -DMPI_CXX_HEADER_DIR=/usr/include/openmpi-x86_64 -DMPI_C_COMPILER=/usr/lib64/openmpi/bin/mpicxx
-- Using git version 43e2518
-- Using CUDA backend
-- Could NOT find MPI_CXX (missing: MPI_/usr/lib64/openmpi/lib_LIBRARY MPI_CXX_WORKS) (Required is at least version "3.1")
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MPI (missing: MPI_CXX_FOUND) (Required is at least version
"3.1")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindMPI.cmake:1742 (find_package_handle_standard_args)
CMakeLists.txt:56 (find_package)
-- Configuring incomplete, errors occurred!
See also "/opt/build/CMakeFiles/CMakeOutput.log".
See also "/opt/build/CMakeFiles/CMakeError.log".
# Check Compiler Paths
[root@rockylinux build]# /usr/lib64/openmpi/bin/mpicxx --showme:compile
-I/usr/include/openmpi-x86_64
[root@rockylinux build]# /usr/lib64/openmpi/bin/mpicxx --showme:link
-Wl,-rpath -Wl,/usr/lib64/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi/lib -lmpi_cxx -lmpi