J3/14-277 To: J3 From: Bill Long Subject: Editor's report for WG5/N2033 (J3/14-276) Date: 2014 November 06 Document WG5/N2033 was prepaired by applying edits to WG5/N2027 from PL22.3 meeting 205 papers as well as additional edits. All of the edits applied to WG5/N2027 are summarized below, grouped into three parts. The citations refer to [page:line] locations in WG5/N2027 prefixed by the number of the paper (omitting the 14-) containing the edit, or "Ed" in the case of additional edits. Corrections and explanations for additional edits are noted in {Comments} following the citations. Document WG5/2033 is the same as J3/14-276. Part I consists of edits to WG5/N2027 based on the content of these papers passed at PL22.3 meeting 205: 14-238r2, 14-250r2, 14-253r2, 14-254r1, 14-260, 14-261, 14-265, 14-266r1, 14-267r1, 14-273, and 14-274. Additional minor edits are intermixed in the list. The edits are in page and line number order. Part II consists of edits to WG5/N2027 for eight issues and inconsistencies that became apparent after applying the Part I edits. These changes are editorial repairs that do not make technical changes. Part III consists of edits to repair four minor technical defects in WG5/N2027 as modified by edits from PL22.3 meeting 205 papers. Part I: Edits to WG5/N2027 from M205 papers: ============================================ Edits for Introduction ---------------------- 274:[iv] Introduction paragraph 1, line 2: Delete "a set of". 274:[iv] paragraph 3, line 5: Delete "sets of". Edits for Clauses 1 and 2 ------------------------- (none) Edits for Clause 3 - Terms and definitions ------------------------------------------ 250r2:[5:3+] Add "3.0 <> An image that has not failed, stalled, or initiated termination." {Ed: "An" -> "an".} 274:[5:11+] Add "<3.2a> coarray that is accessible within a CHANGE TEAM construct from outside the construct (5.1)" 250r2:[5:31] Before "has not initiated" insert "is not a stalled image or". {Ensure stalled and failed are distinct states.} Ed:[5:30-32] Change definition of failed image to: "an image for which references or definitions of a variable on the image fail when that variable should be accessible; or an image that is not a stalled image, is not a stopped image, and fails to respond during the execution of an image control statement or a reference to a collective subroutine (5.8)" {With the edit in 250r2, the definition has too many instances of "or" making it hard to parse. Cleaned up version.} 250r2:[5:32+] Add "3.4a <> An image that has encountered an that identifies an image that has failed and has not yet executed an END TEAM statement that makes it active again (5.9)" {Ed: "An" -> "an".} Edits for Clause 4 - Compatibility ---------------------------------- (none) Edits for Clause 5 - Teams of images ------------------------------------ 274:[9:4] Replace "have been" with "are". 274:[9:15] Replace "block" with "construct". 274:[10:13] Delete "the" before "type" 267r1:[10:14+] Add following constraint. "C507a (R503) A shall be the name of an accessible coarray." 274:[10:27] Change "a coarray that does not appear in a " to "a coarray that is not an associating entity". 274:[10:30] Delete the first "the". 274:[10:40] Delete "the" before "other". 273:[11:6-7] Replace "an ancestor of the current" with "the current or an ancestor". {Ed: The edit line was adjusted from 6 to 6-7.} 274:[11:Note 5.3, line 1] Insert "image" after "Each". 274:[11:Note 5.3, line 6] Append ", ONLY: TEAM_TYPE". 274:[12:18] Replace "it shall be executed by the same statement" with "the same statement shall be executed". 250r2:[12:22] Change "failed" to "failed or stalled". Ed:[12:26] Insert "active" before "images". {Missed edit to limit actions to active images. An inactive image cannot execute a FORM TEAM statement.} 274:[13:5] After "image M" add "since execution last began in this team". 250r2:[13:23] Before "has not initiated" insert "is not a stalled image or". {Ensure stalled and failed are distinct states.} 250r2:[13:25] Delete "unless ... paragraph". 250r2:[13:21-24] Move the two sentences "A failed image is one ... program execution." to a separate paragraph following the first paragraph of 5.8. Ed:[13:21-24] Change the first sentence describing a failed image to: "A failed image is one for which references or definitions of a variable on the image fail when that variable should be accessible; or an image that is not a stalled image, is not a stopped image, and fails to respond during the execution of an image control statement or a reference to a collective subroutine." {With the edit in 250r2, the definition has too many instances of "or" making it hard to parse. Cleaned up version.} 250r2:[13:25-26] After "one nonzero status value" add "other than STAT_STALLED_IMAGE ". {Make STAT_STALLED_IMAGE lowest, STAT_FAILED_IMAGE second lowest.} 250r2:[14:1] Change "STAT_FAILED_IMAGE is" to "STAT_FAILED_IMAGE and STAT_STALLED_IMAGE are". 250r2:[14:5-7] At line 6, change "is treated as a failed" to "becomes a stalled". Then move this paragraph to a new section after NOTE 5.9 headed "5.9 STAT_STALLED_IMAGE". 274:[14:4] Replace "are" with "shall be". 266r1:[14:7] After "construct" (moved to the new 5.9 by paper 14-250r2) insert "after execution of all finalizations and deallocations that would have occurred during the normal completion of active procedures invoked within the CHANGE TEAM block, without synchronization of coarray deallocations. 274:[14:Note 5.8, lines 3-4] Replace "may" with "might" because ISO rules do not allow requirements or permissions in nonnormative text. {Ed: two instances changed.} 250r2:[14:NOTE 5.8] Delete the last sentence of Note 5.8. {Ed: This is a stalled image, and the note is for failed images.} 274:[14:7+] Delete the final sentence of NOTE 5.8: "An image ... reason." {Ed: Duplicate of previous edit.} 253r2:[14:7+] Add a Note 5.10 "In addition to detecting that an image has failed by having the variable in a STAT=specifier or a STAT argument of a call to a collective or atomic subroutine assigned the value STAT_FAILED_IMAGE, an image can get the indices of failed images in a specified team by invoking the intrinsic function FAILED_IMAGES." 250r2:[14:7+] At the beginning of the new subclause 5.9 insert a new paragraph: "If the processor has the ability to detect that an image has stalled, the value of the default integer constant STAT_STALLED_IMAGE is positive; otherwise the value of STAT_STALLED_IMAGE is negative. STAT_STALLED_IMAGE is defined in the intrinsic module ISO_FORTRAN_ENV. If the processor detects that an image involved in execution of an image control statement or a collective subroutine has stalled, the value of STAT_STALLED_IMAGE is assigned to the variable specified in a STAT=specifier in an execution of an image control statement, or the STAT argument in an invocation of a collective procedure. If the STAT= specifier of an execution of a CHANGE TEAM, FORM TEAM, SYNC ALL, SYNC IMAGES, or SYNC TEAM statement is assigned the value STAT_STALLED_IMAGE, the intended action shall have taken place for all the active images involved. If more than one nonzero status value is valid for the execution of a statement, the status variable is defined with a value other than STAT_STALLED_IMAGE." Ed:[14:7+] Modify the edit above to move the second sentence "STAT_STALLED_IMAGE is defined in the intrinsic module ISO_FORTRAN_ENV." to the end of the paragraph. {Matches the style of STAT_FAILED_IMAGE in 5.8.} 250r2:[14:7+] At the end of the paragraph moved from [14:5-7], add "If an identifies an image that has failed and a team that is the initial team, the executing image becomes a stalled image for the rest of the execution of the program." 253r2:[14:7+] Add a Note 5.11 to the end of the new subclause 5.9: "In addition to detecting that an image has stalled by having the variable in a STAT=specifier or a STAT argument of a call to a collective subroutine assigned the value STAT_STALLED_IMAGE, an image can get the indices of stalled images in a specified team by invoking the intrinsic function STALLED_IMAGES." Edits for Clause 6 - Events --------------------------- 274:[15:13] Replace "INTEGER with KIND of ATOMIC_INT_KIND defined" with "integer with kind ATOMIC_INT_KIND, where ATOMIC_INT_KIND is a named constant". (compare with 7.4.1 ATOM argument description). 274:[15:28] Insert a blank before the left parenthesis. 274:[15:32] Delete "the" before "execution". 274:[16:6] Insert a blank before the left parenthesis. 274:[16:11] Replace "UNTIL_COUNT ... with" with " if the UNTIL_COUNT specifier appears and has". Edts for Clause 7 - Intrinsic procedures ----------------------------------------- 250r2:[17:6] Before "STOPPED_IMAGES" add "STALLED_IMAGES,". 274:[17:19] Change "atomic memory operations" to "atomic actions". Reason. This is the terminology that we are using, see earlier in this paragraph. 265:[17:28] After "atomic subroutine" insert ", other than ATOMIC_REF, ". {Ed: Omitting the commas.} 265:[17:29] Delete "EVENT,". {Ed: Also deleted comma before EVENT.} 265:[17:31] Change "the argument" to "the STAT argument". 261:[17:32+] Delete NOTE 7.1 274:[17:Note 7.2, line 1] Replace "These properties" with "The properties of atomic subroutines". {Ed: to avoid repetition, change the immediately following "the use of atomic subroutines" to "their use".} 250r2:Change every occurrence of "nonfailed" to "active", except [18:2, 18:4, 18:6]. 250r2:[18:2, 18:4, 18:6] Delete "nonfailed". 250r2:[18:18-19] Change "if no ... failed" to "if all images of the current team are active". 250r2:[18:20]. Change "or STAT_FAILED_IMAGE" to ", STAT_FAILED_IMAGE, or STAT_STALLED_IMAGE". 250r2:[18:21-22] Replace by "Otherwise, if an image of the current team has been detected as failed, the argument is assigned the value of the constant STAT_FAILED_IMAGE. Otherwise, if an image of the current team has been detected as stalled, the argument is assigned the value of the constant STAT_STALLED_IMAGE." Ed:[18:26] Replace "such" with "error". {Consistent with similar edit at [29:11].} 274:[18:Note 7.3, line 1] Replace "in the event ... for" with "if an error condition occurs during execution of". Ed:[18:Note 7.3, line 1] Insert "subroutine" after "collective". {Consistent with following edit.} 274:[18:Note 7.4, line 1] Replace "collectives" with "collective subroutines". 274:[18:Note 7.5, line 1] Replace "procedure" with "subroutine". 274:[18:Note 7.5, line 2,5,6] Insert "subroutine" after "collective" thrice. 274:[19:6] Delete "and". 274:[19:10] Change "shall be a scalar and of type integer" to "shall be an integer scalar". 274:[19:11] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[19:18] Delete "and". 274:[19:22] Change "shall be a scalar and of type integer" to "shall be an integer scalar". 274:[19:23] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[19:25] Change "bitwise AND" to "atomic". 274:[19:30] Delete "and". 274:[19:37] Replace "scalar and" with "a scalar". 274:[19:38] Change "compare" to "atomic". {This reverses a rejection in paper 274. The change makes wording more uniform.} 274:[19:39] Replace "scalar and" with "a scalar". 274:[19:40] Replace "scalar and" with "a scalar". 274:[20:1] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[20:4] Change "compare and swap" to "atomic". 274:[20:9] Delete "and". 274:[20:13] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[20:15] Change "add" to "atomic". 274:[20:16] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[20:19] Change "add" to "atomic". 274:[20:24] Delete "and". 274:[20:28] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[20:30] Change "bitwise AND" to "atomic". 274:[20:31] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[20:34] Change "bitwise AND" to "atomic". 274:[20:34] Insert "was" before "executed". {Ed: Rejected edit. Introduces a style inconsistent with other atomics.} 274:[20:39] Delete "and". 274:[21:3] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[21:5] Change "bitwise OR" to "atomic". 274:[21:6] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[21:9] Change "bitwise OR" to "atomic". 274:[21:14] Delete "and". 274:[21:18] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[21:20] Change "bitwise exclusive OR" to "atomic". 274:[21:21] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[21:24] Change "bitwise exclusive OR" to "atomic". 274:[21:29] Delete "and". 274:[21:33] Replace "scalar and of type integer" with "an integer scalar". 274:[21:33] Change "shall be a scalar of type integer" to "shall be an integer scalar". {Ed: Duplicate edit.} 274:[21:34] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[21:36] Change "bitwise OR" to "atomic". 274:[22:2] Delete "and". 274:[22:6] Change "shall be a scalar and of type integer" to "shall be an integer scalar". 274:[22:6] Replace "scalar and of type integer" with "an integer scalar". {Ed: Duplicate edit.} 274:[22:7] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[22:9] Change "bitwise exclusive OR" to "atomic". 238r2:[22:14] In the description of the argument A in CO_BROADCAST, after the initial sentence ending "of the current team." insert a new sentence: "It shall not be a coindexed object.". 274:[22:15-16] Replace "of the current" with "in the current". 274:[22:18] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[22:19] Replace "of the current" with "in the current". 274:[22:20] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[22:21] Change "shall be a scalar of type default character" to "shall be a default character scalar". 238r2:[22:30] In the description of the argument A in CO_MAX, after the second sentence ending "of the current team." insert a new sentence: "It shall not be a coindexed object.". 274:[22:33] Replace "of the current" with "in the current". 274:[22:35] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[22:36(twice)] Replace "of the current" with "in the current". 274:[22:37] Replace "of the current" with "in the current". 274:[22:38] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[22:39] Change "shall be a scalar of type default character" to "shall be a default character scalar". 274:[22:40] Replace "of the current" with "in the current". 274:[22:42] Replace "of the current" with "in the current". 238r2:[23:10] In the description of the argument A in CO_MIN, after the second sentence ending "of the current team." insert a new sentence: "It shall not be a coindexed object.". 274:[23:12] Replace "of the current" with "in the current". 274:[23:15] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[23:16(twice)] Replace "of the current" with "in the current". 274:[23:17] Replace "of the current" with "in the current". 274:[23:18] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[23:19] Change "shall be a scalar of type default character" to "shall be a default character scalar". Ed:[23:20,22] More cases of "of the current" -> "in the current". 274:[23:31] Replace "of the current" with "in the current". 238r2:[23:32] In the description of the argument A in CO_REDUCE, after the second sentence ending "of the current team." insert a new sentence: "It shall not be a coindexed object.". 274:[23:33] Replace "of the current" with "in the current". 274:[23:34] Replace "of the current" with "in the current". 274:[23:36] Replace "of the current" with "in the current". 238r2:[23:37] After "two " insert "scalar, nonallocatable, nonpointer, nonoptional ". 238r2:[23:39] After "polymorphic." insert a new sentence "If one argument has the ASYNCHRONOUS, TARGET, or VALUE attribute, both shall have the attribute." 274:[23:40] Replace "implement" with "be". 274:[23:40] Replace "of the current" with "in the current". 274:[23:41] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[23:42(twice)] Replace "of the current" with "in the current". 274:[23:43] Replace "of the current" with "in the current". 274:[24:1] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[24:2] Change "shall be a scalar of type default character" to "shall be a default character scalar". 274:[24:3] Replace "of the current" with "in the current". 274:[24:5] Replace "of the current" with "in the current". 238r2:[24:7-8] Change "execution of r = OPERATOR(x,y)" to "evaluation of OPERATOR(x,y)" and "addition of r" to "addition of the value of OPERATOR(x,y)". Typeset x and y in math font. 274:[24:18] Replace "of the current" with "in the current". 238r2:[24:19] In the description of the argument A in CO_SUM, after the second sentence ending "of the current team." insert a new sentence: "It shall not be a coindexed object.". 274:[24:21(twice)] Replace "of the current" with "in the current". 274:[24:25] Change "shall be a scalar of type integer" to "shall be an integer scalar". 274:[24:26(twice)] Replace "of the current" with "in the current". 274:[24:27] Replace "of the current" with "in the current". 274:[24:28] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[24:29] Change "shall be a scalar of type default character" to "shall be a default character scalar". 274:[24:30] Replace "of the current" with "in the current". 274:[24:32] Replace "of the current" with "in the current". 274:[24:37] Delete ", ERRMSG". 274:[24:41] Replace "scalar and" with "a scalar". 274:[24:41] Delete "and". {Ed: Overridden by previous edit.} 274:[25:2] Replace "scalar and of type integer" with "an integer scalar". 251:[25:5] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 252:[25:6-8] Delete "ERRMSG ... of the argument." 274:[25:6] Replace "scalar of type default character" with "default character scalar". {Ed: Edit not done - edited text removed by previous edit.} 274:[25:20] Delete "the" before "type" 273:[25:21] Replace "an ancestor" with "the current or an ancestor". 274:[25:23] Delete "the" before "type" 274:[25:23] Insert "decimal" before "range". 260:[25:32] After "STAT_FAILED_IMAGE" insert "from the intrinsic module ISO_FORTRAN_ENV". 274:[25:32-33] Insert a comma after "STAT_FAILED_IMAGE" twice. {Ed: First comma inserted after the added text from the above edit.} 274:[26:5] Replace "and" with "or". 274:[26:7] Delete "and". 274:[26:15] Append ", ONLY: TEAM_TYPE". 274:[26:22] Append ", ONLY: TEAM_TYPE". 273:[26:46] Replace "an ancestor" with "the current or an ancestor". 250r2:[27:3] After "failed," add "STAT_STALLED_IMAGE if the specified image has stalled,". 250r2:[27:4-5]. Change "STAT_FAILED_IMAGE" to "STAT_FAILED_IMAGE, STAT_STALLED_IMAGE,". 250r2:[27:6+] Add "7.4.18a STALLED_IMAGES([TEAM, KIND]) <> Indices of stalled images. <> Transformational function. <> TEAM (optional) shall be a scalar of the type TEAM_TYPE defined in the ISO_FORTRAN_ENV intrinsic module. Its value shall represent an ancestor team. KIND (optional) shall be a scalar integer constant expression. Its value shall be the value of a kind type parameter for the type INTEGER. The range for integers of this kind shall be at least as large as for default integer. <> Integer. If KIND is present, the kind type parameter is that specified by the value of KIND; otherwise, the kind type parameter is that of default integer type. The result is an array of rank one whose size is equal to the number of images in the specified team that are known by the invoking image to have stalled. <> If TEAM is present, its value specifies the team; otherwise, the team specified is the current team. The elements of the result are the values of the image indices of the known stalled images in the specified team, in numerically increasing order. <> If image 3 is the only stalled image in the current team, STALLED_IMAGES() has the value [3]. If there are no images in the current team that are known by the invoking image to have stalled, STALLED_IMAGES() is a zero-sized array. 273:[27:6+] In the new STALLED_IMAGES intrinsic, in the TEAM argument description, Replace "an ancestor" with "the current or an ancestor". Ed:[27:6+] Make the changes in edits for [27:14] in the corresponding places in the new STALLED_IMAGES intrinsic text. 273:[27:12] Replace "an ancestor" with "the current or an ancestor". 274:[27:14] Insert "decimal" before "range". 274:[27:14] Delete "the" before "type" 260:[27:22] After "STAT_STOPPED_IMAGE" insert "from the intrinsic module ISO_FORTRAN_ENV". 274:[27:24] Replace "image in the set of" with "of the". 274:[27:32] Delete "the" before "type" 273:[27:33] Replace "an ancestor" with "the current or an ancestor". 274:[28:20] Delete "the" before "type" 273:[28:21] Replace "an ancestor" with "the current or an ancestor". {Ed: The original citation of [27:21] had the wrong page number.} Ed:[28:22] Change "positive scalar integer" to "positive integer scalar". {Match convention of "scalar" last.} 250r2:[28:26] Change "failed" to "failed or stalled". 274:[28:28] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal exponent range of at least four". 274:[28:29] Replace "scalar of type default character" with "default character scalar". 250r2:[29:3] After ISO_FORTRAN_ENV add "; otherwise, if a stalled image is detected and execution is otherwise successful, the STAT= specifier is assigned the value STAT_STALLED_IMAGE in the intrinsic module ISO_FORTRAN_ENV. 274:[29:4] Insert "of the named constant" before "STAT_-". 250r2:[29:7]. Change "or STAT_FAILED_IMAGE" to ", STAT_FAILED_IMAGE, or STAT_STALLED_IMAGE". 250r2:[29:9] Change "failed" to "failed or stalled". 274:[29:11] Replace "such" with "error". 254r1:[29:13-14] Delete "the optional argument FAILED". {Ed: Also deleted "and" following "FAILED" and "additional" following "two". Don't need "additional" if have "adding" two words earlier. Finally, change "any" to "either" near end of the sentence - there are only two additions now.} 274:[29:16] Delete "the" before "type" 273:[29:17] Replace "an ancestor" with "the current or an ancestor". Ed:[29:18] Change "positive scalar integer" to "positive integer scalar". {Match convention of "scalar" last.} 274:[29:19] Delete "the" before "execution". 254r1:[29:20-22] Delete paragraph. 274:[29:22] Replace the comma with a semicolon. {Ed: Not done. Text deleted by above edit.} 274:[29:27] Delete "the" before "type" Edits for Clause 8 - Required editorial changes to [Fortran 2008] ----------------------------------------------------------------- 274:[31:19] Delete "powerful". Belongs in a sales brochure. 274:[31:21] Delete "tagged" (the term is not defined anywhere). Ed:[31:23] Change "have failed" to "have stalled or failed". {Missing edit for stalled images.} 274:[31:33+] Copy the definition of "established coarray" here, with heading 1.3.68a. {Ed: Missing edit.} Ed:[32:1-] Move term "active image" here as 1.3.83a. Ed:[32:1] Change 1.3.85a to 1.3.83b so that failed image is a subclass of image. 250r2:[32:4] Before "has not initiated" insert "is not a stalled image or". {Ensure stalled and failed are distinct states.} Ed:[32:3-5] Change definition of failed image to: "an image for which references or definitions of a variable on the image fail when that variable should be accessible; or an image that is not a stalled image, is not a stopped image, and fails to respond during the execution of an image control statement or a reference to a collective subroutine (5.8)" {With the edit in 250r2, the definition has too many instances of "or" making it hard to parse. Cleaned up version.} 250r2:[32:5+] Add "1.3.132a <> An image that has encountered an that identifies an image that has failed and has not yet executed an END TEAM statement that makes it active again." {Ed: "An" -> "an". Change subclause number to be a subclass of "image" -> 1.3.83c} 274:[32:38] Replace "of" with "in". 274:[32:39] Replace "of" with "in". 274:[33:2] Replace "of the current" with "in the current". 274:[33:5] Insert "being" (with underwave) before "defined". Ed:[33:7] Change "of a team" to "in a team". {Consistent wording for images in a team.} 274:[33:8] Delete the space between "LOCK_TYPE" and the comma. 274:[33:18] Insert a comma before "or" twice. {Ed: First comma not added. The "if either appears" includes both the team variable and team_id.} Ed:[33:23] Insert "\uwave{active}" after "every". {Missing edit for limiting execution to active images.} 274:[34:4] Insert "in the current team" after "images". 274:[34:5] Insert "of the named constant" before "STAT_FAILED_IMAGE". 274:[34:12] Replace "value of" with "values of the named constants". 250r2:[34:6] After "(13.8.2)" add "{\ul ; otherwise, if a stalled image is detected and execution is otherwise successful, the STAT= specifier is assigned the value STAT_STALLED_IMAGE in the intrinsic module ISO_FORTRAN_ENV.}" 274:[34:10] Insert "named" before "constant". 250r2:[34:12-13]. Change "or STAT_FAILED_IMAGE" to ", STAT_FAILED_IMAGE, or STAT_STALLED_IMAGE". 250r2:[34:17] Change "failed" to "failed or stalled". 274:[34:24] Replace "of the current" with "in the current". 274:[34:25] Replace "of the current" with "in the current". 251:[35:13] Replace "image \uwave{in the team}" with "image \uwave{in the current team}, and replace "as many times as has image M" by "as many times as has image M {\uwave since execution last began in this team}". 274:[35:16] Change "3" to "4". 274;[35:21+] Add para: "Execution of a SYNC IMAGES statement performs a synchronization of the image with each of the other \uwave{active} images in the . Executions of SYNC IMAGES statements on images M and T correspond if the number of times image M has executed a SYNC IMAGES statement \uwave{in the current team} with T in its image set \uwave{since execution last began in this team} is the same as the number of times image T has executed a SYNC IMAGES statement \uwave{in the current team} with M in its image set \uwave{since execution last began in this team}. The segments that executed before the SYNC IMAGES statement on either image precede the segments that execute after the corresponding SYNC IMAGES statement on the other image." 274:[35:28] Insert "of the named constant" before "STAT_FAILED_IMAGE". {Ed: Similar modification to the edit at [35:29].} 250r2:[35:29] After "(13.8.2)" add "; otherwise, if a stalled image is detected and execution is otherwise successful, the STAT= specifier is assigned the value STAT_STALLED_IMAGE in the intrinsic module ISO_FORTRAN_ENV." 274:[35:32] Insert "value of the named" before "constant". 274:[35:35] Replace "value of" with "values of the named constants". 250r2:[35:35]. Change "or STAT_FAILED_IMAGE" to ", STAT_FAILED_IMAGE, or STAT_STALLED_IMAGE". 274:[35:39] Delete "argument" (statements don't have arguments). 267r1:[35:40] Change "is that specified as its " to "is the union of its and the executing image". 267r1:[35:40] Change "The image" to "The images". 267r1:[35:41] Change "statement is that" to "statement are the one". {Ed: Changed "one" to "ones".} 267r1:[35:41] At the end of "local variable is located", append the following: "and the executing image". 267r1:[35:42] Change "The image" to "The images". 267r1:[35:42] Change "statement is that" to "statement are the one". {Ed: Changed "one" to "ones".} 267r1:[35:43] At the end of "event variable is located", append the following: "and the executing image". 250r2:[36:1, 36:2, 36:9] Change "failed" to "failed or stalled". 274:[36:18] Replace "of" with "in". Ed:[36:24] Delete "and 7.2". {One of the notes was deleted.} Ed:[36:26] Change "NOTES" to "NOTE". {Only one note remains in the subclause.} 250r2:[37:1-] Before the line for STOPPED_IMAGES add STALLED_IMAGES ([TEAM, KIND]) T Indices of stalled images 274:[37:1-] In the entry for EVENT QUERY, Delete ", ERRMSG". Reason. None of the other atomic subroutines have an ERRMSG argument. 274:[37 in the list of new entries for the table in 13.5, for EVENT_QUERY] Insert "variable" after "event". 254r1:[37:3+] In the entry for NUM_IMAGES, delete "[FAILED]" thrice. Ed:[37:5] Change "7.4.20" to "7.4.21". {Added STALLED_IMAGES intrinsic.} Ed:[38:4] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal range of at least four". {Overlooked edit. Make consistent with the other STAT arguments to atomics.} Ed:[38:8] Change "shall be a scalar of type integer" to "shall be an integer scalar with a decimal range of at least four". {Overlooked edit. Make consistent with the other STAT arguments to atomics.} 274:[38:18] Delete "the" before "type" 273:[38:19] Replace "an ancestor" with "the current or an ancestor". Ed:[38:20] Change "positive scalar integer" to "positive integer scalar". {Match convention of "scalar" last.} 274:[38:29] Change "shall be a scalar of type default integer" to "shall be a default integer scalar". {Ed: Changed to match the other STAT variables.} 274:[38:30] Replace "scalar of type default character" with "default character scalar". 254r1:[39:1-2] Delete "[FAILED]" thrice. {Ed: also delete comma in 2 cases.} 274:[39:5] Delete "the" before "type" 273:[39:6] Replace "an ancestor" with "the current or an ancestor". Ed:[39:7] Change "positive scalar integer" to "positive integer scalar". {Match convention of "scalar" last.} 254r1:[39:9-10] Delete paragraph for FAILED. 254r1:[39:14-16] Delete paragraph for FAILED. {Ed: This deleted too much - the result value no longer says that num_images returns the number of images. Kept "The result is the number of images in the specified team."} 274:[39:23] Delete "the" before "type" 273:[39:24] Replace "an ancestor" with "the current or an ancestor". 250r2:[40:15+] Add a new edit: "In 13.8.2 The ISO FORTRAN ENV intrinsic module, insert a new subclause 13.8.2.23a consisting of subclause 5.8 STAT_STALLED_IMAGE of this Technical Specification, but omitting the second sentence of the first paragraph." {Ed: Change 5.8 to 5.9 - that's the STAT_STALLED_IMAGE subclause.} 253r2:[40:15+] Add "{In 13.8.2.24 STAT_STOPPED_IMAGE, edit the paragraph as follows.} The value of the default integer scalar constant STAT_STOPPED_IMAGE is assigned to the variable specified in a STAT= specifier (6.7.4, 8.5.7) \uwave{or a STAT argument in a call to a collective subroutine} if execution of the statement with that specifier or argument requires synchronization with an image that has initiated termination of execution. This value shall be positive \sout{and different from the value of IOSTAT INQUIRE INTERNAL UNIT}." 253r2:[40:15+] Add "{In 13.8.2.24 STAT_STOPPED_IMAGE, insert a new Note after paragraph 1} "In addition to detecting that an image has initiated normal termination by having the variable in a STAT=specifier or a STAT argument of a call to a collective subroutine assigned the value STAT_STOPPED_IMAGE, an image can get the indices of the images that have initiated normal termination in a specified team by invoking the intrinsic function STOPPED_IMAGES." 250r2:[40:21] Before "STAT_STOPPED_IMAGE" insert "STAT_STALLED_IMAGE, ". {Insert STAT_STALLED_IMAGE in the list of constants with distinct values.} Ed:[40:36] Change "{At the end" to "{In 16.6.7, at the end" and delete "in 6.6.7" later in the line. {Use consistent style for editing instructions.} 274:[41:11] Add subclause number " (13.8.2.21b)" after "to fail". 274:[41:12] Add subclause number " (8.4a)" after "is made available". 274:[41:13] Add subclause number " (13.7.42e)" after "CO_SUM intrinsic subroutine". 274:[41:14] Add subclause number " (13.7.42d)" after "CO_REDUCE intrinsic subroutine". 274:[41:15] Add subclause number " (8.5.2a)" after "with each other". 274:[41:16] Add subclause number " (8.5.2c)" after "without a NEW_INDEX= specifier". {Ed: Fixed typo in exit instructions.} Edits to Annex A - Extended notes --------------------------------- Ed:[43:9] After "ISO_FORTRAN_ENV" insert ", ONLY: TEAM_TYPE". {Make style consistent with program example changes in Note 5.3 and at [26:15] and [26:22].} Ed:[44:6] After "ISO_FORTRAN_ENV" insert ", ONLY: team_type, STAT_FAILED_IMAGE". {Make style consistent with program example changes in Note 5.3 and at [26:15] and [26:22].} Part II: Additional edits to N2027: =================================== 1) Global edit: Change "the ISO_FORTRAN_ENV intrinsic module" to "the intrinsic module ISO_FORTRAN_ENV". Thirteen instances changed. {The TS document has multiple instances of "the ISO_FORTRAN_ENV intrinsic module" and also "the intrinsic module ISO_FORTRAN_ENV", leading to style inconsistency. The second form is used in the base Fortran standard. The exception is as the title of 13.8.2.} 2) Add a definition of "stopped image" in clause 3 and 8.3. "stopped image an image that has initiated normal termination" {We have intrinsics for FAILED_IMAGES (7.4.16), STALLED_IMAGES (7.4.19), and STOPPED_IMAGES (7.4.20). But terms for only failed images and stalled images. This seems not symmetric. Also, "stopped image" is a simpler fit in several locations elsewhere in the text.} 3) At [19:13] change "to its previous value plus 42" to "defined with the value 46 if the value of I[3] was 4 when the atomic operation executed". {The wording style for the example in ATOMIC_ADD did not match the style in other atomic subroutines. Also the word "previous" was too vague.} 4) At [25:36] change "failed image in the current team" to "image in the current team that is known by the invoking image to have failed". {Use wording like that of the sentence that follows, and in the Result Value text.} 5) [27:6+] In the new STALLED_IMAGES function, make the same change as the edit (4) above, except replace "failed" by "stalled". {Use wording like that of the sentence that follows, and in the Result Value text.} 6) At [29:24] in 7.5.5 THIS_IMAGE, change "THIS_IMAGE( )" to "THIS_IMAGE". {All of the forms of THIS_IMAGE are getting the optional TEAM argument, not just the form that has no argument in F2008.} 7) At [33:8-9] Delete this edit. {The current text allows for the direct accessing of remote data in the current team. The new syntax allows for accessing all the images through the initial team, so this limitation is misleading.} 8) At [32:35+] following the edit for 2.3.4, insert a new edit: "{After 2.3.5 Execution sequence, insert a new subclause "2.3.6 Image execution states" consisting of five paragraphs, with the third paragraph consisting of the second paragraph and Note 5.8 of 5.8 STAT_FAILED_IMAGE of this Technical Specification, the fourth and fifth paragraphs consisting of the second and third paragraphs of 5.9 STAT_STALLED_IMAGE of this Technical Specification, and the first and second paragraphs as follows.} A stopped image is an image that has initiated termination of execution. An active image is an image that is not a failed image, a stalled image, or a stopped image." At [40:13-14] In the edit moving 5.8 STAT_FAILED_IMAGE, change "consisting of subclause 5.8" to "consisting of the first paragraph and Notes 5.9 and 5.10 of subclause 5.8". In the 150r2:[40:15+] in Part I, in the edit moving 5.9 STAT_STALLED_IMAGE, change "consisting of subcaluse 5.9" to "consisting of the first paragraph and Note of subcaluse 5.9", and change "second" to "final". {The current subclause 8.9 edits to move the descriptions of STAT_FAILED_IMAGE and STAT_STALLED_MAGE to Clause 13 of F2015 including moving the paragraphs defining a failed image and stalled image to 13.8.2.x. These definitions belong in 2.3.x of F2015, where we discuss images and program execution. The edits here move these definitions to a new 2.3.6 and omit them from the text moved to 13.8.2.x.} Part III: Technical corrections to N2027: ========================================= 1) At [16:7] change "UNTIL_COUNT = " to "", add a new rule "R604a <> UNTIL_COUNT = shall not appear more than once in an ." {Overlooked constraint. Multiple UNTIL_COUNT= specifiers in the same EVENT WAIT statement are not reasonable and should be disallowed.} 2) The TEAM_ID function and the modifications to IMAGE_INDEX and NUM_IMAGES do not account for the possibility that the optional TEAM argument represents the initial team. A team_id value is associated with execution of FORM TEAM. There is no concept of the "team id" in the initial team. There are two alternatives for a fix: a) Require that the specified team is not the initial team. b) If the specified team is the initial team, then TEAM_ID( ) result value is -1 (indicating an invalid value), and the TEAM_ID arguments to IMAGE_INDEX and NUM_IMAGES are ignored if they are present. Alternative (b) seems more friendly to programmers, so edits are added to implement that option. [27:35-37] In 7.4.20 TEAM_ID replace the Result Value description with: "If TEAM is present its value specifies the team; otherwise, the team specified is the current team. If the specified team is the initial team, the result is -1; otherwise, the result value is the team identifier of the invoking image in the specified team." [28:22] In 7.5.2 IMAGE_INDEX, para 3, change "Its value shall be" to "If the current team is the initial team, its value is ignored. Otherwise, its value shall be". [29:18] In 7.5.4 NUM_IMAGES, para 3, change "Its value shall be" to "If the current team is the initial team, its value is ignored. Otherwise, its value shall be". [38:20] In the TEAM_ID argument edits for IMAGE_INDEX, change "Its value shall be" to "If the current team is the initial team, its value is ignored. Otherwise, its value shall be". [38:22] Delete "or TEAM_ID". {The TEAM_ID argument does not specify a team.} [39:7] In the TEAM_ID argument edits for NUM_IMAGES, change "Its value shall be" to "If the current team is the initial team, its value is ignored. Otherwise, its value shall be". [39:13] Delete "or TEAM_ID". {The TEAM_ID argument does not specify a team. Also move this paragraph to be part of the argument description, not part of the result value. 3) In 7.5.5 THIS_IMAGE, the second sentence of para 2 says of the TEAM argument "It shall not be a coarray." This is obsolete, and should have been the same as the corresponding text in 7.5.4 for NUM_IMAGES. The same TEAM argument would usually be used for both functions and should have the same requirements. [29:28] Change "It shall be a coarray." to "Its value shall represent the current or an ancestor team." [39:24] Delete "It shall be a coarray." 4) Subclause 13.8.2.24 STAT_STOPPED_IMAGE of 14-007r2, says that if an image involved in a collective activity has stopped, then the status variable is assigned STAT_STOPPED_IMAGE. The 5.8 of N2027 says that if a failed image is detected, STAT_FAILED_IMAGE is assigned to the status variable. Since multiple images would normally be involved with the collective activity, it is possible for that set to include both a stopped image and a failed image. This situation would make the requirements on the value of the status variable contradictory. This is a defect in 5.8, as there was no intention to change the priority implied in 13.8.2.24. The new TS text 5.9 for stalled images has the same defect. The intention is that when there are multiple valid options for the status value, the first in the following list is selected: STAT_STOPPED_IMAGE, any valid value not in this list, STAT_FAILED_IMAGE, and lastly, STAT_STALLED_IMAGE. The wording in TS subclauses 5.8 and 5.9 is fixed to correct the defects, and the sentences rearranged to bring related sentences closer together. As a side effect, the edits for moving the text to the base standard are simplified. [13:14-14:4] In the second sentence, after "and does so," insert " and no error condition other than a failed image or a stalled image is detected,", and rearrange the sentences and paragraph breaks to that it reads as follows: If the processor has the ability to detect that an image has failed, the value of the default integer scalar constant STAT_FAILED_IMAGE is positive; otherwise, the value of STAT_FAILED_IMAGE is negative. If the processor has the ability to detect that an image involved in execution of an image control statement or a collective or atomic subroutine has failed and does so, and no error condition other than a failed image or a stalled image is detected, the value of STAT_FAILED_IMAGE is assigned to the variable specified in a STAT=specifier in an execution of an image control statement, or the STAT argument in an invocation of a collective or atomic procedure. If more than one nonzero status value other than STAT_STALLED_IMAGE is valid for the execution of a statement, the status variable is defined with a value other than STAT_FAILED_IMAGE. If the STAT= specifier of an execution of a CHANGE TEAM, END TEAM, FORM TEAM, SYNC ALL, SYNC IMAGES, or SYNC TEAM statement is assigned the value STAT_FAILED_IMAGE, the intended action shall have taken place for all the active images involved. STAT_FAILED_IMAGE is defined in the intrinsic module ISO_FORTRAN_ENV. The values of the named constants IOSTAT_INQUIRE_INTERNAL_UNIT, STAT_FAILED_IMAGE, STAT_LOCKED, STAT_LOCKED_OTHER_IMAGE, STAT_STALLED_IMAGE, STAT_STOPPED_IMAGE, and STAT_UNLOCKED shall be distinct. A failed image is one for which references or definitions of a variable on the image fail when that variable should be accessible; or an image that is not a stalled image, is not a stopped image, and fails to respond during the execution of an image control statement or a reference to a collective subroutine. A failed image remains failed for the remainder of the program execution. The conditions that cause an image to fail are processor dependent. [40:14-15] In the instructions for moving 5.8 to clause 13 of the base standard, delete ", but omitting the final two sentences of the first paragraph". {Those sentences are now a separate paragraph.} [14:5-7] In the new 5.9 text for STAT_STALLED_IMAGE, after "and does so," insert " and no error condition is detected,", and rearrange the sentences and paragraph breaks to that it reads as follows: If the processor has the ability to detect that an image has stalled, the value of the default integer constant STAT_STALLED_IMAGE is positive; otherwise the value of STAT_STALLED_IMAGE is negative. If the processor detects that an image involved in execution of an image control statement or a collective subroutine has stalled, and no other error condition is detected, the value of STAT_STALLED_IMAGE is assigned to the variable specified in a STAT=specifier in an execution of an image control statement, or the STAT argument in an invocation of a collective procedure. If more than one nonzero status value is valid for the execution of a statement, the status variable is defined with a value other than STAT_STALLED_IMAGE. If the STAT= specifier of an execution of a CHANGE TEAM, FORM TEAM, SYNC ALL, SYNC IMAGES, or SYNC TEAM statement is assigned the value STAT_STALLED_IMAGE, the intended action shall have taken place for all the active images involved. STAT_STALLED_IMAGE is defined in the intrinsic module ISO_FORTRAN_ENV. If an \si{image-selector} identifies an image that has failed and a team other than the initial team, the executing image becomes a stalled image for the rest of the execution of the corresponding CHANGE TEAM block. The executing image shall transfer control to the END TEAM statement of the construct after execution of all finalizations and deallocations that would have occurred during the normal completion of active procedures invoked within the CHANGE TEAM block, without synchronization of coarray deallocations. If an \si{image-selector} identifies an image that has failed and a team that is the initial team, the executing image becomes a stalled image for the rest of the execution of the program. [40:17] In the instructions for moving 5.9 to clause 13 of the base standard, delete ", but omitting the final sentence of the first paragraph". {That sentence is now a separate paragraph.}