[Trilinos-Users] MPI_C_COMPILER conflict with CMAKE_C_COMPILER

Pavel Jiránek pavel.jiranek at gmail.com
Wed Jul 3 08:17:09 MDT 2013


This is my script:

export CC=/usr/local/bin/mpicc
export CXX=/usr/local/bin/mpic++

cmake \
    -D Trilinos_ASSERT_MISSING_PACKAGES:BOOL=OFF \
    -D BUILD_TESTING:BOOL=ON \
    -D CMAKE_BUILD_TYPE:STRING=RELEASE \
    -D CMAKE_INSTALL_PREFIX:PATH=$HOME/local/opt/trilinos \
    -D CMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
    -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
    -D TPL_ENABLE_BLAS:STRING=ON \
    -D TPL_ENABLE_LAPACK:STRING=ON \
    -D TPL_ENABLE_MPI:STRING=ON \
    -D Trilinos_ENABLE_Amesos:STRING=ON \
    -D Trilinos_ENABLE_Amesos2:STRING=ON \
    -D Trilinos_ENABLE_AztecOO:STRING=ON \
    -D Trilinos_ENABLE_Belos:STRING=ON \
    -D Trilinos_ENABLE_Epetra:STRING=ON \
    -D Trilinos_ENABLE_EpetraExt:STRING=ON \
    -D Trilinos_ENABLE_Ifpack:STRING=ON \
    -D Trilinos_ENABLE_ML:STRING=ON \
    -D Trilinos_ENABLE_MueLu:STRING=ON \
    -D Trilinos_ENABLE_Teuchos:STRING=ON \
    -D Trilinos_ENABLE_Triutils:STRING=ON \
    -D Trilinos_ENABLE_Isorropia:STRING=ON \
    -D Trilinos_ENABLE_Zoltan:STRING=ON \
    -D CMAKE_OSX_SYSROOT:PATH=/ \
    ../trilinos.repo


In the same way, you can also specify additional compiler flags, e.g.,
using CXXFLAGS. At least this works fine in all environments I use.

Pavel



On Wed, Jul 3, 2013 at 4:07 PM, Fan YE <yefanhust at gmail.com> wrote:

> Could you please specify your solution? I've tried also export these
> variables before or after "cmake -D..." but it just didn't work.
>
> Best regards,
> Fan
>
>
> 2013/7/3 Pavel Jiránek <pavel.jiranek at gmail.com>
>
>> Hi Fan,
>>
>> Setting the environment variables CC and CXX in the configuration script
>> works just fine for me, e.g.:
>>
>> export CC=mpicc
>> export CXX=mpicxx
>>
>> Best wishes,
>> Pavel
>>
>>
>>
>> On Wed, Jul 3, 2013 at 3:46 PM, Fan YE <yefanhust at gmail.com> wrote:
>>
>>> 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
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130703/555fd522/attachment.html 


More information about the Trilinos-Users mailing list