[MPI3 Fortran] MPI buffer arguments - void and call-by-reference

Aleksandar Donev donev1 at llnl.gov
Mon Feb 9 17:12:17 CST 2009


On Monday 09 February 2009 14:59, Rolf Rabenseifner wrote:

>     Fortran compilers are allowed to choose
> call-by-incopy-and-outcopy instead of call-by-reference.
There are already at least two cases where Fortran compilers are not 
allowed to choose. These are when both the actual and the dummy have 
the attribute: TARGET, VOLATILE, and ASYNCHRONOUS. Perhaps adding yet 
another attribute where the compiler does not have freedom is useful, 
but I am yet to be convinced.

So first I want to ask: Other than with non-blocking transfer (which was 
the subject of a separate message), what is the problem with copy 
in/out? If it is a performance issue, than that is within the realm of 
compiler optimization: As you said, the compiler has the choice and it 
will usually choose the faster (often compilers include a run time 
check to see if the actual is contiguous).

>     Meaning: Same as what currently done, i.e., call-by-reference
>     on the caller side, if call-by-reference is possible (i.e.,
>     not for non-contiguous subarrays)
What if call-by-reference is not possible?
How is this different from what is currently there and why is it useful 
enough over what is already there to warrant inclusion in the Fortran 
standard?

Thanks,
Aleks

-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ Lawrence Livermore National Laboratory
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev




More information about the mpiwg-fortran mailing list