[MPI3 Fortran] Deprecate mpif.h?
nmm1 at cam.ac.uk
Mon Mar 8 10:52:16 CST 2010
On Mar 8 2010, Bill Long wrote:
>> This is in the context of MPI choice arguments, where the information is
>> provided by the MPI datatype argument.
>> However, in general (i.e. not just MPI), TYPE(*) isn't useful unless you
>> pass the type some other way - because, except in a few cases, C needs to
>> know the actual type X to make use of the argument. And, if an interface
>> is used only for a single type, why use TYPE(*)?
>The classic example is a 'memory copy' routine where you care about the
>starting addresses of the source and destination and the number of bytes
>to move, but are not interested in the type of the data represented by
>the bits in memory. (MPI seems to have numerous variants on this idea.)
Actually, no, it doesn't. The buffer in MPI_Attach_buffer is the only
one I can think of. MPI choice arguments are typed by other means, and
necessarily so, because MPI supports heterogeneous clusters.
>>> 1) Call by value. The actual value of the argument is passed - a
>>> concept very much like the same in C, and designed for interoperability
>>> with C.
>> Unlike in C, it's a true read-only value, and not the initial value of
>> an updatable variable. C people need to note that.
>Huh? In Fortran a VALUE dummy argument gets its initial value from the
>corresponding actual argument. Within the subprogram, its value can
>change, but at the return to the caller any change in the value is not
>propagated back to the actual argument. ...
I stand corrected. I didn't search far enough in the standard. Thanks
for educating me!
More information about the mpiwg-fortran