-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
installopenmpplatform-specifictop requestOne of our most-requested issuesOne of our most-requested issues
Milestone
Description
With R 4.0.0, R (as well as packages on CRAN) will be built with the system toolchain (Apple Clang), which unfortunately mean OpenMP support is not provided natively by the compiler. Fortunately, it is still possible to use OpenMP with the system toolchain if you:
- Instruct
clangto enable OpenMP with-Xpreprocessor -fopenmp, - Explicitly provide include paths to
libompduring compilation, - Explicitly provide library paths to
libompduring link.
Unfortunately, data.table fails to detect this case as it invokes the compiler with just -fopenmp here:
Line 64 in b1b1832
| printf "#include <omp.h>\nint main () { return omp_get_num_threads(); }" | ${CC} ${CFLAGS} -fopenmp -xc - >/dev/null 2>&1 || R_NO_OPENMP=1; |
It would be helpful for users on macOS if support for OpenMP on macOS could be detected + used.
Sorry, I recognize this is kind of a pain but figured it was worth filing since OpenMP is somewhat vital to data.table's performance.
See also:
(+ some other recent discussion on R-SIG-Mac)
shrektan, MichaelChirico, jangorecki, renkun-ken, XiangyunHuang and 6 more
Metadata
Metadata
Assignees
Labels
installopenmpplatform-specifictop requestOne of our most-requested issuesOne of our most-requested issues