ISO/IEC JTC1/SC22/WG5 N2049 Editor's report for WG5/N2048 Bill Long, 6 March 2015 Document WG5/N2048 was prepared by applying edits to WG5/N2040 based on these papers passed at PL22.3 meeting 206: J3/15-122, J3/15-123, J3/15-124, J3/15-125r2, J3/15-128r2, J3/15-129r2, J3/15-130r1, J3/15-135r3, J3/15-143, J3/15-146, J3/15-147, J3/15-151r1, and J3/15-156r1. Edits from these papers are prefixed by the paper number with the "J3/15-" removed. Additional edits are noted by the prefix "Ed:". Comments following edits are enclosed in { }. The edits are ordered here based on page and line number of WG5/N2040 and constitute Part I of the report. Part II documents an editorial rearrangement of the text resulting from Part I to segregate the subclauses related to failed images into a new clause. Part I: Edits to WG5/N2040 from PL22.3 meeting 206: =================================================== Edits for Clause 1 Scope ------------------------ 122:[1:7] Replace "that the examples ... conforming" with "the correct execution of the examples in Annex A that illustrate the semantics described in clauses 6 and 7". Edits for Clause 2 Normative References --------------------------------------- (none) Edits for Clause 3 Terms and Definitions ---------------------------------------- 147:[5:6] Delete ", stalled,". Ed:[5:13] Change "current team of images" to "active images of the current team". {Collective subroutines cannot execute on inactive images.} 147:[5:37] Delete "is not a stalled image,". {Also remove the comma after "stopped image" - list now has only 2 items.} 147:[5:39 to 6:1] Delete subclause 3.7 stalled image. Edits for Clause 4 Compatibility -------------------------------- (none) Edits for Clause 5 Teams of images ---------------------------------- 123:[9:5] Replace "all the" with "all". 123:[10:21,40] Replace "all the" with "all" twice. Ed:[10:20,21] Insert "active" before "images" twice. {The values of the team variables on inactive images do not matter, and FORM TEAM could not have executed on a inactive image.} 124:[11:4-6] Replace R624 and C509 by "R624 <> <> <> [, ] R624a <> TEAM_ID = <> TEAM = " {Replaced by edit from 151r1 below.} 151r1:[11:4-6] Replace R624 and C509 by "R624 <> <> <> [, ] <> <> [, STAT = ] R624a <> TEAM_ID = <> TEAM = C509 (R624) shall not be a coindexed object." {Modified to have one fewer lines.} 124:[11:7] Replace "" by "TEAM =" and "it" by "". 124:[11:14+] In NOTE 5.2, line 2, replace "[ancestor::i]" by "[i,TEAM=ancestor]". 124:[11:14+] In NOTE 5.3, lines -4 and -3, replace "[INITIAL::ME+1]" by "[ME+1,TEAM=INITIAL]" and "[INITIAL::ME-1]" by "[ME-1,TEAM=INITIAL]". 123:[11:11] Delete "the" before "execution". [A definite article is not correct here, since the FORM TEAM statement might have been executed more than once.] 151r1:[11:14+] Add "NOTE 5.2a The use of a STAT=specifier in an image selector allows a test to be made for a failed image in a reference where the use of a processor- dependent result could cause error termination or an incorrect execution path. Where there is no such possibility, it may be preferable to rely on the STAT=specifier in the next image control statement.". 123:[11:14+8 in lines 3-4 of Note 5.3] Replace "all the" with "all". 147:[12:22] Delete "or stalled". Ed:[13:3] Change "the images" to "the active images". {Match the "active images later in the sentence. The values on inactive images do not matter.} 123:[13:4] Replace "all the" with "all". 129r2:[13:13] Delete "". 129r2:[13:14] Change "No further" to "Neither normal nor error termination is initiated, but no further". 129r2:[13:16-17] Delete para "When ... manner." 129r2:[13:17+10] Delete ' "Subroutine FAIL called" '. 151r1:[13:21] After "image control statement", add ",a reference to a coindexed object,". 147:[13:22] Delete "or a stalled". 151r1:[13:24] After "image control statement", add " or a reference to a coindexed object". 147:[13:25] Delete "other than STAT_STALLED_IMAGE". 123:[14:3,22] Replace "all the" with "all" twice. 147:[14:7] Delete "STAT_STALLED_IMAGE,". 147:[14:10] Change "is not a stalled image, is not a stopped image," to "is not a stopped image". 151r1:[14:12+] Add paragraph "Defining a coindexed object on a failed image has no effect other than defining the , if one appears, with the value STAT_FAILED_IMAGE. The value of an expression that includes a reference to a coindexed object on a failed image is processor dependent. Execution continues after such reference.". {Added "a" before the final "reference".} 135r3:[14:12+] Add three paragraphs: "When an image fails during the execution of a segment, a data object on a non-failed image becomes undefined if it might be defined or undefined by execution of a statement of the segment other than an invocation of an atomic subroutine. If an image fails during the execution of a CRITICAL construct, the execution of the construct is regarded by other images as complete. If the CRITICAL statement of a CRITICAL construct has a STAT= specifier, and an image fails while executing that construct, the specified variable will become defined with the value STAT_FAILED_IMAGE on the next image to execute the construct. If the in a LOCK statement was locked by a failed image and was not unlocked by that image, it becomes unlocked." {This text was later moved to the new Clause 6.} 147:[14:13 to 15:2+] Delete clause 5.9 STAT_STALLED_IMAGE. 123:[14:29] delete "the" before "normal completion". [A definite article is not correct here, since the CHANGE TEAM construct might be executed more than once.] {Edit not done because the text was removed by paper 147.} 123:[14:30] Replace "constuct" by "construct". {Edit not done because the text was removed by paper 147.} Edits for Clause 6 Events ------------------------- 123:[17:7] Delete superfluous space after "ISO_FORTRAN_ENV". 151r1:[18:24+] Add "A failed image might cause an error condition for an EVENT WAIT statement. NOTE An unreasonably long wait on an EVENT WAIT statement in the presence of failed images may be because it was intended that the event be posted by an image that has failed." 123:[18:24+2 in line 1 of Note 6.3] Replace "all the" with "all". Edits for Clause 7 Intrinsic procedures --------------------------------------- 147:[19:6] Delete "STALLED_IMAGES,". Ed:[20:2] Insert “active” before “image”. {A collective subroutine does not execute on an inactive image.} Ed:[20:4, 6] Insert “active” before “images” twice. {A collective subroutine does not execute on an inactive image.} Ed:[20:8] Insert “active” before “images”. {A collective subroutine does not execute on an inactive image.} Ed:[20:11] Change “all of the” to “all active”. {The optional arguments are relevant only on the active images.} 147:[20:20] Change "STAT_FAILED_IMAGE, or STAT_STALLED_IMAGE" to "or STAT_FAILED_IMAGE". 147:[20:22-23] Delete sentence "Otherwise, ... STAT_STALLED_IMAGE.". 130r1:[20:28+] In line 3 of NOTE 7.4, after "images." add "A transfer from an image cannot occur before the collective subroutine has been invoked on that image." 123:[20:28+5 in line 1 of Note 7.3] Replace "All the" with "All of the". 146:[21:11] Replace "an integer" by "a noncoindexed integer". 146:[21:25] Replace "an integer" by "a noncoindexed integer". 146:[22:4] Replace "an integer" by "a noncoindexed integer". 146:[22:20] Replace "an integer" by "a noncoindexed integer". 146:[22:36] Replace "an integer" by "a noncoindexed integer". 146:[23:12] Replace "an integer" by "a noncoindexed integer". 146:[23:28] Replace "an integer" by "a noncoindexed integer". 146:[24:1] Replace "an integer" by "a noncoindexed integer". 146:[24:14] Replace "an integer" by "a noncoindexed integer". 146:[24:28] Replace "an integer" by "a noncoindexed integer". 146:[24:30] Replace "a default" by "a noncoindexed default". 123:[25:3,11,26,34] Replace "all the" with "all" four times. 146:[25:8] Replace "an integer" by "a noncoindexed integer". 146:[25:10] Replace "a default" by "a noncoindexed default". 146:[25:31] Replace "an integer" by "a noncoindexed integer". 146:[25:33] Replace "a default" by "a noncoindexed default". 123:[26:8] Replace "all the" with "all" twice. 146:[26:19] Replace "an integer" by "a noncoindexed integer". 146:[26:21] Replace "a default" by "a noncoindexed default". 123:[26:42] Replace "all the" with "all". 146:[27:1] Replace "an integer" by "a noncoindexed integer". 146:[27:3] Replace "a default" by "a noncoindexed default". 123:[27:4] Replace "all the" with "all". 146:[27:20] Replace "an integer" by "a noncoindexed integer". 124:[28:45] Replace "[PARENT_TEAM::1]" by "[1,TEAM=PARENT_TEAM]". 147:[29:13-14] Delete "STAT_STALLED_IMAGE if the specified image has stalled,". 147:[29:15] Delete ", STAT_STALLED_IMAGE,". 147:[29:18-36] Delete subclause 7.4.19 STALLED_IMAGES([TEAM,KIND)]. 123:[31:3] Change "functions" to "subroutines". 143:[31:3-4] Delete "descriptions of the" and replace "changed" by "modified". 146:[31:6] Replace "an integer" by "a noncoindexed integer". 143:[31:8] Delete "descriptions of the" and replace "changed" by "modified". 123:[31:17] Change "function" to "subroutine". 143:[31:17-18] Delete "descriptions of the" and replace "changed" by "modified". 147:[31:18] Delete "or stalled". 146:[31:20] Replace "an integer" by "a noncoindexed integer". 146:[31:22] Replace "a default" by "a noncoindexed default". 147:[31:37-39] Delete "; otherwise, if a stalled ... ISO_FORTRAN_ENV.". 147:[32:2-3] Change ", STAT_FAILED_IMAGE, or STAT_STALLED_IMAGE" to "or STAT_FAILED_IMAGE". 147:[32:5] Delete "or stalled". 143:[32:9] Delete "descriptions of the" and replace "changed" by "modified". 143:[32:18-19] Delete "descriptions of the" and replace "changed" by "modified". Edits for Clause 8 Required editorial changes --------------------------------------------- 156r1:[33:12] Change "After paragraph 3 of the" to "In the" 156r1:[33:14] Replace line by: "$\bullet$ Features previously described in ISO/IEC TS 18508:2015:" 156r1:[33:15-23] Change each bullet item, as modified in edits below, into a sentence without a bullet, and reformat the resulting sentences together in one paragraph. And add these sentences: "Optional STAT= and ERRMSG= specifiers are added to the CRITICAL statement. Optional arguments are added to the intrinsic procedures ATOMIC_DEFINE, ATOMIC_REF, IMAGE_INDEX, MOVE_ALLOC, NUM_IMAGES, and THIS_IMAGE. Extensions of image selector syntax permit designation of coarrays across team boundaries and optional STAT= specifiers. The STOPPED_IMAGES intrinsic procedure provides the indices of stopped images." 156r1:[33:15] Change "teams" to "The teams facility uses the CHANGE TEAM construct, TEAM_TYPE derived type, FORM TEAM and SYNC TEAM statements, and the GET_TEAM and TEAM_ID intrinsic procedures, to" 123:[33:17] Replace "all the" with "all". Ed:[33:17] Insert "active" before "images". {Collective subroutines don't do anything on inactive images.} 156r1:[33:17] Change "collective subroutines perform" to "The collective subroutines CO_BROADCAST, CO_MAX, CO_MIN, CO_REDUCE, and CO_SUM perform". 156r1:[33:19] Change the beginning of the replacement text from 15-128r2 "additional atomic subroutines for" to "The additional atomic subroutines ATOMIC_ADD, ATOMIC_AND, ATOMIC_CAS, ATOMIC_FETCH_ADD, ATOMIC_FETCH_AND, ATOMIC_FETCH_OR, ATOMIC_FETCH_XOR, ATOMIC_OR, and ATOMIC_XOR perform". 128r2:[33:19-20] Replace "atomic memory operations provide low-level primitives ... computation;" by "additional atomic subroutines for integer addition, compare and swap, and bitwise computations;" {Incorporated into the edits from 156r1 for the same line.} 156r1:[33:21] Change "events" to "The event facility uses the EVENT POST and EVENT WAIT statements, the EVENT_TYPE derived type, and the EVENT_QUERY intrinsic procedure to". 156r1:[33:22-23] Replace 2 lines by "The FAIL TEAM statement, the FAILED_IMAGES and IMAGE_STATUS intrinsic procedures, and the defined constant STAT_FAILED_IMAGE provide support for continued execution after one or more images have failed." 147:[33:23] Delete "stalled or". {Text replaced by 156r1 for the same line.} Ed:[33:32] Change "current team of images" to "active images of the current team". {Collective subroutines do not execute on inactive images.} 147:[34:6] Delete ", stalled,". 147:[34:10] Delete "is not a stalled image,". {Also delete comma after "stopped image".} 147:[34:12-16] Delete subclause 1.3.83c stalled image. 147:[35:6] Change "five" to "three". 135r3:[35:6-7, modified by 15-147] Change "three" (was "five") to "four" and change "third paragraph" to "third and fourth paragraphs" twice. 147:[35:8-9] Delete "the fourth ... Specification,". 147:[35:11] Delete ", a stalled image,". 124:[35:28-30] Replace R624 and C627A by "R624 <> <> <> [, ] R624a <> TEAM_ID = <> TEAM = " {Replaced by following edit.} Ed:[35:28-30] Replace R624 and C627a by "\bnfx{624}{image-selector}{\si{lbracket} \si{cosubscript-list}} \bnfc{} \\ \bnfr{[, \si{team-identifier}] [, STAT = \si{stat-variable}] \si{rbracket}} \bnfx{624a}{team-identifier}{TEAM_ID = \si{scalar-int-expr}} \\ \bnfo{TEAM = \si{team-variable}} C627a (R624) \si{stat-variable} shall not be a coindexed object." {The edit was missing from 151r1, but needed to be there. Modified to match the text in Clause 5.} Ed:[35:34] Change "C508" to "C509". {Constraint numbers changed from N2040.} 124:[35:33] Replace " or a TEAM_ID specifier if either" with "a if it". 147:[36:21] Change "zero; if" to "zero; otherwise, if". 147:[36:23-25] Delete "; otherwise, if a stalled ... ISO_FORTRAN_ENV". 147:[36:32] Delete ", STAT_STALLED_IMAGE,". 147:[36:36] Delete "or stalled". Ed:[37:2] Change "C507" to "C508". {Constraint numbers changed from N2040.} 135r3:[37:3] Before 'In para 3' add 'In para 1, at the end of R811, add "[]". In para 2, line 1, at the end of the sentence, add "or the executing image fails". After para 2 add para 5 of 5.8 STAT_FAILED_IMAGE of this Technical Specification.". 125r2:[37:14] Before "FORM TEAM", insert "\uwave{EVENT POST, EVENT WAIT,}". Ed:[37:17] After first "EVENT_TYPE" add "(13.8.2.8a)". {Need a reference here to ensure it is the type defined in ISO_FORTRAN_ENV and not one defined by the user with the same name.} 125r2:[37:18+] Add a new edit "{In 8.5.2 Segments, edit the first sentence of NOTE 8.34 as follows} The model upon which the interpretation of a program is based is that there is a permanent memory location for each coarray and that all images \uwave{on which it is established} can access it." 135r3:[38:9+] Add '{in 8.5.6 LOCK and UNLOCK statements: in para 1, change "image and" to "image, that image has not failed, and the lock variable"; in para 4, add new second sentence "If an image fails after locking and before unlocking a lock variable, the variable becomes unlocked."}' {Made initial word of edit "In" rather than "in".} 125r2:[38:13] Replace "on all images" by "on the involved images". 147:[38:13] Change "zero; if" to "zero; otherwise, if". 147:[38:15-17] Delete "; otherwise, if a stalled ... ISO_FORTRAN_ENV". 147:[38:24] Delete ", STAT_STALLED_IMAGE,". 125r2:[38:25] Replace "a END TEAM" by "an END TEAM". 125r2:[38:25] Replace "SYNC ALL, or SYNC MEMORY" by "or SYNC ALL". 123:[38:32] Replace "all the" with "all". 147:[38:32] Delete "or stalled". 147:[38:33] Delete "or stalled". Ed:[38:34] Delete "EVENT POST, EVENT WAIT,". {Edit 125r2:[37:14] put these statements into the class that does not imply SYNC MEMORY. The corresponding edit is needed here, but was missing from 125r2.} 147:[38:40] Delete "or stalled". Ed:[39:14-15] Change "these changes: Paragraph 2 of 8.3. Delete ``of ISO/IEC 1539-1:2010'' Paragraph 5 of 8.3. Add ``(13.8.2)'' after the first ``ISO_FORTRAN_ENV''" to "these changes: In paragraph 2 of 8.3, delete ``of ISO/IEC 1539-1:2010''; In paragraph 5 of 8.3, add ``(13.8.2)'' after the first ``ISO_FORTRAN_ENV''" {Improve readability of the edits.} 147:[40:0+5] Delete line "STALLED_IMAGES ...". 146:[40:10] Replace "an integer" by "a noncoindexed integer". 146:[40:15] Replace "an integer" by "a noncoindexed integer". 146:[41:21] Replace "a default" by "a noncoindexed default". 146:[41:22] Replace "a default" by "a noncoindexed default". Ed:[42:39] Delete extra space before "}". {Typo fix.} 147:[43:1-2] Delete two lines "{In 13.8.2 ... Specification.}". 147:[43:18] Delete "STAT_STALLED_IMAGE,". Ed:[44:9] Delete line "...stop code of the FAIL IMAGE...". {The stop code for FAIL IMAGE was removed by edit 129r2:[13:13]. The paper omitted the corresponding edit needed here.} 151r1:[44:13+] At the end of line 13, replace "." by ";" and add a new entry: "the value of an expression that includes a reference to a coindexed object on a failed image." {Added "(2.3.6)" at end of sentence - missing reference.} [43:29+] Add "{In 16.6.5 Events that cause variables to become defined, add the following list item} (33) Failure of the image that locked a lock variable before it has unlocked the variable causes the variable to become unlocked. {In 16.6.6 Events that cause variables to become undefined, add the following list item} (27) When an image fails during the execution of a segment, a data object on a non-failed image becomes undefined if it might be defined or undefined by execution of a statement of the segment other than an invocation of an atomic subroutine." 123:[44:15], [44:17] Replace "subcauses" by "subclauses", twice. Ed:[44:18] At the end of the edit insert 'deleting "in ISO/IEC 1539-1:2010" in A.4.2.1'. {The reference to the standard is not appropriate after the text is moved there. A.4.2.1 is the subclause number for "Relaxed memory model" after the changes in Part II are applied.} Replace "A.1.4, A.2.1, A.2.2, and A.2.3" by "A.2.1, A.3.1, A.3.2, and A.3.3". {Inserting Clause 6 Edits for Annex A Extended Notes -------------------------------- 123:[49:17] Replace "all the" with "all". 123:[49:36] Replace "all the" with "the". 123:[50:48] Replace "all the" with "the". 123:[52:21] Replace "all the" with "all". 130r1:[53:17] Replace line by " j_max = j call co_max(j_max)" Part II Changes: ================ With failed image recovery no longer tied to the END TEAM statement, the discussion of failed images was out of place in the clause on teams. The text that had been a the end of Clause 5 Teams of images, starting with the FAIL IMAGES statement, was moved to a new Clause 6 Failed images. This involved the following changes: 1) Create a new Clause 6 with subclauses: 6.1 Introduction Four paragraphs at the end of the old 5.8 STAT_FAILED_IMAGE Paragraph on the CRITICAL construct change 6.2 FAIL IMAGE statement The old 5.7 subclause, moved unchanged, apart from renumbering the Note. 6.3 CRITICAL construct Added text with the new syntax for the CRITICAL statement. Move the new paragraph on change to CRITICAL semantics to this subclause. 6.4 STAT_FAILED_IMAGE - first two paragraphs of the old 5.8. 2) Renumber Clauses 6, 7, and 8 to 7, 8, and 9. 3) Adjust Edit instructions in Clause 9 (was 8) to reference the correct locations of text that was moved or in a renumbered section. 4) In Annex A, move the "Example involving failed images" to a new subclause "Clause 6 notes" and adjust the subclause numbers in 8.12 Edits to Annex C on page 44 accordingly. This rearrangement is largely movement of text that resulted from the Meeting 206 paper edits to N2040. There are no technical changes involved.