4 ms·
It took them forever, but yes, they support OpenMP 3.1 as of clang 3.7. MSVC still only supports OpenMP 2.0.
by TillE 11y ago
It took them forever, but yes, they support OpenMP 3.1 as of clang 3.7.
MSVC still only supports OpenMP 2.0.
- bluecalm 11y agoThanks for the information. I must be doing something wrong then as I've recently downloaded 3.7.0 for Windows and while it compiles with -fopenmp it doesn't work correctly (only one thread is launched). I guess some investigation is needed, any ideas why that could be? The code works correctly when compiled with GCC so that can't be an issue. I am launching OpenMP threads from a Windows thread (not the main one) so maybe that's the issue (MinGW packages had problems with it forever and it's pretty tough to find one without this bug present).
- claudius 11y agoThis: ./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.