J3/17-108r1 To: J3 From: John Reid & Bill Long & Malcolm Cohen Subject: MOVE_ALLOC wording clarification Date: 2017 February 14 1. Discussion The description of MOVE_ALLOC could be better worded. Also, MOVE_ALLOC is only pure if FROM is not a coarray; otherwise, it causes the side-effect of synchronisation with other images and is an image control statement. The discussion of STAT assumes that stopped/failed images raise error conditions without explicitly saying so. This is especially acute when STAT is absent, since in that case there is no text at all which indicates that any error has occurred. This needs to be fixed (by appending to p5, the initial para on co-MOVE_ALLOC). Para 6 should continue to be about the successful execution case. Para 7 should continue to be about the error condition case. Para 7 should clarify that the issues with stopped and failed images only apply if the arguments are coarrays. Para 7 sentence 3 does not need the "no stopped image" since that is covered by the previous sentence and this sentence begins "Otherwise...". 2. Edits to 17-007 [341:17] 16.1 Classes of intrinsic procedures, p5 After "The subroutine MOVE_ALLOC" insert "with noncoarray argument FROM," after "MVBITS" insert a comma, making the whole paragraph read "The subroutine MOVE_ALLOC with noncoarray argument FROM, and the elemental subroutine MVBITS, are pure. No other standard intrinsic subroutine is pure." {Repair classification.} [346:13] 16.7 Standard generic intrinsic procedures, p2, class PS, change "indicates that the procedure is a pure subroutine" to "indicates that the procedure is a pure subroutine when the FROM argument is not a coarray". {Ugly but correct; there is only one PS class intrinsic.} [411:5] 16.9.137 MOVE_ALLOC, p3 Class, "Pure subroutine" -> "Subroutine, pure if and only if FROM is not a coarray". {Correct classification.} [411:28] Same subclause, p5, append "When such a reference is executed, if any image of the current team has stopped or failed, an error condition occurs." {Specify that stopped/failed images do cause error conditions, as it is not clear from other text.} [411:30] Same subclause, p7, turn paragraph into a bullet list with introductory text as follows: After "If an error condition occurs" change "and" to ", \item if", Change ". Otherwise, if" before "the current team contains a stopped image", to "; \item otherwise, if FROM is a coarray and". [411:32] Change ". Otherwise, if" before "the current team contains a failed image" to "; \item otherwise, if FROM is a coarray and". [411:32] Delete ", no stopped image,". [411:34] Change ". Otherwise," before "STAT is assigned" to "; \item otherwise,". {Repair para and make it easier to read. \item introduces a bullet item here.} Making the whole paragraph read: "If an error condition occurs, - if STAT is absent, error termination is initiated; - otherwise, if FROM is a coarray and the current team contains a stopped image, STAT is assigned the value STAT_STOPPED_IMAGE from the intrinsic module ISO_FORTRAN_ENV; - otherwise, if FROM is a coarray and the current team contains a failed image, and no other error condition occurs, STAT is assigned the value STAT_FAILED_IMAGE from the intrinsic module ISO_FORTRAN_ENV; - otherwise, STAT is assigned a processor-dependent positive value that differs from that of STAT_STOPPED_IMAGE or STAT_FAILED_IMAGE." 3. Alternative to the edits that turn p7 into a bullet list [411:30] Same subclause, p7, Between "Otherwise, if" and "the current team contains a stopped image", insert "FROM is a coarray and". [411:32] Between "Otherwise, if" and "the current team contains a failed image" insert "FROM is a coarray and". [411:32] Delete ", no stopped image,". [411:34] Between "Otherwise," and "STAT is assigned" insert "if any other error condition occurs". Making the whole paragraph read "If an error condition occurs and STAT is absent, error termination is initiated. Otherwise, if FROM is a coarray and the current team contains a stopped image, STAT is assigned the value STAT_STOPPED_IMAGE from the intrinsic module ISO_FORTRAN_ENV. Otherwise, if FROM is a coarray and the current team contains a failed image, and no other error condition occurs, STAT is assigned the value STAT_FAILED_IMAGE from the intrinsic module ISO_FORTRAN_ENV. Otherwise, if any other error condition occurs, STAT is assigned a processor-dependent positive value that differs from that of STAT_STOPPED_IMAGE or STAT_FAILED_IMAGE." ===END===