[MPI3 Fortran] MPI buffer arguments - void and call-by-reference
N.M. Maclaren
nmm1 at cam.ac.uk
Mon Feb 16 16:17:36 CST 2009
On Feb 16 2009, Aleksandar Donev wrote:
>
>> I am lost. What do Fortran pointers have to do with MPI?
>
>Surely it has to do with C pointers (did I ever qualify with Fortran
>specifically?)?
Because you referred to their association status. Fortran pointers have
one; C pointers don't.
> Where do you get from the Fortran standard, including
>the C interop chapter, that if you take a pointer inside a C routine
>(MPI) and keep it, you can use it to change the value of the actual
>after the call completes???
Oh, I didn't make that assumption - no fear! Despite the fact that it is
done in C.2.3 in Annex C :-) This debate is largely about how to enable
that facility.
> If a Fortran pointer is the target of a C
>pointer, it has to have the TARGET attribute---see clause 15 in F2003.
You mean 15.1.2.5 (C_LOC)?
I don't think that means what bit looks as if it does, but let's skip that
for now. Let's just note that your belief that TARGET is the way to do that
means that the example in C.2.3 is broken :-)
I am not adamantly opposed to the use of TARGET, because it is definitely
plausible. I still don't think that it helps, but need to research the
standard to be sure.
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the mpiwg-fortran
mailing list