I’m getting failures when finding MPI:
Could NOT find MPI (missing: MPI_CXX_FOUND CXX) Reason given by package: MPI component 'Fortran' was requested, but language Fortran is not enabled.
My CMake code:
find_package( MPI REQUIRED COMPONENTS CXX )
I’m not compiling any fortran, although there are some fortran files in my project that are conditionally compiled.
The MPI installation is found (MPI_CXX_COMPILER
and other MPI_CXX_*
cache variables are populated). I’ve tried setting things like MPIEXEC_EXECUTABLE
, MPI_HOME
, etc. with no effect.
System information:
- CMake version 3.18.12 on Linux
- openmpi version 4.0.4
Other things I’ve tried:
-
CMake versions 3.13.3 and 3.15.3, which fail with:
Could NOT find MPI (missing: MPI_CXX_FOUND CXX)
and don’t include the “Fortran” message.
-
On OSX, there is no problem.
-
An
mpich
installation doesn’t appear to manifest this problem.
I’ve seen some discussion here, but there wasn’t an apparent resolution.
Any tips on how to troubleshoot this? I’m suspecting a potential problem with the openmpi
installation, but CMake
isn’t helping here…