INTENT take two: handles and targets

Michael Hennecke (hennecke@rz.uni-karlsruhe.de)
Wed, 14 May 1997 10:41:04 +0200 (CES)

According to Jeff Squyres:
> Can't we get a compromise by removing the clause, p5 32-36: "There is one
> special case -- if an argument is a handle to an opaque object (these
> terms are define din Section 2.5.1), and the object is updated by the
> procedure call, then the argument is marked OUT. It is marked this way
> even though the handle itself is not modified -- we use the OUT attribute
> to denote that what the randle references is updated."

This is one paragraph whose removal would clarify the binding a lot:
As mentioned by others, the intent of the argument, from the compiler's view,
is that of the handle and not of anything it "points to" in the MPI system.
"what the user perceives as changing" is exactly the argument he or she
supplied, and not something behind the scenes which is inaccessible to
the user. Otherwise, we could not even pass a SEND buffer as intent(in)
since it will definitely change the state of something behind the scenes :-)

In my opinion, the correct way to say that the handle's target changes is
by a scentence in the description of either the handle argument, or the
procedure as a whole. INTENT is not the right place to document this.

But this handle/target stuff is not all of the discussion: another problem
comes from the arguments which are documented OUT, but MPI procedures need
to read the value supplied by the user. MPI_IN_PLACE is an example where on
object and not a handle is passed as OUT RECVBUF but needs to be *read* by
the procedure. So the recommendation in the advice to users in 6.3.2 (page
118 in the April-17 draft) to use INTENT(INOUT) should also be reflected in
the procedure specifications.
I guess MPI_STATUS_IGNORE is a similar case, and there may be others.

Thanks,
Michael

======================================================================
Michael Hennecke http://www.uni-karlsruhe.de/~Michael.Hennecke/
----------------------------------------------------------------------
University of Karlsruhe RFC822: hennecke@rz.uni-karlsruhe.de
Computing Center (G20.21 R210) No longer on BITNET :-(
Zirkel 2 * P.O. Box 69 80 Phone: +49 721 608-4862
D-76128 Karlsruhe Fax: +49 721 32550
======================================================================