I have a program written on Linux in GNU C. The program compiles with GCC. I have an install shell script,
gcc -o program program.c -Wall -pedantic -std=gnu11 -lm -fopenmp
which works greatly.
The problem is with Mac. For some reason, Mac sees gcc
and instead uses clang
even though GCC is installed and install.sh explicitly says gcc
. clang
doesn't work with omp.h
The problem is that clang can't use omp.h
and solutions offered http://releases.llvm.org/3.7.0/tools/clang/docs/ReleaseNotes.html#openmp-support don't work, and omp.h
may not work in mac at all Enable OpenMP support in clang in Mac OS X (sierra)
I never use macs, and because of this nonsense I never plan to. However, some people using my program want to use Mac, so I have to deal with this.
I've tried various shell script modifications, but none of them work, mac insists on using clang
and won't use gcc
I need to do one of two things which I don't know how to do:
1) force Mac to use gcc
(which it refuses to do now)
2) get clang
to use omp.h
in mac (which from other answers on Stack Overflow, looks impossible)