Arcane on MacOS
Dear Arcane Framework Community,
I recently sought assistance from the helpful @grospelliergilles to successfully install Arcane on a macOS (Arm) machine. While we managed to get it working, in the process we had to disable (temporarily) several components, namely
- Alien,
- Hypre,
- PETSc, and
- Swig, to make it compatible with my setup.
The purpose of this GitHub issue is to initiate a discussion on incorporating these changes into Arcane in a more generalized manner.
The review of the attached patch is certainly necessary from one of you experts. Eventually share your insights, and collaborate on refining it for broader macOS compatibility is the aim here.
I've attached a patch file that enables Arcane to compile on my specific macOS (Arm) configuration. However, I'd like to emphasize that this patch is currently tailored to my personal machine and is not yet generic for all macOS devices.
The testing repository is for now is the following arcane fork
Also attached is log file for the tests (89% tests passed, 57 tests failed out of 522).
Thanks. I will look at that. I thinks it should not be too difficult to make a macos port.
Can you give me the version of your system and the list of packages you have installed ? I have managed to get a docker running Catalina to test the compilation of Arcane.
@grospelliergilles I am in macOS Ventura Version 13.5.1. With Apple M2 Chip. The Packages that I had to install for now for Arcane before came using brew:
brew install dotnet petsc hypre glib libxml2 scotch
You might need to set
export DOTNET_ROOT="/opt/homebrew/opt/dotnet/libexec"
Thanks. I will use an image for MacOS ventura then. This will be an image for i386 but it may displays the same behavior then arm64
A quick update.
I was able to recompile the latest Arcane, however some patches were still required:
- disable, hypre, PETSc, and wrapper (swig)
- patches to /arcane/src/arcane/utils/PlatformUtils.cc as previously applied were still required.
so thank you for all the work that you have put in. The compilation is way simpler than the first time I attempted it.
Now I am in need of compiling Arcane with C++ 20 support -DARCCORE_CXX_STANDARD=20, however this is causing issues
/Users/mb258512/Git/arcane/arcane/src/arcane/utils/ArcaneCxx20.cc:22:2: error: "The compiler does not support C++20 std::atomic_ref"
#error "The compiler does not support C++20 std::atomic_ref"
I checked that I have c++ 20 support with clang 15
-- CXX Compiler = /Library/Developer/CommandLineTools/usr/bin/c++
-- CXX CompilerId = AppleClang
-- CXX Compiler Version = 15.0.0.15000040
Any help ?
libc++ does not yet support std::atomic_ref. You have to use GCC (or clang but with libstdc++)