[cmake-developers] FindMPI and Intel MPI

Alin Marin Elena alinm.elena at gmail.com
Thu Dec 4 05:16:15 EST 2014


Hi,

I try to use findMPI with the new intel mpi 5.0.2 and their compilers.
Unfortunately it seems to fail to correctly find the include paths.

what I see at the moment
[10:07:03 alin at abaddon:~/playground/findmpi/a]: FC=mpiifort cmake ../
-- The Fortran compiler identification is Intel
-- Check for working Fortran compiler:
/opt/intel/impi_5.0.2/intel64/bin/mpiifort
-- Check for working Fortran compiler:
/opt/intel/impi_5.0.2/intel64/bin/mpiifort  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /opt/intel/impi_5.0.2/intel64/bin/mpiifort
supports Fortran 90
-- Checking whether /opt/intel/impi_5.0.2/intel64/bin/mpiifort
supports Fortran 90 -- yes
-- Found MPI_Fortran:
/opt/intel/impi_5.0.2/intel64/lib/libmpifort.so;/opt/intel/impi_5.0.2/intel64/lib/release_mt/libmpi.so;/opt/intel/im
pi_5.0.2/intel64/lib/libmpigi.a;/usr/lib64/libdl.so;/usr/lib64/librt.so;/usr/lib64/libpthread.so
-- MPI_Fortran_INCLUDE_PATH
/opt/intel/impi_5.0.2/intel64/include/gfortran/4.8.0;/opt/intel/impi_5.0.2/intel64/include
-- MPI_Fortran_LINK_FLAGS
-- MPI_Fortran_LIBRARIES
/opt/intel/impi_5.0.2/intel64/lib/libmpifort.so;/opt/intel/impi_5.0.2/intel64/lib/release_mt/libmpi.so;/opt/intel
/impi_5.0.2/intel64/lib/libmpigi.a;/usr/lib64/libdl.so;/usr/lib64/librt.so;/usr/lib64/libpthread.so

the same if I use FC=ifort and let FindMPI do its job

The direct issue is that the include path is wrongly set...
practically gets the gfortran path (mpif90 -show) rather the correct
intel one. of course any Use mpi will fail. To ensure this fails one
may change the example. or if mod gets found an example with it shall
be compiled.

The second issue I have seen is more a design issue. In the first
scenario I used directly the wrapper, I think FindMPI shall test it
and if whatever is in FC produces a proper mpi binary shall go ahead.
the logic in lines 570-621 I think shall be changed, any comments?

I will try to work on it and propose a patch but I would wecome some feedback.

regards,
Alin

Without Questions there are no Answers!
______________________________________________________________________
Dr. Alin Marin ELENA
http://alin.elenaworld.net/
______________________________________________________________________


More information about the cmake-developers mailing list