To: J3 Members J3/16-248 From: Van Snyder Subject: Locality specs in DO CONCURRENT References: 16-007r2, 16-199, N2113 Date: 2016 September 28 During the interval since meeting 210, a persuasive argument was advanced that facilities that can be provided by directives ought not to be incorporated as features of the language. A complementary argument was that features ought not to be added if the facilities they would provide can be gotten resonably using extant features. A further supporting argument was that vendors already have too much on their plates, and the size of the present revision, and perhaps future ones as well, ought to be limited by not entertaining such features. The directives for locality specifications are not simply in principle available in some future hypothetical processor: they are already provided by OpenMP directives. If one prefers not to use those directives, their effect can be gotten by using object declarations and IMPORT statements within a BLOCK construct within a DO CONCURRENT construct. According to those arguments, and the apparent consensus of their advantages, locality specs ought to be deleted from the current revision. The excuse that we don't have sufficient syntactic sugar for LOCAL_INIT rings hollow, since a more generally useful feature, viz. syntax for local automatic reinitialization without acquiring the SAVE attribute, maybe something like real, automatic :: MyX(size(x)) = x has been requested for decades. Providing this feature only for local variables of DO CONCURRENT constructs, using irregular syntax, amplifies the "beloved Fortran tacked-on look," and gives university professors what they consider to be additional reason to snicker about Fortran, and to refuse to teach it. In the next revision after Fortran 2015, the DO CONCURRENT construct ought to have a specification part. Indeed, the of every construct ought to have a specification part. This is not exactly a new concept. It existed in Algol in 1958. Algol did not spring fully-formed from the forehead of Zeus, so somebody was clearly contemplating this concept nearly sixty years ago. It has been requested for Fortran repeatedly. I requested it on page 30 of 97-114r2, in section 19, nearly twenty years ago. I have donated my paper correspondence with X3J3 from during the time of development of Fortran 90 to the Computer History Museum, and e-mail correspondence was not archived before about 1997. Having studied and used Algol, Pascal, Modula 2, and Ada, I might have requested it before 1997, but I have no firm recollection of whether that is true. Until the of the DO CONCURRENT construct, or better the of every construct, has a specification part, textbooks (and the standard) can recommend using declarations within a BLOCK construct within a DO CONCURRENT construct to provide the functionality of OpenMP locality specification directives. 2. Edits ======== [xviii intro under "Data usage and computation"] Delete "The locality ... explicitly specified." [188:23 R1123] Delete "". [188:30-34 R1129-R1130] Delete syntax rules R1129 and R1130. [189:4-20 C1125-C1130] Delete constraints C1125, C1126, C1127, C1128, C1129, and C1130. [192:12-36 11.1.7.5p1-3] Delete 11.1.7.5p1-3 [192:37 11.1.7.5p4] Replace the introduction to the list with "If a variable appears within a DO CONCURRENT construct and" [192:38,41,44, 193:1,3,5 11.1.7.5p4] Replace "if it" with "it" six times. [193:7+ 11.1.7.5p4+] Insert NOTE 11.9a: "NOTE 11.9a Variable declarations within a BLOCK construct within a DO CONCURRENT construct can specify explicitly which variables are not to be shared between iterations. IMPORT statements can specify explicitly which variables are imported into a BLOCK construct within a DO CONCURRENT construct and shared between iterations, or that none are imported." [514:11-12 19.4p1] Delete "A variable that has LOCAL or LOCAL_INIT locality in a DO CONCURRENT construct is a construct entity." [514:36-37 19.4p6] Delete 19.4p6, viz. "A variable that has LOCAL or LOCAL_INIT locality in a DO CONCURRENT construct has the scope of that construct. Its attributes are specified in 11.1.7.5." [521:22-23 19.5.2.5p1(13)] Delete list item (13), viz. "An iteration of a DO CONCURRENT construct completes and the pointer is associated with a variable of that construct that has LOCAL or LOCAL_INIT locality." [527:32-33 19.6.5p1(26)] Delete list item (26), viz. "In a DO CONCURRENT construct, a variable with LOCAL_INIT locality becomes defined at the beginning of each iteration." [529:26-27 19.6.6p1(18)] Delete list item (18), viz. "When execution of an iteration of a DO CONCURRENT construct completes, a construct entity of that construct which has LOCAL or LOCAL_INIT locality becomes undefined."