FindMPI return the wrong path to Intel oneMPI headers
I try to use Intel oneAPI 2021.1 to compile Wordrank, but I'm running into some issues.
I first installed CMake 3.19.6 to avoid the single quote error. However, during compilation I get the following message:
-- The Fortran compiler identification is Intel 20.2.1.20201112
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort - skipped
-- Checking whether /opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort supports Fortran 90
-- Checking whether /opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort supports Fortran 90 - yes
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40") found components: program_options
-- Could NOT find MPI_C (missing: MPI_C_HEADER_DIR) (found version "3.1")
-- Could NOT find MPI_CXX (missing: MPI_CXX_HEADER_DIR) (found version "3.1")
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR) (found version "3.1")
CMake Error at /snap/cmake/805/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND MPI_Fortran_FOUND)
(found version "3.1")
Call Stack (most recent call first):
/snap/cmake/805/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
/snap/cmake/805/share/cmake-3.19/Modules/FindMPI.cmake:1722 (find_package_handle_standard_args)
CMakeLists.txt:15 (find_package)
When I check CMakeOutput.log I see that the path to the MPI headers directory is wrong: it's /opt/intel/oneapi/mpi/2021.1.1//include
instead of /opt/intel/oneapi/mpi/2021.1.1/include
. Could it be the issue? If it's, how can I fix it?
Edited by Brad King