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

Impossible to build dealii (Trilinos problem) on Macbook pro with M1Pro #14373

Closed
Francyrad opened this issue Oct 24, 2022 · 13 comments
Closed

Comments

@Francyrad
Copy link

Dear developers,

I was trying to install dealii as described in the guide for m1pro. However, I encounter an error during the installation as the Candi fails to install trilinos as it lacks support for arm64.

I report below the error, I hope you can help me solve the problem.

Thanks in advance
Francis

[ 70%] Linking CXX shared library libstratimikosamesos2.dylib
Undefined symbols for architecture arm64:
"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>)", referenced from:
Amesos2::create_solver_with_supported_type<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> > >::apply(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>) in Thyra_Amesos2LinearOpWithSolveFactory.cpp.o
"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>)", referenced from:
Amesos2::create_solver_with_supported_type<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> > >::apply(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>) in Thyra_Amesos2LinearOpWithSolveFactory.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/stratimikos/adapters/amesos2/src/libstratimikosamesos2.13.2.dylib] Error 1
make[1]: *** [packages/stratimikos/adapters/amesos2/src/CMakeFiles/stratimikosamesos2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 70%] Linking CXX shared library libstratimikosaztecoo.dylib
[ 70%] Built target stratimikosaztecoo
[ 70%] Linking CXX shared library libstratimikosbelos.dylib
Undefined symbols for architecture arm64:
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getNumVectors() const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDense(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseHeader(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseColumn(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getLocalLength() const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseColumn(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getGlobalLength() const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseHeader(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::get1dCopy(Teuchos::ArrayView const&, unsigned long) const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseColumn(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getVector(unsigned long) const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDense(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/stratimikos/adapters/belos/src/libstratimikosbelos.13.2.dylib] Error 1
make[1]: *** [packages/stratimikos/adapters/belos/src/CMakeFiles/stratimikosbelos.dir/all] Error 2
make: *** [all] Error 2
Failure with exit status: 2
Exit message: There was a problem building trilinos 13-2-0.
Schermata 2022-10-24 alle 14 30 44

@drwells
Copy link
Member

drwells commented Oct 24, 2022

I like the name dealinos.

How did you configure Trilinos? If you can, it would help if you could post this to the deal.II mailing list too - while there are a lot of "dealinos" users here there are more there.

@Francyrad Francyrad changed the title Impossible to build dealii (dealinos problem) on Macbook pro with M1Pro Impossible to build dealii (Trilinos problem) on Macbook pro with M1Pro Oct 24, 2022
@Francyrad
Copy link
Author

Sorry for the wrong name, i just absorbed by confusion (lol).

I didn't configure anything honestly. I just followed the guide for M1, which doesn't say to install prerequisites except for clang, or i'm getting something wrong? I just installed hdf5 for other reasons, but i didn't installed trilnos or others...

If i have to install trillnos for arm64 prior to install dealii for M1, i'll find a way

@jpthiele
Copy link
Contributor

Are you building Trilinos by hand with cmake or are you using a seperate build manager like candi?
If you are using cmake I can heartily recommend to use the OS-independent calls i.e.
cmake -S. -Bbuild
cmake --build build

This will tell cmake that the config Source dir ss . (current dir) and the Build dir is build

@Francyrad
Copy link
Author

I'm using this:

git clone https://github.com/dealii/candi
cd candi
./candi.sh -j 8 --packages="hdf5 p4est trilinos dealii"

@jpthiele
Copy link
Contributor

I am not sure whether candi actually supports ARM processors and it seems to me like it wants to use some linker flag that is not supported for arm64 but somehow set somewhere.
On the other hand there have been some problems with Trilinos major version 13, so it might be worth it to try and change that in the candi.cfg
So comment out TRILINOS_MAJOR_VERSION=AUTO
and comment in TRILINOS_MAJOR_VERSION=12
should be lines 102 and 103
Otherwise @tjhei might have an overview of supported platforms and whether this was actually tried before.

@Francyrad
Copy link
Author

It didn't work. My question is: why candi is indicated to install dealii in amr64 if it cannot support arm64?

[ 77%] Linking CXX shared library libstratimikosbelos.dylib
ld: warning: direct access in function 'Thyra::BelosLinearOpWithSolve& Teuchos::dyn_cast<Thyra::BelosLinearOpWithSolve, Thyra::LinearOpWithSolveBase >(Thyra::LinearOpWithSolveBase&)' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Thyra::BelosLinearOpWithSolve& Teuchos::dyn_cast<Thyra::BelosLinearOpWithSolve, Thyra::LinearOpWithSolveBase >(Thyra::LinearOpWithSolveBase&)' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Thyra::BelosLinearOpWithSolve& Teuchos::dyn_cast<Thyra::BelosLinearOpWithSolve, Thyra::LinearOpWithSolveBase >(Thyra::LinearOpWithSolveBase&)' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Thyra::BelosLinearOpWithSolve& Teuchos::dyn_cast<Thyra::BelosLinearOpWithSolve, Thyra::LinearOpWithSolveBase >(Thyra::LinearOpWithSolveBase&)' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Teuchos::TypeNameTraits<Thyra::BelosLinearOpWithSolve >::name()' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo name for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Teuchos::TypeNameTraits<Thyra::BelosLinearOpWithSolve >::name()' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo name for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Teuchos::TypeNameTraits<Thyra::BelosLinearOpWithSolve >::name()' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo name for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Teuchos::TypeNameTraits<Thyra::BelosLinearOpWithSolve >::name()' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolveFactory.cpp.o' to global weak symbol 'typeinfo name for Thyra::BelosLinearOpWithSolve' from file 'CMakeFiles/stratimikosbelos.dir/Thyra_BelosLinearOpWithSolve.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
[ 77%] Built target stratimikosbelos
make: *** [all] Error 2
Failure with exit status: 2
Exit message: There was a problem building trilinos 12-18-1.

@jpthiele
Copy link
Contributor

candi has no other Option since the processor installed on M1 Macs is ARM based and not x86_64 so candi tries it's best to find out your system and what flags it needs. Seems to me like something is missing or broken somewhere.
Sadly I am not aware that any of the candi maintainers would have access to an M1 Mac to try and fix this easily.
However the problem only seems to occur in Stratimikos which uses the newer linear Algebra Stack of Trilinos (Tpetra)
For most applications we solely use the older one so what you could try is set the following options in /deal.II-toolchain/packages/trilinos.package from ON to OFF
-D Trilinos_ENABLE_Stratimikos:BOOL
-D Trilinos_ENABLE_Belos:BOOL
-D Trilinos_ENABLE_Amesos2:BOOL
Which should be lines 227, 229 and 230
Which deal features become unavailable by that I'd have to check.

@Francyrad
Copy link
Author

Now it says, even if i disable version 13:

[ 69%] Linking CXX shared library libstratimikosbelos.dylib
Undefined symbols for architecture arm64:
"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>)", referenced from:
Amesos2::create_solver_with_supported_type<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> > >::apply(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>) in Thyra_Amesos2LinearOpWithSolveFactory.cpp.o
"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>)", referenced from:
Amesos2::create_solver_with_supported_type<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> > >::apply(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>) in Thyra_Amesos2LinearOpWithSolveFactory.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/stratimikos/adapters/amesos2/src/libstratimikosamesos2.13.2.dylib] Error 1
make[1]: *** [packages/stratimikos/adapters/amesos2/src/CMakeFiles/stratimikosamesos2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Undefined symbols for architecture arm64:
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getNumVectors() const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDense(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseHeader(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseColumn(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getLocalLength() const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseColumn(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getGlobalLength() const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseHeader(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::get1dCopy(Teuchos::ArrayView const&, unsigned long) const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDenseColumn(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
"Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> >::getVector(unsigned long) const", referenced from:
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > >::writeDense(std::__1::basic_ostream<char, std::__1::char_traits >&, Tpetra::MultiVector<float, int, long long, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace> > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&, Teuchos::RCP<Teuchos::basic_FancyOStream<char, std::__1::char_traits > > const&) in Thyra_BelosLinearOpWithSolve.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/stratimikos/adapters/belos/src/libstratimikosbelos.13.2.dylib] Error 1
make[1]: *** [packages/stratimikos/adapters/belos/src/CMakeFiles/stratimikosbelos.dir/all] Error 2
make: *** [all] Error 2
Failure with exit status: 2
Exit message: There was a problem building trilinos 13-2-0.

@tjhei
Copy link
Member

tjhei commented Oct 25, 2022

@Francyrad Take a look at the M1 instructions at https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX if you haven't. I was able to compile using candi using those instructions.

What compiler version are you using (mpicxx -v)?

why candi is indicated to install dealii in amr64 if it cannot support arm64?

While we have initial reports that deal.II is working on arm64, none of the developers actively uses an arm machine.

@Francyrad
Copy link
Author

It says:

mpicxx -v
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I can borrow you my arm64 machine via remote session if needed. I really need Dealii to run an important program for me

@blaisb
Copy link
Member

blaisb commented Oct 25, 2022

Dear @Francyrad , we have managed to compiled deal.II and Lethe (our code which depends on Deal.II, Trilinos and P4est among others) on apple M1 and apple M2 under two differents machines.
The instructions are all there in our documentation:
https://lethe-cfd.github.io/lethe/installation/apple_arm.html

@Francyrad
Copy link
Author

dear @blaisb, i followed the instructions as the guide says. However i still got the same error: i cannot install trilnos.
I attach you a .txt file with the whole compilation, i hope it can be of help...
candi_error.txt

@tjhei
Copy link
Member

tjhei commented Oct 26, 2022

This is not really a deal.II issue, but an issue related to candi. I opened dealii/candi#309 to track it. I will close the issue here. Feel free to comment in the candi issue.

I will investigate in the next few days and report back.

@tjhei tjhei closed this as completed Oct 26, 2022
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

5 participants