Re: [mpiwg-rma] Atomicity and Pair Types
On Sep 12, 2018, at 9:11 PM, Mark Hoemmen via mpiwg-rma <[email protected]> wrote:
True, it wouldn't affect MPI_COMPARE_AND_SWAP, since it only works on integer, byte, or logical types. Never mind then :-)
MPI_COMPARE_AND_SWAP uses language "if the compare buffer and the target buffer are identical," which sounds like "bitwise identical" -- the C++ paper I cited is trying to move away from that definition towards operator==. It doesn't matter now but it might if people want to extend it to floating-point types, with -0.0 == +0.0 etc.
We will never do that because -0.0 and +0.0 are different numbers and if anybody tries to make the MPI standard say otherwise, I’m going to bludgeon them with a pillowcase full of numerical analysis textbooks. Jeff
mfh
On Wed, Sep 12, 2018 at 9:42 PM Nathan Hjelm <[email protected]> wrote:
Interesting but not quite relevant here. The struct types are only valid with minloc and maxloc so we don't have the same issue. The value of the padding bits does not influence the results of the operation.
-Nathan
On Sep 12, 2018, at 8:43 PM, Mark Hoemmen via mpiwg-rma <[email protected]> wrote:
On Wed, Sep 12, 2018 at 2:55 PM Balaji, Pavan via mpiwg-rma <[email protected]> wrote:
Yes, correct. Although, Nathan had a ticket at some point where he wanted to allow MPI to overwrite the padding bytes in such cases.
This issue of padding bytes in atomic updates to a struct came up in the past few C++ meetings:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0528r3.html
For more explanation, see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0528r0.html . The goal is that compare-and-exchange shouldn't always return false if the padding bits don't participate in the value representation of a struct.
mfh _______________________________________________ mpiwg-rma mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma
mpiwg-rma mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma
participants (1)
-
Jeff Hammond