[cmake-developers] FindMPI take 2

Alin Marin Elena alinm.elena at gmail.com
Tue Dec 9 06:59:15 EST 2014


Dear All,

recently I have run into some issues with FindMPI and intel mpi[1],
more intel mpi issue rather than cmake. The original issue reported
in[1] was solved. However in the process I made few points related
mainly to FindMPI, that I summarise in here:

1. the linker information is not parsed, see below
2. Failure to use the wrapper as a compiler.
3. Using wrong wrappers to interrogate for intel mpi and intel
compilers. eg. mpif90 instead of mpiifort (NB: If a user uses
I_MPI_F90=ifort, or c/c++ equivalents this issue is somehow
mittigated)

1. Linker issue
-- MPI_C_INCLUDE_PATH
/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/include
-- MPI_C_LINK_FLAGS
-- MPI_C_LIBRARIES
/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib/libmpifort.so;/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib/release/libmpi.so;/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib/libmpigi.a;/usr/lib64/libdl.so;/usr/lib64/librt.so;/usr/lib64/libpthread.so
-- Configuring done
-- Generating done
-- Build files have been written to: /ichec/home/staff/alin/findmpi/5.0.1
[alin at fionn2:~/findmpi/5.0.1]: mpicc -compile-info
gcc -I/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/include
-L/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib/release
-L/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib
-Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker
/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib/release
-Xlinker -rpath -Xlinker
/ichec/packages/intel/intel-cluster-studio-2015/impi_5.0.1/intel64/lib
-Xlinker -rpath -Xlinker /opt/intel/mpi-rt/5.0/intel64/lib/release
-Xlinker -rpath -Xlinker /opt/intel/mpi-rt/5.0/intel64/lib -lmpifort
-lmpi -lmpigi -ldl -lrt -lpthread

Patch attached
0001-correctly-detect-MPI-linker-flags-for-Intel-MPI-mayb.patch


2. We first use whatever is provided in FC to detect the
libs/includes/linker flags. I think the correct order shall be first
check if what is provided in FC build mpi binaries, if fails go to
interrogation.

patch attached
0002-first-try-to-see-if-what-user-provided-produces-an-m.patch


3. This is a more complex issue and my understanding is that FindMPI
was designed with mpicc/mpicxx/mpif90 being the workhorse wrappers for
MPI. While I do not propose to change that I think that implementing
the change at 2. will somehow mitigate the case of multiple wrappers
and compilers.



[1] http://www.cmake.org/Bug/view.php?id=15182


Without Questions there are no Answers!
______________________________________________________________________
Dr. Alin Marin ELENA
http://alin.elenaworld.net/
______________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-correctly-detect-MPI-linker-flags-for-Intel-MPI-mayb.patch
Type: text/x-diff
Size: 1277 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141209/d8431e39/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-first-try-to-see-if-what-user-provided-produces-an-m.patch
Type: text/x-diff
Size: 2341 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141209/d8431e39/attachment-0001.patch>


More information about the cmake-developers mailing list