[Omp] A question about OpenMP 2.5
Bronis R. de Supinski
bronis at llnl.gov
Wed Mar 21 08:33:02 PDT 2007
Jakub:
Re:
> On Wed, Mar 21, 2007 at 05:00:29AM -0700, Bronis R. de Supinski wrote:
> > Note that it is not clear where to define the hardware
> > aromicity level, which is why the specification has tried
> > to avoid doing so. I could easily argue that the right
> > level of write atomicity for a DSM implementation is at
> > the page granularity. While I don't think anyone would
> > accept that, it is very unclear where we stop. If Brad's
> > example used a char array, does it work? I would hope so...
>
> Not everywhere. E.g. older Alpha CPUs (without BWX extension, like
> ev4, ev45 or ev5) couldn't write 8 and 16-bit quantities atomically, only
> 32-bit and above, so for 8 and 16-bit accesses it would need to read
> old 32-bit word, update the byte in question in it and store it again.
Yes, this does not surprise me. My point was a position
on how we need to modify the spec. I think Brad's question
demonstrates that we will need to specify SOME minimum
level of atomicity. I was staking a position of byte level
with char; if the hardware doesn't support it then the
OpenMP implementation would need to include sufficient
synchronization to guarantee it. I understand this might
entail undue hardship and I could be convinced that four
bytes is the right level (more than that seems unreasonable).
Bronis
More information about the Omp
mailing list