[Omp] Two simpler examples (Re: OpenMP spec 2.5 seems to have incorrect flush example on page 12)
Marcel Beemster
marcel at ace.nl
Sun May 6 13:41:38 PDT 2007
Yuan wrote:
> http://www.hpl.hp.com/techreports/2004/HPL-2004-209.html
Thanks Yuan, that is indeed required reading for any one
who wants to fiddle with the specification of parallel
programming models. Very instructive.
Boehm's example 4.1 is not a problem for OMP, I think, since
unsynchronized reading and writing has unspecified behaviour.
Example 4.2 was partly discussed earlier on the openmp-list,
addressing minimal atomic write sizes. The second example of
4.2, writing x.a while the original program did not, is
trickier. In my previous post I said no optimization would
write to a variable that was not written in the original,
but this is indeed an example.
Example 4.3 can be addressed by carefully defining limits on
compiler optimization around conditional flushes. Needs more
thinking.
Together, these examples convince me that my original goal,
to allow any sequential optimization between synchronization
points, may not be achievable. :-(
Marcel
More information about the Omp
mailing list