[mpich-discuss] MPI_Get on the same memory location
William Gropp
wgropp at illinois.edu
Sat Aug 23 09:44:19 CDT 2014
It is amusing that the original reason for the restriction on aliasing of arguments comes from Fortran - MPI-1 wanted the language-independent spec to be expressible in both Fortran and C, and this is a property of Fortran (and one which aids in performance).
Bill
William Gropp
Director, Parallel Computing Institute
Thomas M. Siebel Chair in Computer Science
University of Illinois Urbana-Champaign
On Aug 22, 2014, at 6:04 PM, Brian Van Straalen <bvstraalen at lbl.gov> wrote:
>
> Disabling the check is probably a bad idea. if you disable it in MPI you will still push a call to memcpy that has aliased buffers. For many systems memcpy still does the right thing, but modern fancy memcpy implementations have permission to produce wrong results if the regions overlap.
>
> The MPI spec is clear, and the coarray spec is also clear, and clearly different. I would recommend handling this in your library implementation and leave your MPI build as standard. Other MPI builds will be done standard and you will just be delaying the work. You can’t call MPI_Get with aliased locations.
>
> Brian
>
>
>
> On Aug 22, 2014, at 3:18 PM, Alessandro Fanfarillo <fanfarillo at ing.uniroma2.it> wrote:
>
>> Could you tell me which flag disables the check? I would suggest this
>> procedure as temporary workaround.
>>
>> Thanks
>>
>> On Fri, Aug 22, 2014 at 2:41 PM, Balaji, Pavan <balaji at anl.gov> wrote:
>>>
>>> On Aug 22, 2014, at 1:43 PM, Brian Van Straalen <bvstraalen at lbl.gov> wrote:
>>>> Is there a significant cost to have the MPI implementation provide a check for aliasing?
>>>
>>> We do check for this error by default in MPICH (which is why this email thread started).
>>>
>>> There’s a way to turn off the checking through a configure flag as well as an environment variable, if needed. But that’s essentially saying — I know it’s wrong, but I’m too lazy to fix my application.
>>>
>>> — 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
>>
>>
>>
>> --
>>
>> Alessandro Fanfarillo
>> Dip. di Ingegneria Civile ed Ingegneria Informatica
>> Università di Roma "Tor Vergata"
>> NCAR Office: +1 (303) 497-2442
>> Tel: +39-06-7259 7719
>> _______________________________________________
>> discuss mailing list discuss at mpich.org
>> To manage subscription options or unsubscribe:
>> https://lists.mpich.org/mailman/listinfo/discuss
>
> Brian Van Straalen Lawrence Berkeley Lab
> BVStraalen at lbl.gov Computational Research
> (510) 486-4976 Division (crd.lbl.gov)
>
>
>
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140823/e222e0bf/attachment.html>
More information about the discuss
mailing list