Closed mtap-research closed 1 year ago
Thank you very much for this helpful feedback. I am concerned why #ifdef _OPENMP did not handle this issue (https://github.com/usnistgov/feasst/blob/main/plugin/threads/src/thread_omp.cpp#L1-L3). Which version of clang did the Apple M1 have by default? I will update the troubleshooting install section in README.
Clang was from XCode and was installed at /usr/bin
location.
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Let me know if you need more information!
Thanks! I reproduced the issue on a macbook. Commit https://github.com/usnistgov/feasst/commit/1d7f33b26bce4cfd0439eb5c65342e5177181316 in the develop branch enabled clang/openmp install with brew install libomp. It may also work with llvm. I hope this works on your machine and for @dwsideriusNIST.
I had trouble installing the software on Apple Silicon M1 Max with the following error msg.
I had to install llvm from homebrew
brew install llvm
Then
cmake -DCMAKE_C_COMPILER=/opt/homebrew/Cellar/llvm/13.0.1_1/bin/clang- DCMAKE_CXX_COMPILER=/opt/homebrew/Cellar/llvm/13.0.1_1/bin/clang++ ..
After this, I was able to
make -j4
to compile binaries, and run the simulation.