[Trilinos-Users] [EXTERNAL] Re: Compiling and Linking Errors with Intel

Truman Ellis truman.e.ellis at gmail.com
Thu May 21 14:39:58 EDT 2015


That seems to have moved things forward somewhat, but now I am getting a
different set of link warnings/errors, pasted below. The error stems from a
complaint that the ML_Epetra namespace doesn't contain a
MultiLevelPreconditioner
member. For context, my source file that generates this error has the
following #includes:
#include "ml_include.h"
#include "ml_MultiLevelPreconditioner.h"
#include "ml_epetra_utils.h"

When I open up the installed ml_MultiLevelPreconditioner.h file, I
definitely see a definition for class MultiLevelPreconditioner.

In file included from
/opt/apps/intel15/mvapich2_2_1/petsc/3.5/sandybridge/include/ml_common.h(56),
                 from
/opt/apps/intel15/mvapich2_2_1/petsc/3.5/sandybridge/include/ml_include.h(16),
                 from
/work/01837/truman/Camellia/src/include/SimpleMLSolver.h(13),
                 from
/work/01837/truman/Camellia/src/Solution/Solver.cpp(11):
/opt/apps/intel15/mvapich2_2_1/petsc/3.5/sandybridge/include/ml_config.h(25):
warning #47: incompatible redefinition of macro "HAVE_BLAS" (declared at
line 70 of "/work/01837/truman/trilinosRelease/lib/cm
ake/Trilinos/../../../include/Epetra_config.h")
  #define HAVE_BLAS 1
          ^

In file included from
/opt/apps/intel15/mvapich2_2_1/petsc/3.5/sandybridge/include/ml_common.h(56),
                 from
/opt/apps/intel15/mvapich2_2_1/petsc/3.5/sandybridge/include/ml_include.h(16),
                 from
/work/01837/truman/Camellia/src/include/SimpleMLSolver.h(13),
                 from
/work/01837/truman/Camellia/src/Solution/Solver.cpp(11):
/opt/apps/intel15/mvapich2_2_1/petsc/3.5/sandybridge/include/ml_config.h(67):
warning #47: incompatible redefinition of macro "HAVE_LAPACK" (declared at
line 105 of "/work/01837/truman/trilinosRelease/lib
/cmake/Trilinos/../../../include/Epetra_config.h")
  #define HAVE_LAPACK 1
          ^

In file included from
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO_ConfigDefs.h(83),
                 from
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO.h(48),
                 from
/work/01837/truman/Camellia/src/include/SimpleMLSolver.h(18),
                 from
/work/01837/truman/Camellia/src/Solution/Solver.cpp(11):
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO_config.h(41):
warning #47: incompatible redefinition of macro "HAVE_BLAS" (declared at
line 25 of "/opt/apps/intel15/mvapich2
_2_1/petsc/3.5/sandybridge/include/ml_config.h")
  #define HAVE_BLAS
          ^

In file included from
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO_ConfigDefs.h(83),
                 from
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO.h(48),
                 from
/work/01837/truman/Camellia/src/include/SimpleMLSolver.h(18),
                 from
/work/01837/truman/Camellia/src/Solution/Solver.cpp(11):
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO_config.h(71):
warning #47: incompatible redefinition of macro "HAVE_LAPACK" (declared at
line 67 of "/opt/apps/intel15/mvapic
h2_2_1/petsc/3.5/sandybridge/include/ml_config.h")
  #define HAVE_LAPACK
          ^

In file included from
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO_ConfigDefs.h(83),
                 from
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO.h(48),
                 from
/work/01837/truman/Camellia/src/include/SimpleMLSolver.h(18),
                 from
/work/01837/truman/Camellia/src/Solution/Solver.cpp(11):
/work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/AztecOO_config.h(120):
warning #47: incompatible redefinition of macro "HAVE_STRING" (declared at
line 209 of "/opt/apps/intel15/mvap
ich2_2_1/petsc/3.5/sandybridge/include/ml_config.h")
  #define HAVE_STRING
          ^

In file included from
/work/01837/truman/Camellia/src/Solution/Solver.cpp(11):
/work/01837/truman/Camellia/src/include/SimpleMLSolver.h(26): error:
namespace "ML_Epetra" has no member "MultiLevelPreconditioner"
          Teuchos::RCP< ML_Epetra::MultiLevelPreconditioner >
_savedPreconditioner;

On Thu, May 21, 2015 at 12:16 PM Phipps, Eric T <etphipp at sandia.gov> wrote:

>  -D Trilinos_ENABLE_CXX11=ON
>
>  -Eric
>
>   From: Truman Ellis <truman.e.ellis at gmail.com>
> Date: Thursday, May 21, 2015 at 11:10 AM
> To: "Bartlett, Roscoe A." <bartlettra at ornl.gov>, "
> trilinos-users at trilinos.org" <trilinos-users at trilinos.org>
> Subject: [EXTERNAL] Re: [Trilinos-Users] Compiling and Linking Errors
> with Intel
>
>   Is there a shortcut to enable C++11 support for all packages, or do I
> need a line like that for every project I want to build?
>
> On Thu, May 21, 2015 at 12:08 PM Bartlett, Roscoe A. <bartlettra at ornl.gov>
> wrote:
>
>>  Truman,
>>
>>
>>
>> Instructions for turning on C++11 support is described here:
>>
>>
>>
>>
>> https://tribits.org/doc/TribitsBuildReference.html#enabling-support-for-c-11
>>
>>
>>
>> The variable CMAKE_CXX_STANDARD was not present in CMake 2.8.11:
>>
>>
>>
>>        http://www.cmake.org/cmake/help/v2.8.11/cmake.html
>>
>>
>>
>> and therefore we can’t use it.  We have to maintain backward
>> compatibility to CMake 2.8.11, at least for now.
>>
>>
>>
>> -Ross
>>
>>
>>
>>
>>
>> *From:* Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] *On
>> Behalf Of *Truman Ellis
>> *Sent:* Thursday, May 21, 2015 12:48 PM
>> *To:* trilinos-users at trilinos.org
>> *Subject:* [Trilinos-Users] Compiling and Linking Errors with Intel
>>
>>
>>
>> I downloaded Trilinos 12.0.1 and compiled it with intel compilers on
>> TACC's Stampede supercomputer. However, when I try to link to it from my
>> application, I get a bunch of errors similar to
>>
>> In file included from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/Kokkos_View.hpp(56),
>>
>>                  from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/Kokkos_Parallel.hpp(52),
>>
>>                  from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/Kokkos_Serial.hpp(52),
>>
>>                  from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/Kokkos_Core.hpp(61),
>>
>>                  from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/KokkosRank.hpp(4),
>>
>>                  from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/Intrepid_ArrayTools.hpp(57),
>>
>>                  from
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/Intrepid_FunctionSpaceTools.hpp(53),
>>
>>                  from
>> /work/01837/truman/Camellia/src/ScratchPad/IP.cpp(9):
>>
>> /work/01837/truman/trilinosRelease/lib/cmake/Trilinos/../../../include/impl/Kokkos_ViewOffset.hpp(1215):
>> error: namespace "std" has no member "enable_if"
>>
>>     typename std::enable_if< (std::is_integral<I0>::value) &&
>> (shape_type::rank==1),size_type>::type
>>
>>
>>
>> I've made sure my do-configure scripts for both Trilinos and my own
>> application include a line
>>
>> -D CMAKE_CXX_STANDARD:STRING="11" \
>>
>> in order to guarantee compilation with C++11. Any advice on how to fix
>> this?
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150521/4f693cc3/attachment-0001.html>


More information about the Trilinos-Users mailing list