[MPI3 Fortran] Fortran extra_state argument to MPI attributefunctions
Bill Long
longb at cray.com
Thu May 28 08:11:24 CDT 2009
Jeff Squyres wrote:
> On May 26, 2009, at 4:43 PM, Aleksandar Donev wrote:
>
>
>> The recommended way, if you are willing to use a Fortran 2003, is to
>> make the extra parameters exactly what they are in C, a void pointer:
>>
>> USE ISO_C_BINDING ! F03 intrinsic module
>> TYPE(C_PTR), VALUE :: extra_state
>>
>
> Is this effectively a neutral type --
If you know about so-called "Cray pointers" (more accurately, Livermore
pointers from LRLtran), C_PTR is just a typealias for a typeless Cray
pointer (pointer(*,*)). In fact, that's exactly how it's defined in
our iso_c_binding module. Similarly, C_LOC has the same effect as the
Cray (and other vendors) LOC function. The intent of C_PTR and C_LOC
was to give these common extensions standardized, and hence portable,
names and syntax.
If you do not know about Cray pointers, and are not interested in
Fortran language archeology, you can safely ignore the previous paragraph.
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the mpiwg-fortran
mailing list