ISO/IEC JTC1/SC22/WG5 N2075 Editor's report for WG5/N2074 Bill Long, 13 August 2015 Document WG5/N2074 was prepared by applying edits to WG5/N2056 based on these papers passed at PL22.3 meeting 207: J3/15-191, J3/15-181r3, J3/15-196, J3/15-198, J3/15-201, J3/15-205, and J3/15-212r1. 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/N2056. Edits to WG5/N2056: =================== Edits for Clause 1 Scope ------------------------ 212r1:[1:6-8] In 1 Scope, in para2, make these 3 edits: In the first sentence replace "or progress models" by "model". Delete the second sentence "Some level ... clauses 7 and 8." In the last sentence replace "and progress models" by "model". Edits for Clause 2 Normative References --------------------------------------- (none) Edits for Clause 3 Terms and definitions ---------------------------------------- (none) Edits for Clause 4 Compatibility -------------------------------- (none) Edits for Clause 5 Teams of images ---------------------------------- 191:[9:5] In 5.1 Team concepts, para 1, sentence 2, replace "both sibling and ancestor" by "sibling or ancestor". 191:[9:27] In 5.2 TEAM_TYPE, para 1 sentence 3, replace "default initialized" by "default-initialized". 196:[10:17-18] In 5.3 CHANGE TEAM, move the two sentences of para 3, following the constraints, "A coselector name ... statement begins execution." to be the first two sentences of the para 5 that currently begins "A in a ..." 191:[10:19-20] In 5.3 CHANGE TEAM construct, para 2 after constraint list, delete the first sentence "The value of ... initial team." {Redundant with the sentence that follows.} 191:[11:13,17] In 5.4 Image selectors, after the constraint, para 1, last sentence, and para 2, sentence 2, replace "an image index" by "the image index". {Use same article as in the first sentence of subclause 6.6 of ISO/IEC 1539-1:2010.} Edits for Clause 6 Failed images -------------------------------- Ed:[15:9] In 6.1 Introduction to Failed Images, para 3, replace "non-failed" by "nonfailed". {Remove hyphen after "non".} 191:[16:20] In 6.4 STAT_FAILED_IMAGE, para 1, sentence 2, replace "image image" by "image". Edits for Clause 7 Events ------------------------- 198:[17:4+] Add a new paragraph after 7.1p1 (Events/Introduction): "Segments ordered by EVENT POST and EVENT WAIT are included in the partial order specified in subclause 2.3.5 of ISO/IEC 1539-1:2010." 191:[17:6-7] In 7.2 EVENT_TYPE, para 1, sentence 3, replace "Each component is fully default initialized." by "Each nonallocatable component is fully default-initialized.". 191:[17:8] In 7.2 EVENT_TYPE, para 2, sentence 1, replace "An event variable has a count that" by "The value of an event variable includes its event count, which". 198:[17:26+] Add a new Note at the end of 7.2 EVENT_TYPE: "NOTE: The updates of atomic variables are coherent but not necessarily consistent, so a processor might have to use extra synchronization to obtain the consistency required for the segments ordered by EVENT POST and EVENT WAIT statements." 191:[18:1] In 7.3 EVENT POST statement, in para 2 after the constraint, replace "the count does not change" by "the value of the count of the event variable is processor dependent. {Ed: Omitted the redundant "." at the end of the replacement text in 191.} 191:[18:2-4] In 7.3 EVENT POST statement, delete the final paragraph. {Effectively only says that actions that occur in unordered segments are unordered.} 196:[18:4+] In 7.3 EVENT POST, replace Note 7.2 by "The completion of an EVENT POST statement does not depend on the execution of a corresponding EVENT WAIT statement". {Ed: Added the missing "." at the end of the replacement sentence.} 191:[18:20+] In 7.4 EVENT WAIT statement, following the 3-item list. insert a new paragraph: "If an error occurs during execution of an EVENT WAIT statement, the value of the count of its event variable is processor dependent." 196:[18:21-24] In 7.4 EVENT WAIT, replace the para following the itemized list, beginning "If an EVENT WAIT..." by "An EVENT POST statement execution is initially unsatisfied. Successful execution of an EVENT WAIT statement with a threshold of satisfies the first unsatisfied EVENT POST statement executions for that event variable. This EVENT WAIT statement execution causes the segment following the EVENT WAIT statement execution to succeed the segments preceding those EVENT POST statement executions." 196:[18:25] In 7.4 EVENT WAIT, delete the final sentence, "A failed image...statement.", before the first Note. 196:[18:25++] In 7.4 EVENT WAIT, delete the second note, Note 7.4. Edits for Clause 8 Intrinsic procedures --------------------------------------- 212r1:[19:22+] In 8.2 Atomic subroutines, after para 1, add paragraph: "Atomic operations shall make asynchronous progress (3.2). If the atomic variable X[A] is defined by an atomic subroutine on image B, image C repeatedly references X[A] by an atomic subroutine in an unordered segment, and no other image defines X[A], image C will eventually receive the value defined by image B, even if none of the images A, B, or C execute an image control statement until after X[A] is defined by image B and that value is received by image C." 201:[20:27++] In 8.3 Collective subroutines, add following new paragraph at the end of NOTE 8.4: "If the actual argument is a coarray, the implementation might be able to optimize the execution of the collective, for example by avoiding copying of data." 181r3:[26:30-32] In 8.4.13 CO_REDUCE, replace the Example text "If the number of images ... on both images" by "The subroutine below demonstrates how to use CO_REDUCE to create a collective counterpart to the intrinsic function ALL: SUBROUTINE co_all(boolean) LOGICAL, INTENT(INOUT) :: boolean CALL CO_REDUCE(boolean,both) CONTAINS PURE FUNCTION both(lhs,rhs) RESULT(lhs_and_rhs) LOGICAL, INTENT(IN) :: lhs,rhs LOGICAL :: lhs_and_rhs lhs_and_rhs = lhs .AND. rhs END FUNCTION both END SUBROUTINE co_all " 205:[26:38-43] In 8.4.14 CO_SUM, in the description of the argument A, replace the last two sentences "If it is a scalar ... all corresponding elements in the current team." by "If it is a scalar, the computed value is equal to a processor-dependent approximation to the sum of the values of A on all images in the current team. If it is an array, it shall have the same shape on all images in the current team and each element of the computed value is equal to a processor-dependent approximation to the sum of all corresponding elements of A on the images in the current team. If RESULT_IMAGE is present, the computed value may depend on the image that the RESULT_IMAGE specifies; otherwise, the computed value is the same on all images in the current team." {Ed: Deleted the "the" before the last "RESULT_IMAGE".} 196:[27:15] In 8.4.15 EVENT_QUERY, in the description of the EVENT argument, after "ISO_FORTRAN_ENV." insert a new sentence "It shall not be coindexed." {Disallowing a coindexed event argument in EVENT_QUERY makes it consistent with EVENT WAIT.} 191:[27:17] In 8.4.15 EVENT_QUERY, in the description of COUNT, change "that that" to "than that". 191:[27:18] In 8.4.15 EVENT_QUERY, in the description of COUNT, change "conditions" to "condition". 191:[27:19] In 8.4.15 EVENT_QUERY, at the end of the description of COUNT change "assigned the value 0" to "assigned the value -1". {Make the value returned in the case of an error different from any value that is possible when there is no error.} 196:[27:22] In 8.4.15 EVENT_QUERY, in the first sentence of the Example, after "posts or waits", add "in preceding segments , and for which there are no posts or waits in an unordered segment". 196:[27:25] In 8.4.15 EVENT_QUERY, in the second block of text of the Example, replace "EVENT[2]" by "EVENT". 196:[27:26] In 8.4.15 EVENT_QUERY, in the second block of text of the Example, after "specification" add "in preceding segments, and for which there are no posts or waits in an unordered segment". 196:[27:27] In 8.4.15 EVENT_QUERY, in the second CALL statement of the Example, replace "EVENT[2]" by "EVENT". 191:[30:39+] In 8.5.2 IMAGE_INDEX, add as para 4 "The result is the image index in the specified team". {Ed: Added a final "." that is missing in the edit.} 191:[31:3] In 8.5.3 MOVE_ALLOC, para 1, replace "is modified to" by "is extended to". 191:[31:4] In 8.5.3 MOVE_ALLOC, para 1, replace "and a modified result" by "and modified semantics of execution". 191:[31:39+] In 8.5.4 NUM_IMAGES, add as para 4 "The result is the number of images in the specified team.". Edits for Clause 9 Required editorial changes to ISO/IEC 1539-1:2010(E) ----------------------------------------------------------------------- Ed:[42:11] In 9.9 Edits to clause 13, in the second edit for 13.7.165 THIS_IMAGE, in the last sentence of the description of the TEAM argument, replace "it shall be established for TEAM" by "it shall be established in the team specified by the value of TEAM". {Use the same wording as in the following edit, also for THIS_IMAGE.} Ed:[44:16] In 9.11 Edits to annex A, delete the bullet "how sequences of event posts in unordered segments interleave with each other (8.5.2a)". {The corresponding normative text in the TS was deleted. This concept is now covered by the processor dependence for atomics, since the count change caused by an event post is atomic.} Ed:[44:19-20] In 9.11 Edits to annex A, in the last bullet item, replace "intrinsic procedure when there is an error condition" by "intrinsic subroutine when an error condition occurs". {Make wording parallel to the similar entry in J3/15-007r2 that covers only atomics. It is intended that this entry replace the one in J3/15-007r2. The difference is the addition of collective subroutines.} 191:[44:20+] In 9.11 Edits to annex A, add a new dependency: "the value of the count of the event variable in an EVENT WAIT or EVENT POST statement if an error condition occurs (8.5.2a, 8.5.2b);" {Ed: Subclause numbers added at the end of the edit.} Ed:[44:20++] In 9.11 Edits to annex A, add a new dependency: "the value returned by the intrinsic function IMAGE_STATUS if it is other than zero (13.7.79a);" {The normative text in 8.4.18 IMAGE_STATUS says the return value can be processor dependent. But the corresponding entry in this subclause was omitted.} Ed:[44:20+++] In 9.11 Edits to annex A, add a new dependency: "the value assigned to a STAT argument in a reference to the intrinsic subroutine MOVE_ALLOC when an error condition occurs (13.7.118)." {The modified MOVE_ALLOC subroutine (8.5.3) now has a STAT argument and its possible values are processor dependent. This edit was overlooked when that change was made.} Edits for Annex A Extended notes -------------------------------- 196:[51:13-14] In A.3.2 EVENT_QUERY example, replace the statements CALL EVENT_QUERY(submit[i],count,STAT=status) ! Test image i IF (status==STAT_FAILED_IMAGE) CYCLE by IF (IMAGE_STATUS(i) == STAT_FAILED_IMAGE) CYCLE 196:[51:24-25] In A.3.2 EVENT_QUERY example, replace the statements CALL EVENT_QUERY(submit[i],count,STAT=status) ! Test image i IF (status==STAT_FAILED_IMAGE) THEN ! Image i has failed by IF (IMAGE_STATUS(i) == STAT_FAILED_IMAGE) THEN 196:[51:47-52] In A.3.2 EVENT_QUERY example, replace the lines CALL EVENT_QUERY(submit[i],count,STAT=status) ! Test image i IF (status/=STAT_FAILED_IMAGE) & work_item[i] = create_work_item(kk) EVENT POST (submit[i],STAT=status) ! If image i has failed, this will not hang and the failure ! will be handled on the next iteration of the loop by work_item[i] = create_work_item(kk) EVENT POST (submit[i],STAT=status) ! If image i has failed, the failure will be handled on ! the next iteration of the master loop.