[Omp] Memory consistency contradiction between 2.5 specification and GCC

Marcel Beemster marcel at ace.nl
Thu May 3 04:21:02 PDT 2007


Jakub,

You wrote:
> You don't use #pragma omp flush, #pragma omp flush(sharedvar),
> #pragma omp barrier or any other directive that implies flush (see
> 2.7.5) within the loop.  So it is perfectly fine when read from
> sharedvar is hoisted before the loop, all computation is done
> on a register variable and after the loop finishes the final
> value is written into sharedvar.

Agreed, and that is what I want my compiler to do. But it breaks the 
example on page 12 of the OpenMP definition. This implies that the 
definition is incorrect. Yet, when reading through Mark Bull's 
presentation on OpenMP 3.0 I see no intention of removing this example.

Thanks for responding,
	Marcel

-- 
Dr. Marcel Beemster, Senior Software Engineer, marcel at ace.nl,www.ace.nl
Associated Compiler Experts bv. Amsterdam, Netherlands. +31 20 6646416.
-----------------------------------------------------------------------
This e-mail and any  files transmitted  with it are  confidential.  Any
technical information contained herein is supplied as-is, and no rights
can be  derived therefrom.  If you have received this message in error,
please notify  the sender by reply  e-mail immediately,  and delete the
message and all copies thereof.





More information about the Omp mailing list