Dear James,

Thank you very much for your very kind and detailed reply.

Using your recommendations, I managed to install Trilinos + MueLu working 
with deal.ii master. Thank you very much for your help with this!

The only thing I had to change from the default recipe here 
https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX to make it work for 
me is adding:
      -D Tpetra_INST_INT_INT=ON \ on line 236 of the file 
candi/deal.II-toolchain/packages/trilinos.package

Thanks again and best regards,
Nik

On Wednesday, January 8, 2025 at 6:29:51 PM UTC+1 avfa...@gmail.com wrote:

Dear Nik,


I’ve been working with deal.II and Trilinos (including MueLu) across 
various platforms, including macOS, for a while now. I understand your 
frustration, as the installation and configuration process can be tricky. 
Let me briefly share some insights based on my experience.


*Key Issues:*

1. *Epetra vs. Tpetra Transition*:

Trilinos is phasing out the Epetra stack in favor of Tpetra. However, 
deal.II’s Trilinos wrapper is still in transition, meaning some 
functionalities and interfaces are incomplete. This transitional state 
often leads to compatibility issues, especially with advanced features like 
MueLu.

2. *MueLu Configuration Challenges*:

MueLu’s compatibility depends heavily on the configuration of Epetra/Tpetra 
and the global ordinal type (e.g., int vs. long long). Unfortunately, these 
compatibility nuances are not always well-documented. Both the deal.II and 
Trilinos GitHub repositories have issues discussing these challenges, which 
might eventually resolve as the Epetra-to-Tpetra transition progresses 
(hopefully by 2025–2026).


*My Experience:*


I’ve successfully installed deal.II with Trilinos and MueLu on CentOS 
clusters and Apple Silicon macOS using various compiler toolchains (GCC, 
Intel icpc, Apple Clang). However, the process was rarely straightforward.


For my most recent setup on macOS, I didn’t strictly follow the steps 
outlined in the Apple-ARM-M1-OSX guide 
<https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX>. Instead, I used a 
customized toolchain: the latest GCC (installed via Homebrew, mainly for 
gfortran, as macOS doesn’t provide it natively) and OpenMPI, combined with 
macOS’s default Clang as the C++ compiler. Using this setup, I built the 
master versions of both deal.II and Trilinos with *candi*. To ensure 
compatibility, I manually edited the Trilinos.package file in candi, 
explicitly activating nearly the entire Tpetra stack (Tpetra, Ifpack2, 
MueLu, Belos, Amesos2, Zoltan2) along with their corresponding Epetra 
stack. After some adjustments, everything compiled successfully, and I was 
able to run MueLu-based AMG preconditioners with dealii-assembled-matrices 
without issues.


*Recommendations:*

1. *Custom Configuration*:

If you’re using candi, consider modifying the Trilinos configuration 
manually to ensure both Tpetra and Epetra are fully activated. Ensure you 
use compatible global ordinals and enable relevant packages like MueLu and 
Belos.

2. *GitHub Issues*:

I recommend opening an issue on the deal.II GitHub repository. Several 
developers are actively working on the Tpetra wrapper and may have more 
up-to-date knowledge about MueLu configuration rules.


Apologies for not being able to provide detailed instructions at this 
time—I’ve been quite busy lately. I hope this helps as a starting point, 
and I’m happy to share more insights if needed.


Best regards,

James

在2025年1月8日星期三 UTC+8 21:32:54<nikl...@stanford.edu> 写道:

Dear User Group,

I recently got a new Apple arm-based M4 laptop running Mac OS Sequoia. My 
previous laptop was running Windows and using the Windows Subsystem for 
Linux, I managed to install deal.ii together with all the packages I would 
like to use.

Now, I tried to install deal.II on the new machine. I followed the 
guidlines here: https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX and 
everything went perfectly fine except for a small but for me important 
detail. 

Deal.II couldn't be configured to use MueLu from Trilinos. MueLu was 
installed but the corresponding *error* message from candi_configure.log 
when running configure_20_trilinos.cmake shows that the support was 
disabled because the test didn't succeed.

-- Performing Test TRILINOS_MUELU_IS_FUNCTIONAL
-- Performing Test TRILINOS_MUELU_IS_FUNCTIONAL - Failed
-- MueLu was found but is not usable through Epetra! Disabling MueLu 
support.

I tried several other ways:

   - Docker: I also got the same error (i.e. module 
   TrilinosWrappers::PreconditionAMGMueLu not defined) probably because of 
   defined(DEAL_II_TRILINOS_WITH_MUELU) being false in 
   trilinos_precondition.h when I used the most recent docker image for the 
   arm based architecture.


   - prepackaged .dmg files (v9.6.0 sequoia arm) --> same thing


   - prepackaged .dmg files (v9.5.0 intel) -->  also tried this with the 
   hope that maybe in a Rosetta2 emulated terminal, this could work but got 
   the same error and even more like 
this:*/Applications/deal.II.app/Contents/Resources/Libraries/include/boost/container_hash/hash.hpp:132:33
 
   
<http://deal.II.app/Contents/Resources/Libraries/include/boost/container_hash/hash.hpp:132:33>:
 
   **error: **no template named 'unary_function' in namespace 'std'; did 
   you mean '__unary_function'? *132 |         struct hash_base : 
   std::unary_function<T, std::size_t> {};


Therefore I have two questions:

   1. Do you see a way to fix the above, i.e. get the MueLu support working.
   2. What would be a *brute force* way to get deal.ii working on an 
   arm-based machine. Should I try to run the terminal under Rosetta2 
   emulation and try to install from source?

Thank you very much in advance for your help and best regards,
Nik

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/43d29189-d3f2-400f-99e1-505fb25a5160n%40googlegroups.com.

Reply via email to