Building and running error with Epetra while pthread is enabled
Created by: kliegeois
I have two linked issues.
- While trying to run the MueLu tutorial, I faced a cast error:
Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed.
It seems that Tobias has already faced the same cast error in the test packages/muelu/test/navierstokes/Navier2D_Epetra.cpp as shown in the following print screen.
In my case, I am building on macOS Sierra 10.12.4 with clang (Apple LLVM version 8.1.0 (clang-802.0.41)) with pthread switched to ON , serial, openmp, and cuda switched to OFF. Disabling pthread removed the cast error and it was possible to run the MueLu tutorial.
- I have tried to build the TrilinosCouplings examples with pthread switched to ON , serial, openmp, and cuda switched to OFF. The compilation failed while compiling the file packages/trilinoscouplings/examples/scaling/IntrepidPoisson_Pamgen_Epetra_main.cpp with the following error:
In file included from /Users/kliegeois/dev/Trilinos/packages/trilinoscouplings/examples/scaling/IntrepidPoisson_Pamgen_Epetra_main.cpp:63:
In file included from /Users/kliegeois/dev/Trilinos/packages/teuchos/core/src/Teuchos_GlobalMPISession.hpp:52:
In file included from /Users/kliegeois/dev/Trilinos/packages/teuchos/core/src/Teuchos_ArrayView.hpp:47:
In file included from /Users/kliegeois/dev/Trilinos/packages/teuchos/core/src/Teuchos_ArrayRCP.hpp:46:
In file included from /Users/kliegeois/dev/Trilinos/packages/teuchos/core/src/Teuchos_ArrayRCPDecl.hpp:47:
/Users/kliegeois/dev/Trilinos/packages/teuchos/core/src/Teuchos_RCP.hpp:288:5: error: cannot initialize a member subobject of type
'MueLu::Hierarchy<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > *' with an
rvalue of type 'MueLu::Hierarchy<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Threads,
Kokkos::HostSpace> > *'
: ptr_(r_ptr.get()), // will not compile if T is not base class of T2
^ ~~~~~~~~~~~
/Users/kliegeois/dev/Trilinos/packages/trilinoscouplings/examples/scaling/IntrepidPoisson_Pamgen_Epetra_main.cpp:286:45: note: in
instantiation of function template specialization 'Teuchos::RCP<MueLu::Hierarchy<double, int, int,
Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::RCP<MueLu::Hierarchy<double, int, int,
Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Threads, Kokkos::HostSpace> > >' requested here
M = rcp(new MueLu::EpetraOperator(H));
This error was removed while compiling:
- with serial switched to ON , pthread, openmp, and cuda switched to OFF.
- or with pthread switched to ON , serial, openmp, and cuda switched to OFF, and TrilinosCouplings_ENABLE_Epetra:BOOL=OFF.