[Openmp-dev] OpenMP problems with clang 3.7.0

Hahnfeld, Jonas via Openmp-dev openmp-dev at lists.llvm.org
Mon Sep 7 06:10:21 PDT 2015


Hi,

I was able to reproduce the error with v2.12.2 but not with the current master.
I think this problem got fixed with https://github.com/Normaliz/Normaliz/commit/62c3237d7d312555dad7026f494c6caa6e438181

The OpenMP standard mentions under restrictions of the critical construct (ironically in section 2.12.2):
> A throw executed inside a critical region must cause execution to resume within
> the same critical region, and the same thread that threw the exception must catch
> it.

Cheers,
Jonas

> -----Original Message-----
> From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf
> Of Christof Söger via Openmp-dev
> Sent: Sunday, September 06, 2015 11:26 PM
> To: openmp-dev at lists.llvm.org
> Subject: [Openmp-dev] OpenMP problems with clang 3.7.0
> 
> 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
> 
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20150907/e4bd6725/attachment-0001.bin>


More information about the Openmp-dev mailing list