[mpiwg-rma] Atomicity and Pair Types

Mark Hoemmen mark.hoemmen at gmail.com
Wed Sep 12 23:11:40 CDT 2018


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.

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


More information about the mpiwg-rma mailing list