Ensure you surround all your omp pragmas like so:
#ifdef _OPENMP
#pragma omp parallel ...
#endif
Essentially, detecting the operating system is not enough -- you need
to condition your use of OpenMP if and only if _OPENMP is available.
You should also do the same for
#if _OPENMP
#include
#endi
See
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#OpenMP-support
for a way to enable OpenMP when it's available. If you need more detailed
checks for the OpenMP support in the toolchain, you would need to use a
configure script. For example, I'm using an autoconf configure script for
Dear all,
I have a problem regarding OpenMP on Mac OS. Recently I submitted my package to
CRAN (https://cran.r-project.org/web/packages/paropt/index.html). However,
there seems to be a problem with 'fopenmp' on Mac OS using clang++. I have read
many forums regarding the topic. Thus, I know that