[mpich-discuss] MPI_Get on the same memory location
Carsten Clauss
c.clauss at fz-juelich.de
Fri Aug 22 08:25:02 CDT 2014
MPI-3, Section 2.3, page 10: "Unless specified otherwise, an argument of
type OUT or type INOUT cannot be aliased with any other argument passed
to an MPI procedure."
Cheers,
Carsten
On 08/22/2014 03:10 PM, Balaji, Pavan wrote:
>
> On Aug 22, 2014, at 7:59 AM, Balaji, Pavan <balaji at anl.gov> wrote:
>
>> On Aug 21, 2014, at 8:42 PM, Nick Radcliffe <nradclif at cray.com> wrote:
>>
>>>> If buffers overlap, use memmov and not memcpy:
>>>
>>> Good point, you would have to use memmov in general for overlapping source and target buffers. I was thinking of the special case where the source and target buffers are identical.
>>>
>>>> I don’t think so. It’s an incorrect program to get from a buffer to itself. MPICH is being helpful is catching this user error.
>>>
>>> Do you know where in the standard this is specified? I'm having trouble finding it.
>>
>> The parameter in PUT is a “const void *”. It’s read-only for MPI.
>
> It’s less clear for GET, but the standard says it’s equivalent to sending and receiving, which should imply overlapping buffers is invalid. Either way, I can’t imagine that not being the intention of the RMA working group (I’m a part of it).
>
> In MPI-2, this was not a problem at all since we couldn’t send data from the local public window to a remote public window (two simultaneous locks were not allowed; FENCE didn’t allow load/store and PUT/GET in the same epoch, etc.). In MPI-3 we allowed this, but forgot to make it clear that they shouldn’t overlap.
>
> We should try to make it clearer in the standard, though I don’t think it’s valid even in MPI-3.
>
> — Pavan
>
> --
> Pavan Balaji ✉️
> http://www.mcs.anl.gov/~balaji
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
--
Carsten Clauss
www.par-tec.com
_____________________________________
ParTec Cluster Competence Center GmbH
Possartstrasse 20
D-81679 Muenchen
Geschäftsführer RA. Dipl.-Ing. Bernhard Frohwitter Eingetragen beim
Amtsgericht München HRB 151545 Steuer-Nr. 08/32305, Ust-ID DE235527064
More information about the discuss
mailing list