[Trilinos-Users] [EXTERNAL] MPI_C_COMPILER conflict with CMAKE_C_COMPILER
Fan YE
yefanhust at gmail.com
Wed Jul 3 11:22:32 MDT 2013
That works. And thanks for the useful information about cross-compiling for
MIC, which will be my next step.
Best regards,
Fan
2013/7/3 Phipps, Eric T <etphipp at sandia.gov>
> You should be able to set the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER as
> the MPI compilers, e.g.,
>
> -D CMAKE_C_COMPILER:FILEPATH=/opt/intel/impi/4.1.1/intel64/bin/mpiicc \
> -D CMAKE_CXX_COMPILER:FILEPATH=/opt/intel/impi/4.1.1/intel64/bin/mpiicpc \
>
> That is how we typically build Trilinos with MPI. Note that
> cross-compiling for the Xeon Phi is not well supported by cmake. I did
> this a few months ago and found I had to add these flags as well to avoid
> various configure errors:
>
> -D CMAKE_CXX_FLAGS:STRING="-mmic" \
> -D CMAKE_C_FLAGS:STRING="-mmic" \
> -D Trilinos_ENABLE_Fortran:BOOL=OFF \
> -D BLAS_LIBRARY_DIRS:FILEPATH="${MKLROOT}/lib/mic" \
> -D BLAS_LIBRARY_NAMES="mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m" \
> -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0 \
> -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0 \
> -D LAPACK_SLAPY2_WORKS_EXITCODE=0 \
>
> As this was a few months ago, I can't guarantee it is still works.
>
> -Eric
>
> From: Fan YE <yefanhust at gmail.com>
> Date: Wednesday, July 3, 2013 7:46 AM
> To: "trilinos-users at software.sandia.gov" <
> trilinos-users at software.sandia.gov>
> Subject: [EXTERNAL] [Trilinos-Users] MPI_C_COMPILER conflict with
> CMAKE_C_COMPILER
>
> Hello everyone,
>
> I'm trying to install Trilinos with MPI enabled in a workstation
> equipped with Intel Xeon Phi coprocessors.
>
> I want to use intel compilers and intel MPI compiler wrappers, so I
> wrote my do-configure as follow:
>
> cmake \
> -D CMAKE_BUILD_TYPE:STRING=DEBUG \
> -D Trilinos_ENABLE_TESTS:BOOL=ON \
> -D TPL_ENABLE_MPI:BOOL=ON \
> -D MPI_USE_COMPILER_WRAPPERS:BOOL=ON \
> -D MPI_C_COMPILER:FILEPATH=/opt/intel/impi/4.1.1/intel64/bin/mpiicc \
> -D MPI_CXX_COMPILER:FILEPATH=/opt/intel/impi/4.1.1/intel64/bin/mpiicpc
> \
> -D CMAKE_C_COMPILER:FILEPATH=/opt/intel/composerxe/bin/icc \
> -D CMAKE_CXX_COMPILER:FILEPATH=/opt/intel/composerxe/bin/icc \
> -D CMAKE_C_FLAGS:STRING="-mkl" \
> -D CMAKE_CXX_FLAGS:STRING="-mkl" \
> ...
>
> So the idea here is dealing all with Intel products.
> However, when I finished configuring Trilinos, I always got such Cmake
> Warning:
>
> Manually-specified variables were not used by the project:
>
> MPI_CXX_COMPILER
> MPI_C_COMPILER
>
> It seems that the mpi compiler wrappers are not taken into account. The
> result of trying to "make" confirms this judge:
>
> /home/fye/tmp/trilinos-11.2.4/trilinos-11.2.4-Source/packages/teuchos/core/src/Teuchos_Time.hpp(56):
> catastrophic error: cannot open source file "mpi.h"
> #include "mpi.h"
> ^
> Apparently, the wrappers are not working in this case.
>
> Any one has any idea about this?
>
> Thank you in advance for any comments.
>
> Best regards,
> Fan
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130703/aaa2833a/attachment.html
More information about the Trilinos-Users
mailing list