To: J3 13-264r2 From: Bill Long, John Reid Subject: FORM SUBTEAM, SYNC TEAM Date: 28 June 2013 References: N1967, N1968, N1971 Discussion ---------- In his ballot comments (N1971), Reinhold Bader has drawn attention to deficiencies in the FORM SUBTEAM statement: 1. It is not made clear that the intention is that all the images of the current team must participate in corresponding FORM SUBTEAM statements. 2. It is not made clear that the intention is that corresponding FORM SUBTEAMS statements must participate with corresponding team variables. For example, it was not intended that a team be formed by some images of the current team executing FORM SUBTEAM(I,TEAM(1)) and the rest executing FORM SUBTEAM(I,TEAM(2)) 3. It is desirable for a team to be defined by data that is spread over the set of its team variables on all its images. Data that aids efficient execution as a team can be established during the execution of FORM SUBTEAM. 4. It is not clear how SYNC TEAM can work unless it is restricted to teams that are unchanged since they last participated in a CHANGE TEAM construct, because each team is defined by the values of the subteam-ids on the images of its parent team and identifying it is a collective calculation involving the parent team. Reinhold suggests that the FORM SUBTEAM statement be replaced by a collective subroutine. This idea has been discussed by the subgroup and rejected. The main reasons were that an intrinsic subroutine can be overridden by the user, leading to confusing code; and there is symmetry with having FORM SUBTEAM and CHANGE TEAM both statements. The edits suggested here are intended to remedy the problems directly. Additionally, variables of type TEAM_TYPE should have restrictions similar to those of type LOCK_TYPE. Edits for subclause 5.2 are supplied for this. Edits are also supplied to specify that the team-variable in SYNC TEAM is restricted to be that formed by the current team or an ancestor thereof. Edits to N1967: --------------- [9:21+] Add two constraints to 5.2 TEAM_TYPE: "C50x A team variable shall not appear in a variable definition context except as the in a FORM SUBTEAM statement, as an without a SOURCE=, or as an actual argument in a reference to a procedure with an explicit interface where the corresponding dummy argument has INTENT (INOUT). C50y A variable with a subobject of type TEAM_TYPE shall not have the POINTER attribute and shall not appear in a variable definition context except as an without a SOURCE=, or as an actual argument in a reference to a procedure with an explicit interface where the corresponding dummy argument has INTENT (INOUT)." [10:22+] Add paragraph: "If the FORM SUBTEAM statement is executed on one one image, it shall be executed by the same statement on all images of the current team, in execution segments that are not ordered with respect to each other. From the beginning of execution of the current team, the sequence of executions of FORM SUBTEAM statements shall be the same on all images of the current team." [10:26-27] Replace the first sentence after R507 with: "The value of shall have been established by an execution of FORM SUBTEAM by the current team or an ancestor of the current team. Execution of a SYNC TEAM statement performs a synchronization of the team specified by ."