<div><div dir="auto">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.</div></div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 12, 2018 at 10:40 PM Jeff Hammond <<a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Sep 12, 2018, at 9:11 PM, Mark Hoemmen via mpiwg-rma <<a href="mailto:mpiwg-rma@lists.mpi-forum.org" target="_blank">mpiwg-rma@lists.mpi-forum.org</a>> wrote:<br>
> <br>
> True, it wouldn't affect MPI_COMPARE_AND_SWAP, since it only works on<br>
> integer, byte, or logical types.  Never mind then :-)<br>
> <br>
> MPI_COMPARE_AND_SWAP uses language "if the compare buffer and the<br>
> target buffer are identical," which sounds like "bitwise identical" --<br>
> the C++ paper I cited is trying to move away from that definition<br>
> towards operator==.  It doesn't matter now but it might if people want<br>
> to extend it to floating-point types, with -0.0 == +0.0 etc.<br>
<br>
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.<br>
<br>
Jeff<br>
<br>
> mfh<br>
>> On Wed, Sep 12, 2018 at 9:42 PM Nathan Hjelm <<a href="mailto:hjelmn@me.com" target="_blank">hjelmn@me.com</a>> wrote:<br>
>> <br>
>> 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.<br>
>> <br>
>> -Nathan<br>
>> <br>
>>> On Sep 12, 2018, at 8:43 PM, Mark Hoemmen via mpiwg-rma <<a href="mailto:mpiwg-rma@lists.mpi-forum.org" target="_blank">mpiwg-rma@lists.mpi-forum.org</a>> wrote:<br>
>>> <br>
>>> On Wed, Sep 12, 2018 at 2:55 PM Balaji, Pavan via mpiwg-rma<br>
>>> <<a href="mailto:mpiwg-rma@lists.mpi-forum.org" target="_blank">mpiwg-rma@lists.mpi-forum.org</a>> wrote:<br>
>>>> Yes, correct.  Although, Nathan had a ticket at some point where he wanted to allow MPI to overwrite the padding bytes in such cases.<br>
>>> <br>
>>> This issue of padding bytes in atomic updates to a struct came up in<br>
>>> the past few C++ meetings:<br>
>>> <br>
>>> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0528r3.html" rel="noreferrer" target="_blank">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0528r3.html</a><br>
>>> <br>
>>> For more explanation, see<br>
>>> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0528r0.html" rel="noreferrer" target="_blank">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0528r0.html</a> .<br>
>>> The goal is that compare-and-exchange shouldn't always return false if<br>
>>> the padding bits don't participate in the value representation of a<br>
>>> struct.<br>
>>> <br>
>>> mfh<br>
>>> _______________________________________________<br>
>>> mpiwg-rma mailing list<br>
>>> <a href="mailto:mpiwg-rma@lists.mpi-forum.org" target="_blank">mpiwg-rma@lists.mpi-forum.org</a><br>
>>> <a href="https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma" rel="noreferrer" target="_blank">https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma</a><br>
> _______________________________________________<br>
> mpiwg-rma mailing list<br>
> <a href="mailto:mpiwg-rma@lists.mpi-forum.org" target="_blank">mpiwg-rma@lists.mpi-forum.org</a><br>
> <a href="https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma" rel="noreferrer" target="_blank">https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma</a><br>
</blockquote></div></div>