Add support for MacOS with ARM CPUs (CMake + GitHub Action)#25
Add support for MacOS with ARM CPUs (CMake + GitHub Action)#25IshaanDesai merged 38 commits intodevelopfrom
Conversation
…for build and test
…onflicting?)" This reverts commit 32bd02a.
|
So far I got it to compile, so I guess the depencies are fine now. But running the tests raises some HDF5 related errors. I've never worked with HDF5 in C++, so maybe @sanathkeshav could you please have a look at the errors? The tests fail with both |
cmake/FANSConfig.cmake.in
Outdated
| message(FATAL_ERROR "Parallel HDF5 implementation (mpi) required but not found!") | ||
| endif() | ||
| find_dependency(Eigen3) | ||
| find_dependency(OpenMP) |
There was a problem hiding this comment.
This change seems to be unrelated to this pull request. Please revert.
There was a problem hiding this comment.
this is part of the remove OpenMP dependency PR. I merged it into this PR to make it work temporarily.
|
Since we could not come to a consensus on how to proceed with this issue, I would propose to close this PR at this point. |
Fine for me. If you don't need the MacOS support at the moment, I don't think we need to invest more time here. |
|
The macOS test fails with the errors: /Users/runner/work/FANS/FANS/include/solver.h:364:68: error: use 'template' keyword to treat 'get' as a dependent template name
const std::string &measure = reader.errorParameters["measure"].get<std::string>();
^
template
/Users/runner/work/FANS/FANS/include/solver.h:390:68: error: use 'template' keyword to treat 'get' as a dependent template name
const std::string &error_type = reader.errorParameters["type"].get<std::string>();
^
template which seems to have some solutions, for example as stated in this post. I am no expert in C++ templates, but could this error occur because we now enforce a C++ standard Line 17 in 07ee5d8 I would suggest trying to resolve the errors above, because having a macOS test is nice, and @siggmo already invested effort here, so it would be a pity to waste it now. |
|
Okay, now this works natively on my M1 Macbook, but it works because we are not using the clang compilers but gcc-14. This also involved compiling open-mpi itself with gcc-14 via source. This is painfully slow (takes ~11 mins in CI).
|
sanathkeshav
left a comment
There was a problem hiding this comment.
LGTM!
But we should put a pin on the Docker image for the macOS CI for later.
I will open an issue. |
Closes #21
Add support for macOS.
Changes in
CMakeLists.txt:New GitHub Actions workflow file for building and testing on macOS:
macos-15GitHub hosted runner (M1 CPU)gcc-14C/C++ compiler (not CMake default on macOS)