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

Arcane on MacOS #870

Open
mohd-afeef-badri opened this issue Sep 5, 2023 · 6 comments · Fixed by #884 or #885
Open

Arcane on MacOS #870

mohd-afeef-badri opened this issue Sep 5, 2023 · 6 comments · Fixed by #884 or #885

Comments

@mohd-afeef-badri
Copy link
Collaborator

mohd-afeef-badri commented Sep 5, 2023

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

@grospelliergilles
Copy link
Member

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

@grospelliergilles
Copy link
Member

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.

@mohd-afeef-badri
Copy link
Collaborator Author

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

@grospelliergilles
Copy link
Member

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

This was linked to pull requests Sep 13, 2023
@mohd-afeef-badri
Copy link
Collaborator Author

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 ?

@grospelliergilles
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants