[MPI3 Fortran] ASYNC attribute
Aleksandar Donev
donev1 at llnl.gov
Wed May 6 18:33:42 CDT 2009
Rolf Rabenseifner wrote:
> - What are the rules of handing over
> 1. an ASYNC_EXTERNAL real variable or ASYNC dummy argument
> handed over to a subroutine with a dummy argument
> defined ___with__ ASYNC
> 2. same but
> defined _without_ ASYNC
> 3. a __normal__ variable or normal dummy argument handed over
> to a subroutine with a dummy argument defined ___with__ ASYNC
>
> I would expect that all three cases should be allowed.
Yes.
> I would like to have the following detailed behavior:
>
> - Copyin/out is prohibited in all 3 cases
Only if both actual and dummy have the attribute (case 1).
In case 3, the asynchronous data transfer must be restricted to inside
the subroutine. It must end when the subroutine completes, otherwise the
user must put the attribute on the actual also. So I don't see a problem
with copy in/out.
In case 2, which is likely not to be as common, the user must know that
there is no asynchronous pending operations at the time of the call,
just like:
buffer(4)=1
requires that the user know buffer(4) is not being modified externally.
No problem with copy in/out.
I agree with the rest of your wishes and I believe our proposed
specification does that (but it is not yet technically polished enough).
> - In your example, one needs
> SUBROUTINE UPDATE_INTERIOR(buf)
> TYPE(*), DIMENSION(..), ASYNC :: buf
> This is needed to avoid, e.g., temporary aching, overwriting
> and restoring of parts of the data for loop fusion.
Yes. Or, if the routine can deal with non-contiguous arrays, he could
have done:
call update_interior(buf(2:N-1))
so that only the interior is passed (this is the case #2 above).
Best,
Aleks
--
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
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://cims.nyu.edu/~donev
More information about the mpiwg-fortran
mailing list