[Openmp-dev] OpenMP problems with clang 3.7.0

Christof Söger via Openmp-dev openmp-dev at lists.llvm.org
Sun Sep 6 14:25:45 PDT 2015


Hi everybody,

I just downloaded the new 3.7 release and also the OpenMP runtime for 
Darwin (compiled versions) and tried to compile our software package 
"Normaliz" with it.
Without -fopenmp=libomp it compiles and runs fine.
With the openmp flag it compiles but I ran in problems (even if I set 
the number of threads to 1).

I debugged it a bit and the problem is that at the entering of a 
critical section one std::vector, which is firstprivate in the outer 
parallel loop gets, invalidated.
As a workaround it works when I copy the vector right before the 
critical, and use that copy inside the critical section.

I don't know under which exact circumstances this happens and was not 
able to create a small example in which it happens. If you are 
interested to check it, you can find the source code on github 
https://github.com/Normaliz/Normaliz. To reproduce the problem compile 
normaliz via cmake and run it with "normaliz -cq -x=1 example/medium". 
The critical critical is the critical(TRIANG) on line 1113 in 
process_pyramid and the effected vector is Pyramid_key. Right before the 
critical section an
assert(Pyramid_key.size() == dim);
succeeds, but in the critical section it fails.

I hope this helps to figure out what happens. If I can any other 
information please let me know.

Best regards,
Christof



More information about the Openmp-dev mailing list