[mpiwg-rma] Atomicity and Pair Types

Mark Hoemmen mark.hoemmen at gmail.com
Thu Sep 13 09:07:03 CDT 2018


Gmail suggests “sounds good to me” as a standard response and i’m ok with
that ;-). I think they were more worried about the case of a struct with
padding bits never making it through a CAS, even though the padding bits
aren’t part of the value representation.

On Wed, Sep 12, 2018 at 10:40 PM Jeff Hammond <jeff.science at gmail.com>
wrote:

>
>
> > On Sep 12, 2018, at 9:11 PM, Mark Hoemmen via mpiwg-rma <
> mpiwg-rma at lists.mpi-forum.org> 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 <hjelmn at me.com> 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 <
> mpiwg-rma at lists.mpi-forum.org> wrote:
> >>>
> >>> On Wed, Sep 12, 2018 at 2:55 PM Balaji, Pavan via mpiwg-rma
> >>> <mpiwg-rma at lists.mpi-forum.org> 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
> >>> mpiwg-rma at lists.mpi-forum.org
> >>> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma
> > _______________________________________________
> > mpiwg-rma mailing list
> > mpiwg-rma at lists.mpi-forum.org
> > https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-rma/attachments/20180913/92f5eb20/attachment.html>


More information about the mpiwg-rma mailing list