From owner-sc22wg5@open-std.org  Thu Mar 31 01:00:28 2011
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 4935AC178E5; Thu, 31 Mar 2011 01:00:28 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from proofpoint2.lanl.gov (proofpoint2.lanl.gov [204.121.3.26])
	by www2.open-std.org (Postfix) with ESMTP id 32321C178E4
	for <sc22wg5@open-std.org>; Thu, 31 Mar 2011 01:00:25 +0200 (CET DST)
Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101])
	by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id p2V0hdFM021206;
	Wed, 30 Mar 2011 18:43:39 -0600
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mailrelay1.lanl.gov (Postfix) with ESMTP id 2B584162CE7;
	Wed, 30 Mar 2011 17:00:22 -0600 (MDT)
X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov
Received: from lanlht02.win.lanl.gov (lanlht02.win.lanl.gov [128.165.5.59])
	by mailrelay1.lanl.gov (Postfix) with ESMTP id 0BFB51629BE;
	Wed, 30 Mar 2011 17:00:22 -0600 (MDT)
Received: from EMAIL01.win.lanl.gov ([128.165.222.165]) by
 lanlht02.win.lanl.gov ([128.165.5.59]) with mapi; Wed, 30 Mar 2011 17:00:22
 -0600
From: "Rasmussen, Craig E" <rasmussn@lanl.gov>
To: fortran standards email list for J3 <j3@j3-fortran.org>,
	"John.Reid@stfc.ac.uk" <John.Reid@stfc.ac.uk>
Cc: "sc22wg5@open-std.org" <sc22wg5@open-std.org>
Date: Wed, 30 Mar 2011 17:00:21 -0600
Subject: RE: Comment on Fortran WG5 ballot N1846
Thread-Topic: Comment on Fortran WG5 ballot N1846
Thread-Index: AQHL7y4/Id1pFqAqTUikCRWX611jWA==
Message-ID: <7459763EE1572547A3D8B4C4611BF0940556F480CD@EMAIL01.win.lanl.gov>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000
 definitions=2011-03-30_10:2011-03-30,2011-03-30,1970-01-01 signatures=0
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

>=20
> Please answer the following question "Is N1814 ready for forwarding to SC=
22=20
> as the PDTR?" in one of these ways.=20
>=20
> 1) Yes.
> 2) Yes, but I recommend the following changes.=20
> 3) No, for the following reasons.
> 4) Abstain.

No, for the following reasons:

The requirements in paper 09-231 "Answer to MPI Forum regarding MPI asynchr=
onous operations" from J3 meeting 188 seems to have fallen between the crac=
ks.  In a straw poll, J3 voted (8-2-3) to extend ASYNCHRONOUS to restrict o=
ptimizations on variables that may be accessed asynchronously.  The minutes=
 state that no further action will be taken on 09-231 and other papers as t=
hey are all input for the Interop TR N1761.

In section 5.2.7 of N1845, Restrictions on lifetimes, it states that all C =
pointers to any part of an object described by a C descriptor become undefi=
ned on return from the function unless the dummy argument has the TARGET, A=
SYNCHRONOUS or VOLATILE attributes.  However this only applies to attribute=
s on the dummy argument and N1845 makes no mention of extending the ASYNCHR=
ONOUS attribute.  In particular, this is important with regards to a variab=
le that may be accessed asynchronously, but may not be argument associated =
with a dummy with the ASYNCHRONOUS attribute, as the compiler has no knowle=
dge of the asynchronous access.

It seems to me that in order to satisfy the requirements in 09-231 that tex=
t in section 5.3.4 must be modified somewhat.

There are also other issues that are more minor and can be easily fixed:

1. Page 1, line 7: Replace "excution" with "execution".

2. Page 9, 5.2.2:  CFI_cdest_t contains a flexible array member and there i=
s a macro CFI_CDESC_T for declaring a C descriptor with a given rank, howev=
er there doesn't appear to be a function to obtain the sizeof a CFI_cdest_t=
 with a given rank.  A mechanism to obtain the size of a C descriptor is ne=
cessary if one needs to create a long-lived descriptor in C using malloc.

3. Page 14, following paragraph 7:  There is no description of the dim argu=
ment.

4. Page 15, lines 19-21: 5.2.3 states that CFI_dim_t is a named struct type=
 defined by a typedef.  Thus CFI_dim_t is not a pointer type yet pointer de=
referencing is used in lines 19-21, e.g., dim[0]->lower_bound should be dim=
[0].lower_bound.

5. Page 16, lines 6-7: See comment in item #4 above.

6. Page 16, lines 8-9:  The type of the source variable is not stated, in p=
articular, whether it is a pointer.  The usage in line 8 implies it is a po=
inter, the usage in line 9 that it is not a pointer.

7. Page 16, line 40: Replace "component,;" with "component;"

8. Page 16, line 44: The use of sizeof(d) for the displacement argument ass=
umes a particular layout of the interoperable type t, which is processor de=
pendent.

9. Page 17, lines 20-23: See comment in item #4 regarding pointer dereferen=
cing of dim[0].

10. Page 18, line 23: It is stated that ptr point to a C descriptor yet the=
 address operator & is used with ptr in the call to CFI_setpointer.

Regards,
Craig Rasmussen
Los Alamos National Laboratory=
