[Trilinos-Users] trilinos configure failure using pathscale

Perschbacher, Brent M bmpersc at sandia.gov
Tue Feb 16 11:52:28 MST 2010


That is the right variable to be setting, but there is a small caveat to using it in Trilinos. The CMAKE_<compiler>_FLAGS that are set by the user come before our default flags so you won't be able to override anything that we set with that. I don't know that we set anything that conflicts with MPICH_IGNORE_CXX_SEEK, but I can't say for certain until I see a full command line from the build.

Here are the relevant sections of our cmake quickstart file that covers how to add compile flags, or to override all the flags completely.

  b) Adding arbitrary compiler flags but keeping other default flags:

    To append arbitrary compiler flags, configure with:

      -DCMAKE_<COMPILER>_FLAGS:STRING="<EXTRA_COMPILER_OPTIONS>"

    where <COMPILER> = C, CXX, Fortran and <EXTRA_COMPILER_OPTIONS> are your
    extra compiler options like "-DSOME_MACRO_TO_DEFINE -funroll-loops".

    NOTE: Compiler options set with CMAKE_<COMPILER>_FLAGS will *not* override
    the set debug or release options which come after on the compile line.
    Therefore, this approach should only be used for options that will not get
    overridden by the internally-set debug or release compiler options.
    However, setting CMAKE_<COMPILER>_FLAGS will work well for adding extra
    compiler defines for example.

    NOTE: Any options that you set through the cache varible
    CMAKE_<COMPILER>_FLAGS_<BUILD_TYPE> (where <BUILD_TYPE> = DEBUG or
    RELEASE) will get overridden in the code so don't try to manually set
    CMAKE_<COMPILER>_FLAGS_<BUILD_TYPE>.

  c) Overriding debug/release compiler options:

    To pass in compiler options that override the default debug or release
    options use:

      -D CMAKE_BUILD_TYPE:STRING=NONE \
      -D CMAKE_C_FLAGS:STRING="-04 -funroll-loops" \
      -D CMAKE_CXX_FLAGS:STRING="-03 -fexceptions"

    where LANGUAGE = C, CXX, Fortran, etc.

    NOTE: Using CMAKE_BUILD_TYPE:STRING=NONE allows you to take complete
    control over what debug or release compiler optimizations or related
    options are passed to the compiler.


Brent






On 2/16/10 10:58 AM, "John R. Cary" <cary at colorado.edu> wrote:

Thanks.  Got past configure.

Now trying to get around

inos-10.0.4p1/par/packages/epetra/src
-I/project/projectdirs/vorpal/cary/projects/vpall-franklin/builds-path/trilinos/packages/epetra/src
-o CMakeFiles/epetra.dir/Epetra_C_wrappers.cpp.o -c
/project/projectdirs/vorpal/cary/projects/vpall-franklin/builds-path/trilinos/packages/epetra/src/Epetra_C_wrappers.cpp
/opt/cray/xt-asyncpe/3.3/bin/CC: INFO: linux target is being used
In file included from /opt/mpt/3.5.0/xt/mpich2-pathscale/include/mpi.h:1110,
                  from
/project/projectdirs/vorpal/cary/projects/vpall-franklin/builds-path/trilinos/packages/epetra/src/Epetra_C_wrappers.cpp:33:
/opt/mpt/3.5.0/xt/mpich2-pathscale/include/mpicxx.h:26:2: error: #error
"SEEK_SET is #defined but must not be for the C++ binding of MPI"
/opt/mpt/3.5.0/xt/mpich2-pathscale/include/mpicxx.h:30:2: error: #error
"SEEK_CUR is #defined but must not be for the C++ binding of MPI"
/opt/mpt/3.5.0/xt/mpich2-pathscale/include/mpicxx.h:35:2: error: #error
"SEEK_END is #defined but must not be for the C++ binding of MPI"
make[2]: ***
[packages/epetra/src/CMakeFiles/epetra.dir/Epetra_C_wrappers.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....


Do I do

  CMAKE_CXX_FLAGS=-DMPICH_IGNORE_CXX_SEEK

to have this flag added into any kind of build?  (DEBUG, RELEASE, etc.)...

Or will this overwrite the other flags?

Thx....John





On 2/16/2010 8:44 AM, Brad King wrote:
> John R Cary wrote:
>
>> Brad King wrote:
>>
>>> Please send me (off list) a tarball of the CMakeFiles/FortranCInterface
>>> directory from the build tree.
>>>
>> Here is the full CmakeFiles directory.
>>
> Try applying the patch below to the CMake Modules directory.
>
> -Brad
>
> diff --git a/Modules/FortranCInterface/my_module_.c b/Modules/FortranCInterface/my_module_.c
> index 0d7091f..364b214 100644
> --- a/Modules/FortranCInterface/my_module_.c
> +++ b/Modules/FortranCInterface/my_module_.c
> @@ -1,2 +1,8 @@
> +#if defined(__PATHSCALE__)
> +/* PathScale Fortran wants my_module_ when calling any my_module symbol,
> +   but module symbols use '.in.' so we cannot provide them anyway.  */
> +void pathscale_my_module_(void) {}
> +#else
>   /* PGI Fortran wants my_module_ when calling any my_module symbol.  */
>   void my_module_(void) {}
> +#endif
>
>


_______________________________________________
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/20100216/0feb909d/attachment-0001.html 


More information about the Trilinos-Users mailing list