J3/06-336 To: J3 Date: October 30, 2006 From: Aleksandar Donev Subject: Unresolved Issue 085: FORM_TEAM/TEAM_IMAGES polishing References: J3/06-007r1 Dependencies: Handling of image termination in STAT and ERRMSG in SYNC statements. UTI 85 (page 429) asks about the importance of the ordering in the list of images for FORM_TEAM and TEAM_IMAGES. Note that for SYNC IMAGES the list of images does not have to match and the order can be different. The editor proposes that the order should not matter for FORM_TEAM either, and that TEAM_IMAGES return an ordered list of images. We propose a straw vote be taken with the options: 1. All images need to specify the same ordering of the images in FORM_TEAM, and TEAM_IMAGES returns the list in a processor-dependent order. An argument for is that the extra sorting step imposes a performance cost that is not necessary. Allowing different IMAGES arguments to be specified on different images seems marginal and is more in the spirit of SYNC IMAGES than SYNC TEAM. 2. The order of the images in FORM_TEAM does not matter, and TEAM_IMAGES returns them in monotonic increasing order. An argument for is that this makes it easier for the user to test for team membership in the result of TEAM_IMAGES, and also makes it easier to form teams. The execution penalty is small especially given that calls to FORM_TEAM and TEAM_IMAGES are not frequent. We provide draft edits for both options below. While considering these issues we found several problems with the FORM_TEAM description. In particular, the requirement that the image calling FORM_TEAM be a member of the team is missing. Furthermore, at meeting 177 it was pointed out that FORM_TEAM should handle errors, especially in light of our changes to program termination (some members of the team may have executed STOP). For this purpose, an error flag argument should be added. Edits are provided below, with the exact handling of STAT and ERRMSG arguments left to match whatever is done for the SYNC statements. Edits. Independent of straw vote: ------------------ [379:39] Add two new arguments STAT and ERRMSG [380:5-] Replace the last sentence of the IMAGES description "It shall not have zero size" with: "One of the elements shall have the value THIS_IMAGE()." [380:5+] Add the descriptions of the new arguments: STAT (optional) shall be of type default integer and shall be a scalar. It is an INTENT(OUT) argument. It is assigned the value -1 if any of the images of the team has initiated image termination, or a processor-dependent positive value if an error condition occurs. Otherwise it is assigned the value 0. ERRMSG (optional) shall be of type default character and shall be a scalar. It is an INTENT(INOUT) argument. If an error condition occurs, it is assigned a processor-dependent explanatory message. Otherwise, it is unchanged. Add a new sentence: If an error condition occurs and STAT is not present, error termination occurs. ------------------ Edits for option 1 of the straw vote: [380:4+] In the second line of the description of IMAGES argument, replace "shall have the same value on all images of the team" with: "shall specify the same set of images on all images of the team." [380:9] Add a final sentence to the paragraph: "The members of the team may be specified in a different order on different images." [429:27] Add a second sentence to the description of the Result Value: Change "values are the image indices of the images" to "values are the indices, in increasing order, of the images". Edits for option 1 of the straw vote: [429:27] Add a second sentence to the description of the Result Value: "The order of the image indices is processor-dependent."