[MPI3 Fortran] ASYNC attribute

Craig Rasmussen crasmussen at newmexicoconsortium.org
Thu May 7 12:18:36 CDT 2009


On May 6, 2009, at 3:31 PM, Aleksandar Donev wrote:

> Rolf Rabenseifner wrote:
>
>> - What is the difference between ASYNC_EXTERNAL and ASYNC?
> One is reserved for Fortran I/O, the other for other stuff :-)
>
>> - What are the rules of handing over
> We are debating them...will update you later.

The update is that there is one spelling for the attribute.  We are  
extending the ASYNCHRONOUS attribute to include any variable that is  
involved in asynchronous operations, not just Fortran I/O.

There is still some discussion whether the attribute must be  
_explicitly_ given all the way up the call chain.  Or whether it can  
be inherited in the local scope.  For example, I show the implicit case:

-----------------

subroutine mysend(buf, req)
     ...
     ! Must the attribute be explicitly given here or let the compiler  
assume it from the MPI_Isend call?
     ASYNCHRONOUS :: buf
     call MPI_Isend(buf, ..., req)
end subroutine

subroutine mywait(req)
    call mpi_Wait(req)
end subroutine

subroutine foo(buf)
     ! The programmer could forget to add the attribute here!!!!!
     ASYNCHRONOUS :: buf
    call mysend(buf,req)
    call mywait(req)
    A = buf
end subroutine

-------------------

To get the semantics we want, the programmer must add the ASYNCHRONOUS  
attribute in foo.  If the compiler can implicitly give the attribute  
in mysend, then there will be no error if the attribute is not given  
in foo.

I think it is safer to force the user to add it all the way up the  
call chain.  This would require explicit interfaces for mysend and  
mywait.  Since I don't believe in implicit interfaces anyway, I'm  
happy with that.  However, it would break existing code.  But since  
they were broken anyway (with regards to copyin/copyout and code  
motion) then it is a good thing to break existing codes.

-craig




More information about the mpiwg-fortran mailing list