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

compiling issue #12831

Closed
donggiang opened this issue Oct 15, 2021 · 3 comments
Closed

compiling issue #12831

donggiang opened this issue Oct 15, 2021 · 3 comments

Comments

@donggiang
Copy link

Hello,

I'm a new user of dealii. I've tried compiling dealii with trilinos. I used the same script that builds trilinos as provided in dealii readme (https://www.dealii.org/developer/external-libs/trilinos.html) except turning off SEACAS package, and Trilinos was built successfully. However, I had issues below. It's super helpful if someone can give any recommendation to resolve it.

Thanks,
Giang

[ 82%] Linking CXX executable ../bin/step-72.release
CMakeFiles/step-53.release.dir/step-53/step-53.cc.o: In function Teuchos::RCPNodeTmpl<Teuchos::TimeMonitorSurrogateImpl, Teuchos::DeallocDelete<Teuchos::TimeMonitorSurrogateImpl> >::throw_invalid_obj_exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void const*, Teuchos::RCPNode const*, void const*) const': step-53.cc:(.text._ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE_[_ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE_]+0x11d): undefined reference to Teuchos::TestForException_break(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
step-53.cc:(.text.ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE[ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE]+0x2b4): undefined reference to Teuchos::demangleName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' step-53.cc:(.text._ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE_[_ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE_]+0x35d): undefined reference to Teuchos::RCPNodeTracer::getCommonDebugNotesStringabi:cxx11'
step-53.cc:(.text.ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE[ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE]+0x3a9): undefined reference to Teuchos::TestForException_break(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' step-53.cc:(.text._ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE_[_ZNK7Teuchos11RCPNodeTmplINS_24TimeMonitorSurrogateImplENS_13DeallocDeleteIS1_EEE27throw_invalid_obj_exceptionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvPKNS_7RCPNodeESE_]+0x4d2): undefined reference to Teuchos::TestForException_break(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
CMakeFiles/step-53.release.dir/step-53/step-53.cc.o: In function Teuchos::TimeMonitorSurrogateImpl::summarize(std::ostream&)': step-53.cc:(.text._ZN7Teuchos24TimeMonitorSurrogateImpl9summarizeERSo[_ZN7Teuchos24TimeMonitorSurrogateImpl9summarizeERSo]+0x57): undefined reference to Teuchos::TimeMonitor::summarize(std::ostream&, bool, bool, bool, Teuchos::ECounterSetOp, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/media/ghuynh/Data1/mechanics/code/library/trilinos_installation_2/lib/libstratimikosamesos2.so: undefined reference to Amesos2::TachoSolver<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::TachoSolver(Teuchos::RCP<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const>, Teuchos::RCP<Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >, Teuchos::RCP<Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const>)' ../lib/libdeal_II.so.9.3.1: undefined reference to Teuchos::LabeledObject::getObjectLabelabi:cxx11 const'
../lib/libdeal_II.so.9.3.1: undefined reference to ML_Epetra::SetDefaults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Teuchos::ParameterList&, int*, double*, bool)' ../lib/libdeal_II.so.9.3.1: undefined reference to Epetra_Object::ReportError(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int) const'
../lib/libdeal_II.so.9.3.1: undefined reference to Teuchos::Describable::description[abi:cxx11]() const' ../lib/libdeal_II.so.9.3.1: undefined reference to Teuchos::LabeledObject::setObjectLabel(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
../lib/libdeal_II.so.9.3.1: undefined reference to Teuchos::mpiErrorCodeToString[abi:cxx11](int)' /media/ghuynh/Data1/mechanics/code/library/trilinos_installation_2/lib/libstratimikosamesos2.so: undefined reference to Amesos2::KLU2<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::KLU2(Teuchos::RCP<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const>, Teuchos::RCP<Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >, Teuchos::RCP<Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const>)'
../lib/libdeal_II.so.9.3.1: undefined reference to `Ifpack::Create(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, Epetra_RowMatrix*, int, bool)'
collect2: error: ld returned 1 exit status


@drwells
Copy link
Member

drwells commented Oct 15, 2021

All of these link failures have the same problem in common - they reference std::__cxx11::basic_string, which implies that there is an ABI incompatibility. This is probably due to compiling Trilinos with an older (e.g. GCC 4.8) compiler and deal.II with a newer compiler.

Can you check which compiler you used to build Trilinos?

@donggiang
Copy link
Author

yes, it happened exactly what you described. And I fixed it. Thank you so much :)).

@drwells
Copy link
Member

drwells commented Oct 15, 2021

Happy to help (and I am glad that this was not an issue with deal.II itself)!

@drwells drwells closed this as completed Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants