Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile issues with latest Trilinos #10

Open
balay opened this issue Aug 1, 2018 · 0 comments
Open

Compile issues with latest Trilinos #10

balay opened this issue Aug 1, 2018 · 0 comments

Comments

@balay
Copy link

balay commented Aug 1, 2018

Attempting to build petsc with latest trilinos and latest xsdktrilinos - i get errors:

In file included from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/src/BelosPETScSolMgr.cpp:44:0:
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/src/BelosPETScSolMgr.hpp:119:149: error: wrong number of template arguments (5, should be 4)
   typedef Tpetra::Vector<ScalarType,typename OP::local_ordinal_type,typename OP::global_ordinal_type, typename OP::node_type, OP::node_type::classic> Vector;
                                                                                                                                                     ^
In file included from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Tpetra_MultiVector.hpp:1:0,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/src/BelosPETScSolMgr.hpp:65,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/src/BelosPETScSolMgr.cpp:44:
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Tpetra_MultiVector_decl.hpp:72:56: error: provided for ‘template<class S, class LO, class GO, class N> class Tpetra::Vector’
   template<class S, class LO, class GO, class N> class Vector;
                                                        ^
make[2]: *** [petsc/src/CMakeFiles/xsdkpetsc.dir/BelosPETScSolMgr.cpp.o] Error 1

Perhaps the following fix?

diff --git a/petsc/src/BelosPETScSolMgr.hpp b/petsc/src/BelosPETScSolMgr.hpp
index 88df545..757dabe 100644
--- a/petsc/src/BelosPETScSolMgr.hpp
+++ b/petsc/src/BelosPETScSolMgr.hpp
@@ -116,7 +116,7 @@ template<class ScalarType, class OP>
 class PETScSolMgrHelper<ScalarType,Tpetra::MultiVector<ScalarType,typename OP::local_ordinal_type,typename OP::global_ordinal_type>,OP> {
 private:
   typedef Tpetra::MultiVector<ScalarType,typename OP::local_ordinal_type,typename OP::global_ordinal_type> MV;
-  typedef Tpetra::Vector<ScalarType,typename OP::local_ordinal_type,typename OP::global_ordinal_type, typename OP::node_type, OP::node_type::classic> Vector;
+  typedef Tpetra::Vector<ScalarType,typename OP::local_ordinal_type,typename OP::global_ordinal_type, typename OP::node_type> Vector;
 
 public:
   static void getData(const MV& x, const int i, const ScalarType* &rawData)

But then I get:

/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:87:18: error: ‘Teuchos::TypeTraits’ has not been declared
   using Teuchos::TypeTraits::is_same;
                  ^
In file included from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_LocalTestingHelpers.hpp:56:0,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_UnitTestHarness.hpp:54,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:45:
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp: In member function ‘void {anonymous}::PETScAIJMatrix_Typedefs_UnitTest<GO, Node>::runUnitTestImpl(Teuchos::FancyOStream&, bool&) const’:
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:800:27: error: ‘is_same’ was not declared in this scope
     TEST_EQUALITY_CONST( (is_same< scalar_type         , Scalar >::value) == true, true );
                           ^
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_TestingHelpers.hpp:252:42: note: in definition of macro ‘TEUCHOS_TEST_EQUALITY_CONST’
     (out) << #v1" = "<<Teuchos::toString(v1)<<" == "<<Teuchos::toString(v2)<<" : "; \
                                          ^
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:800:5: note: in expansion of macro ‘TEST_EQUALITY_CONST’
     TEST_EQUALITY_CONST( (is_same< scalar_type         , Scalar >::value) == true, true );
     ^
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:800:27: note: suggested alternatives:
     TEST_EQUALITY_CONST( (is_same< scalar_type         , Scalar >::value) == true, true );
                           ^
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_TestingHelpers.hpp:252:42: note: in definition of macro ‘TEUCHOS_TEST_EQUALITY_CONST’
     (out) << #v1" = "<<Teuchos::toString(v1)<<" == "<<Teuchos::toString(v2)<<" : "; \
                                          ^
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:800:5: note: in expansion of macro ‘TEST_EQUALITY_CONST’
     TEST_EQUALITY_CONST( (is_same< scalar_type         , Scalar >::value) == true, true );
     ^
In file included from /usr/include/c++/4.8/bits/move.h:57:0,
                 from /usr/include/c++/4.8/bits/stl_pair.h:59,
                 from /usr/include/c++/4.8/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/string:40,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_ConfigDefs.hpp:85,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_ConstTypeTraits.hpp:46,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_TypeNameTraits.hpp:50,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_TestForException.hpp:49,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_Assert.hpp:46,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_VerbosityLevel.hpp:51,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_Describable.hpp:45,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_ReductionOp.hpp:45,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_Comm.hpp:45,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Teuchos_CommHelpers.hpp:45,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:44:
/usr/include/c++/4.8/type_traits:823:12: note:   ‘std::is_same’
     struct is_same;
            ^
In file included from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Kokkos_MemoryTraits.hpp:47:0,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Kokkos_HostSpace.hpp:54,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Kokkos_View.hpp:53,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Kokkos_Parallel.hpp:52,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Kokkos_Serial.hpp:55,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Kokkos_Core.hpp:53,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/KokkosCompat_ClassicNodeAPI_Wrapper.hpp:5,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/Tpetra_ConfigDefs.hpp:48,
                 from /sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/externalpackages/git.xsdktrilinos/petsc/test/PETScAIJMatrix_UnitTests.cpp:47:
/sandbox/petsc/petsc.next-tmp/arch-linux-xsdk-dbg/include/impl/Kokkos_Traits.hpp:166:38: note:   ‘Kokkos::Impl::is_same’
 template< class X , class Y > struct is_same : public false_type {};
                                      ^

etc..

Is it possible to make xsdktrilinos (master) compatible with trilinos (master/develop)?

cc: @BarrySmith

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant