framework icon indicating copy to clipboard operation
framework copied to clipboard

Arcane on MacOS

Open mohd-afeef-badri opened this issue 2 years ago • 6 comments

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.

arcane_macos.patch

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).

failed_test.log

mohd-afeef-badri avatar Sep 05 '23 15:09 mohd-afeef-badri

Thanks. I will look at that. I thinks it should not be too difficult to make a macos port.

grospelliergilles avatar Sep 06 '23 09:09 grospelliergilles

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 avatar Sep 07 '23 12:09 grospelliergilles

@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"

mohd-afeef-badri avatar Sep 07 '23 15:09 mohd-afeef-badri

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

grospelliergilles avatar Sep 07 '23 16:09 grospelliergilles

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 ?

mohd-afeef-badri avatar Jan 30 '24 08:01 mohd-afeef-badri

libc++ does not yet support std::atomic_ref. You have to use GCC (or clang but with libstdc++)

grospelliergilles avatar Jan 30 '24 09:01 grospelliergilles