Skip to content

OpenMP flags on macOS

Functionality to add/problem to solve

Current wmake rules for OpenMP produce compilation error on macOS. As a consequence cfMesh is not built.

Target audience

People, who would like to build and use OpenFOAM(R) on macOS.

Proposal

Add the following to wmake/rules/General/darwin64Clang/openmp:

COMP_OPENMP = -DUSE_OMP -Xpreprocessor -fopenmp
LINK_OPENMP = -lomp

libomp (https://openmp.llvm.org/) should be installed separately.

What does success look like, and how can we measure that?

cfMesh is built.

Links / references

  1. https://stackoverflow.com/questions/40095958/apple-clang-fopenmp-not-working

Funding

N/A