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

Phipps, Eric T etphipp at sandia.gov
Thu May 21 16:15:36 EDT 2015


No, this would be from your include path, not LD_LIBRARY_PATH.

-Eric

From: Truman Ellis <truman.e.ellis at gmail.com<mailto:truman.e.ellis at gmail.com>>
Date: Thursday, May 21, 2015 at 2:06 PM
To: Eric Phipps <etphipp at sandia.gov<mailto:etphipp at sandia.gov>>, "Bartlett, Roscoe A." <bartlettra at ornl.gov<mailto:bartlettra at ornl.gov>>, "trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>" <trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>>
Subject: Re: [EXTERNAL] Re: [Trilinos-Users] Compiling and Linking Errors with Intel

I tried clearing my $LD_LIBRARY_PATH before building my application, but I still get these warnings. Is there a different approach I should be using?

On Thu, May 21, 2015 at 2:58 PM Phipps, Eric T <etphipp at sandia.gov<mailto:etphipp at sandia.gov>> wrote:
But it appears to be pulling in ML through Petsc instead of through Trilinos, e.g.,:

/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”)

You probably need to get Petsc out of your include path.  The Petsc version of ML probably is old and doesn’t have the MultiLevelPreconditioner class.

-Eric

From: Truman Ellis <truman.e.ellis at gmail.com<mailto:truman.e.ellis at gmail.com>>
Date: Thursday, May 21, 2015 at 1:52 PM

To: Eric Phipps <etphipp at sandia.gov<mailto:etphipp at sandia.gov>>, "Bartlett, Roscoe A." <bartlettra at ornl.gov<mailto:bartlettra at ornl.gov>>, "trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>" <trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>>
Subject: Re: [EXTERNAL] Re: [Trilinos-Users] Compiling and Linking Errors with Intel

Our code doesn't use Petsc, I believe those petsc references in the directory paths are just where the TACC admins store the various module files for this system.

On Thu, May 21, 2015 at 2:47 PM Phipps, Eric T <etphipp at sandia.gov<mailto:etphipp at sandia.gov>> wrote:
Are you trying to link in ML both through Trilinos and Petsc?  That is unlikely to work.  Do they even have the same version of ML?

-Eric

From: Truman Ellis <truman.e.ellis at gmail.com<mailto:truman.e.ellis at gmail.com>>
Date: Thursday, May 21, 2015 at 12:39 PM
To: Eric Phipps <etphipp at sandia.gov<mailto:etphipp at sandia.gov>>, "Bartlett, Roscoe A." <bartlettra at ornl.gov<mailto:bartlettra at ornl.gov>>, "trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>" <trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>>
Subject: Re: [EXTERNAL] Re: [Trilinos-Users] Compiling and Linking Errors with Intel

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<mailto:etphipp at sandia.gov>> wrote:
-D Trilinos_ENABLE_CXX11=ON

-Eric

From: Truman Ellis <truman.e.ellis at gmail.com<mailto:truman.e.ellis at gmail.com>>
Date: Thursday, May 21, 2015 at 11:10 AM
To: "Bartlett, Roscoe A." <bartlettra at ornl.gov<mailto:bartlettra at ornl.gov>>, "trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>" <trilinos-users at trilinos.org<mailto: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<mailto: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<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<mailto: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/2d804f4f/attachment.html>


More information about the Trilinos-Users mailing list