5

I tried to install openmp in OS 10.12.6 following the instructions given here https://www.quora.com/How-do-I-Install-OpenMP-on-Mac-10-11-6

but the simple command

brew install clang-omp

did not work and I got the error

Error: No available formula with the name "clang-omp".

Then following the instructions contained here

brew install clang-omp not working

I tried to reinstall llvm by doing

brew reinstall llvm

and the installation was successful but I see no trace of omp. If I try to compile with g++ or gcc a simple program including <omp.h> and compiling with the -fopenmp flag I get

clang: error: unsupported option '-fopenmp'

even if I checked that in other cases it has worked (Enable OpenMP support in clang in Mac OS X (sierra)).

I've tried to look for openmp in mac port as well but I haven't managed to find it. Thank you for your help.

user2375944
  • 51
  • 1
  • 3
  • Here how to force Apple's clang to support OpenMP: https://stackoverflow.com/a/47230419/3419533 – Alexey Bataev Dec 24 '17 at 15:36
  • It seems that almost all existing solutions don't work anymore. `brew install gcc --without-multilib` doesn't work anymore either. – Vortexfive Jan 17 '18 at 11:11
  • You just need to install llvm now. See [my answer to the question you cited](https://stackoverflow.com/questions/43555410/enable-openmp-support-in-clang-in-mac-os-x-sierra). – Dirk Feb 12 '18 at 16:05

1 Answers1

3

You need a recent version of llvm and libomp which you can get with

brew install llvm
brew install libomp
Increasingly Idiotic
  • 5,700
  • 5
  • 35
  • 73