(j3.2006) MPI usage problems in Fortran

Van Snyder Van.Snyder
Wed Mar 19 14:47:28 EDT 2008


On Wed, 2008-03-19 at 13:20 -0500, Bill Long wrote:
> Right, it is a constraint violation.  And it does make sense.  The
> point of giving a dummy variable the asynchronous attribute is to make
> sure that the physical memory referenced through it is the same memory
> as is associated with the corresponding actual argument.  That's
> because an async I/O operation initiated in the subprogram might not
> finish before control is transferred back to the caller, and the I/O
> libraries need a stable target in memory for the data transfers
> throughout the I/O operation.  The VALUE attribute has essentially the
> opposite effect. It, at least conceptually, implies that the dummy is
> associated with a memory location local to the subprogram that gets
> its initial value from the caller, but from that point on is
> disassociated from the corresponding actual argument. In particular,
> any changes made to the value in the local memory location are thrown
> away on return. 

So if one wants to do I/O asynchronously on a VALUE dummy argument, one
has to take another copy.  Beautiful.

There's not really any good reason to prohibit VALUE and ASYNCHRONOUS to
coexist.  One just has to know that the dummy argument is NOT associated
with the actual argument -- so the asynchronous I/O better complete
before the procedure returns.  What's the problem with that?

-- 
Van Snyder                    |  What fraction of Americans believe 
Van.Snyder at jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.




More information about the J3 mailing list