(j3.2006) [MPI3 Fortran] Feedback from Fortran J3 meeting

Craig Rasmussen crasmussen
Wed May 28 12:56:38 EDT 2008


On May 28, 2008, at 10:42 AM, Bill Long wrote:

> I think this thread has gone way off the tracks.
>
> 1) The asynchronous attribute on the buffer actual argument and also  
> in
> the interface is to prevent copy-in/copy-out, which is the critical  
> need
> in interfacing with these MPI routines.
>
> 2) MPI has rules for its users that they should not modify or  
> reference
> the buffer until the corresponding wait subroutine call is made.  That
> has absolutely nothing to do with Fortran, and our rules certainly
> should not get involved in enforcing such a rule.  As Dan points out,
> these are ordinary external subroutine calls as fas as Fortran is  
> concerned.


But from information I received from MPI Forum, we have to do  
something to prevent code motion to complete the picture.  What about:

     MPI_Wait(req, ...)    ! completes MPI_Irecv on buf
     buf(1) = 1

Since buf doesn't appear in the MPI_Wait call the compiler is free to  
move the assignment statement above the MPI_Wait call, correct?   
Perhaps we could convince MPI Forum to add buf to the argument list:

     MPI_Wait(buf, req, ...)

But MPI_Wait could appear in a scope where buf is not declared so this  
doesn't see so attractive.

I wonder how C does this?  What are the rules for code motion in C?   
I'll ask around.

Regards,
Craig


>
>
> Our goal is to create interfaces that allow users to directly call  
> the C
> MPI routines.  Preferably without forcing the users to change their
> source code CALL statements.  That's it.
>



More information about the J3 mailing list