Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

OpenMP atomic capture arguably broken

Nick_M_3
New Contributor I
460 Views

Yes, I know the OpenMP 3 standard does not specify what, if anything, atomic does and OpenMP 4 says to follow C++ (which is almost equally ambiguous), but the Intel compilers seem to take the sensible line of delivering sequential consistency for explicit atomic sections.  The following program shows a case where that fails.  Look at lines 244-246 in the output, which are:

Validating capture in OpenMP using volatile and y = x; x += v with atomic
 
There were at least 749115 breaches of sequential consistency (NOT expected)

It should be easy enough to find the code that causes the problem - sorry about not stripping down, but I am tied up with other work!

0 Kudos
3 Replies
Vladimir_P_1234567890
460 Views

Hello, is this for C++ Compiler 14.0 Beta?

0 Kudos
Nick_M_3
New Contributor I
460 Views

Yes.  And 13...183.  Sorry for not saying.

0 Kudos
Vladimir_P_1234567890
460 Views

confirming a bug. 

thanks for a reproducer. it was sent to appropriate people.
--Vladimir

0 Kudos
Reply