omp critical supported in llvm?

Hi everyone,

Does llvm propoerly support “omp critical” directive? I’m asking because I have been using this directive in my code but I still observe some data races. To check if I am correct, I compiled the code with gcc and used Intel inspector for data races and nothing is reported. That is why I am asking here if LLVM properly implements the specifications for openmp, specially critical directive.

Best,

Mohammad

This seems like a question about Clang rather than LLVM. Perhaps ask on the Clang mailing list? (OpenMP directives are handled by Clang as they’re part of the source language.)

Hi,

Sorry for not seeing this, but Chandler is right that this should go to cfe-dev or even openmp-dev if it’s related to the runtime (which I think this one is not).

To your question: Yes, clang 3.8 and later has support for ‘#pragma omp critical’ if you specify –fopenmp (clang 3.7 needed –fopenmp=libomp).

If this does not work, could you share the code and the exact command used to compile?

Regards,

Jonas