-
Notifications
You must be signed in to change notification settings - Fork 374
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
Improve handling of OpenMP switch to support Apple Clang with brew-installed libomp #3395
Comments
@heplesser With |
@steffengraber I could confirm your suggestion. (nest-venv) $ cmake -DCMAKE_INSTALL_PREFIX:PATH= Homebrew installs libomp separately but it doesn't symlink it because of the possible conflicts with other tools. This command (
|
As per my understanding, if no output appears for the above command, clang may not support OpenMP. Then we may need to install and use llvm instead. |
@heplesser I haven't explicitly installed gcc via Homebrew during the NEST installation steps. As gcc is actually a symlink to Clang, the version check gives the following output. ie. Clang and not Homebrew installed gcc.
On my system I had gcc-14 installed via Homebrew. (Homebrew always installs GCC with versioned names, not just gcc)
If we need to use Hombrew GCC, then we need to either set the alias In short, I don't think gcc and llvm are strictly needed. |
@steffengraber The |
Apple Clang does not support the
-fopenmp
switch out of the box. Therefore, to build NEST with Apple Clang and without conda environments, one needs to installlibomp
(and some other tools) with Homebrew and then pass file paths and compiler options either as environment variables or cmake options explicitly.A typical Homebrew setup can be
but I have not checked if
llvm
andgcc
are strictly needed (graphvis
is only needed for one test until #3390 is fixed).One can then configure NEST with
cmake -DCMAKE_INSTALL_PREFIX:PATH=
pwd
/install -Dwith-openmp="-I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -L/opt/homebrew/opt/libomp/lib -lomp" -Dwith-mpi=ON ../../../src/mainThe text was updated successfully, but these errors were encountered: