Post

Replies

Boosts

Views

Activity

Reply to Openmp
OpenMP is the cross-platform API standard for multiprocessing application programming. It's a feature included in CLANG/LLVM, the compiler that Apple provides as part of Xcode, but for some reason, about 10 years ago, Apple patched the version they ship to disable OpenMP support (perhaps as a heavy-handed mechanism to force people to use their proprietary Grand Central Dispatch and compiler extensions). There was once a flag in Xcode to enable OpenMP support. It's unfortunate, as it makes porting scientific and engineering code to MacOS VERY tedious and expensive. The general solution is to recompile the CLANG compiler without the patch that removes the compiler flag for OpenMP and use your compiler instead of the one built into Xcode. This introduces some other oddities, but works. Alternatively, you can download a version of the OpenMP support library and change the compiler flags for OpenMP code to include -Xclang -fopenmp . The library MUST match the version of LLVM and you can get pre-compiled versions here: https://mac.r-project.org/openmp/ There's no good reason Apple should intentionally break OpenMP support.
Aug ’24