I have a mixed language MPI package that uses cmake on linux. While on Windows, I am using Visual Studio 2017. The C/C++ compiler will be the Microsoft cl, and Fortran compiler will be the Intel ifort 2017 (hosted in VS 2017). I know Microsoft has MPI msi, and Intel has its own MPI Library, is it possible to make it work with cmake?
Here is what I did, but cmake does not recognize either C or Fortran MPI component:
- Within VS2017, I select the ifort 2019.1.3.311 as Intel fortran compiler
- The Intel MPI library is installed in C:\Program Files (x86)\IntelSWTools\mpi\2019.10.321\intel64
- I set MPI_HOME to above installed location, and launch cmake-gui.exe
Here is the error:
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19043.
The C compiler identification is MSVC 19.16.27034.0
The Fortran compiler identification is Intel 19.1.3.20201010
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting Fortran compiler ABI info
Detecting Fortran compiler ABI info - done
Determine Intel Fortran Compiler Implicit Link Path
Determine Intel Fortran Compiler Implicit Link Path - done
Check for working Fortran compiler: C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.4.311/windows/bin/intel64/ifort.exe - skipped
Could NOT find MPI_C (missing: MPI_C_WORKS)
Could NOT find MPI_Fortran (missing: MPI_Fortran_WORKS)
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_Fortran_FOUND C Fortran)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.23/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args)
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
Obviously, I am missing something, right?