J3/15-138 To: J3 From: John Reid & Bill Long Subject: Clause 5.9 edits to N2040 Date: 2015 February 19 Discussion ---------- In the recent ballot (see N2045), Reinhold Bader pointed out the need to avoid a race condition for definitions/references to allocated coarrays on the stalled image (cf. [31:31-34], [36:11-15]). An edit addresses this. In the same ballot, Robert Corbett pointed out that if an image stalls while executing a CRITICAL construct, other images should be permitted to execute the construct. An edit addresses this. In the same ballot, Malcolm Cohen wrote '(a2) 5.9 states "Otherwise, the executing image resumes execution at the END TEAM statement of the construct" "the construct" lacks definition. There can be many CHANGE TEAM constructs, and more than one of them can be active.' An edit addresses this. Further, Malcolm Cohen wrote "(b) The TS has merely scratched the surface of the semantics that are being specified for stalled image handling; much more work needs to be done to clarify what is supposed to happen (e.g. which variables become undefined, etc.). Even for failed images some additional work appears to be needed..." Edits address this issue for stalled images. Edits to N2040: --------------- [14:29] Replace "construct" by "innermost executing CHANGE TEAM construct". [14:29-30] Replace "execution ... constuct" by "(1) execution of all finalizations and deallocations of existing objects that would have occurred during normal execution of the CHANGE TEAM construct by the stalled image, (2) closing any open file that was opened by the execution of the CHANGE TEAM construct by the stalled image after any pending asynchronous data transfer operations for the file complete, and (3) unlocking any locked lock variable that was locked by the execution of the CHANGE TEAM construct by the stalled image. Deallocation of a coarray is delayed until the corresponding coarrays on the active images of the current team are deallocated. If an image stalls during the execution of a CRITICAL construct, the execution of the construct is regarded by other images as complete. If an image stalls during the execution of a DO CONCURRENT construct, it is indeterminate which iterations of the construct complete. A saved variable of an active procedure that was invoked by the stalled image within the CHANGE TEAM construct becomes undefined. A variable becomes undefined if it might have been defined or become undefined by execution of the CHANGE TEAM construct by the stalled image."