3 ms·
This: ./clang++ --version clang version 3.8.0 (trunk 246030) Target: x86_64-unknown-linux-gnu Thread model: posix does not support OpenMP to m
by claudius 11y ago
This:
./clang++ --version
clang version 3.8.0 (trunk 246030)
Target: x86_64-unknown-linux-gnu
Thread model: posix
does not support OpenMP to my knowledge.
- gopowerranger 11y agoYou have to enable it using -fopenmp http://blog.llvm.org/2015/05/openmp-support_22.html http://blog.llvm.org/2015/05/openmp-support_22.html http://clang-omp.github.io/ http://clang-omp.github.io/
- claudius 11y agoHmm, interesting. It works in a simple test case, but fails to compile my codebase and throws an error ./inc/bla.h:163:9: error: unexpected '#pragma omp ...' in program [-Werror,-Wsource-uses-openmp] #pragma omp parallel for num_threads(Threading::num), schedule(dynamic, 1) Unfortunately I wasn’t able to build a minimally failing example so far, I will have to investigate this further. Thanks for the heads-up in any case! Edit: Turns out everything fails if -Weverything is supplied. I didn’t offer a runtime library (nor did the compiler define the _OPENMP macro even when having -fopenmp on the command line, otherwise it would have complained about a missing <omp.h>…). If -Weverything is not there, the thing compiles but only runs with one thread.