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

Rolf Rabenseifner rabenseifner at hlrs.de
Mon Feb 9 17:39:46 CST 2009


Aleksandar,

Yes, the call-by-reference problem is only a problem for
non-blocking routines.
With the blocking routines, there isn't a problem with copying.
Especially with strided subarrays, copying is a feature,
i.e., existing MPI code send such arrays with the
MPI datatpye description "contiguous array".

What you need also to know: I'm not a Fortran specialist.
Therefore, it can be that one of the existing features
already solve the MPI problems, and I do not know about.

I expect, that TARGET, VOLATILE, and ASYNCHRONOUS have
more implications on the optimization than
an explicit requiring of call-by-reference
on a routine call.

My major concern: The current F77 behavior together with
the Call-by-reference compiler option must be conserved.

Are you also at the Fortran meeting together with Craig?

Best regards
Rolf

On Mon, 9 Feb 2009 15:12:17 -0800
  Aleksandar Donev <donev1 at llnl.gov> wrote:
> 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

Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
Nobelstr. 19, D-70550 Stuttgart, Germany . (Office: Allmandring 30)



More information about the mpiwg-fortran mailing list