On Thu, 2009-01-22 at 08:11 -0800, Bill Long wrote:
One simple step toward solving the problem is to write an extra interface layer that includes the argument, which then calls the real MPI wait routine, not passing that argument. Then declaring the buffer and the dummy argument of the wait routine interface layer to be ASYNCHRONOUS ought to work, according to the rules we already have in place for Fortran asynchronous I/O.
The basic problem with adding a buffer argument to a variant of the MPI_wait routines is that the buffer variable may not be accessible in the scoping unit of the call. This seems like a fatal flaw with this approach.
If it's not accessible in the scoping unit of the call, then the compiler can't possibly fiddle with it, and in particular can't possibly move references to it across the call.