[MPI3 Fortran] Fortran extra_state argument to MPIattributefunctions
N.M. Maclaren
nmm1 at cam.ac.uk
Thu May 28 12:26:11 CDT 2009
On May 28 2009, Aleksandar Donev wrote:
>
>> While this is true, a reasonable alternative approach (which is what is
>> actually done by must current implementations for MPI handles) is to use
>> an integer token in Fortran, and have the using routines decode it.
>
>Sure, if you want to stay with the dark ages, go ahead. I don't find it
>alternative to force people to write tables for encoding and decoding
>pointers in a 64 bit integer. It is called a virtual memory system and
>is already done by the operating system. For a language that supports
>pointers, there is no reason to hack integers (that is a good idea in
>scientific codes for efficiency and other considerations, but not here).
I am sorry, but you are talking nonsense. Using tokens for such things has
major software engineering advantages, not least because you can check them
for validity (e.g. scoping errors) before use. Even in C, checking
arbitrary pointer values for validity relies on undefined behaviour.
Using pointers directly is more convenient, yes, but it is not necessarily
better. If Fortran was a language with checked pointers, it would be, but
but it isn't.
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