how to compile on macOS

#14 · closed · 1 comments

View on GitHub ↗

tristan-k

Can you provide a quick guide on how to install on macOS with Apple Silicon? ``` $ brew install gcc cmake $ git clone https://github.com/jeffhammond/STREAM/ && cd STREAM $ make gcc -O2 -fopenmp -c -o mysecond.o mysecond.c clang: error: unsupported option '-fopenmp' make: *** [mysecond.o] Error 1 ```

Comments

jeffhammond

Use a compiler that supports OpenMP. Apple Clang doesn't. Use Homebrew to install GCC or LLVM. Those will have OpenMP enabled. You may need to edit the Makefile to use CC=gcc-13 or whatever the full binary name is. The program gcc is llvm dragonegg.