To: J3 J3/23-216 From: Brad Richardson Subject: F2023 interp: CHANGE TEAM to INITIAL_TEAM Date: 2023-September-26 NUMBER: F18/ ! /interp assigns number after submission TITLE: CHANGE TEAM to INITIAL_TEAM KEYWORDS: CHANGE TEAM, INITIAL_TEAM, TEAM_TYPE DEFECT TYPE: ! /interp assigns STATUS: J3 consideration in progress QUESTION: Is it valid to execute a CHANGE TEAM statement with a team-value specifying the initial team? Consider the following example program. USE ISO_FORTRAN_ENV TYPE(TEAM_TYPE) :: t t = GET_TEAM(INITIAL_TEAM) CHANGE TEAM (t) ! ... END TEAM END In Section 11.1.5.2 it states: > The team-values on the active images that execute the CHANGE TEAM > statement shall be those of team variables defined by corresponding > executions of the same FORM TEAM statement (11.7.9). When the > CHANGE TEAM statement is executed, the current team shall be the > team that was current when those team variables were defined. The second sentence leaves it somewhat ambiguous as to whether the above program is valid. What variable corresponds to the value that is returned by GET_TEAM(INITIAL_TEAM) and when/how was it defined? ANSWER 1: No. It was not intended to be able to CHANGE TEAM to the initial TEAM. Specifically, the value returned by GET_TEAM(INITIAL_TEAM) was not defined by execution of a FORM TEAM statement, and thus is not a valid team-value for a CHANGE TEAM statement. It would be beneficial to make this clear though. EDITS to 23-007r1 for ANSWER 1: [192:31] after "corresponding executions of the same FORM TEAM statement (11.7.9)", insert "and it shall not have the value returned by the intrinsic function GET_TEAM with argument INITIAL_TEAM" ANSWER 2: The value returned by GET_TEAM(INITIAL_TEAM) is considered to have been defined by the initial team, and is a valid team-value for a CHANGE TEAM statement when the current team is the initial team. EDITS to 23-007r1 for ANSWER 2: [192:32] After "when those team variables were defined" insert ", or the current team shall be the initial team and the team-value shall have the value returned by the intrinsic function GET_TEAM with argument INITIAL_TEAM" ANSWER 3: The value returned by GET_TEAM(INITIAL_TEAM) is considered to have been defined by the current team, and is a valid team-value for any CHANGE TEAM statement. EDITS to 23-007r1 for ANSWER 3: [192:32] After "when those team variables were defined" insert ", or the team-value shall have the value returned by the intrinsic function GET_TEAM with argument INITIAL_TEAM" SUBMITTED BY: Brad Richardson HISTORY: yy-nnn mxxx F18/nnnn submitted ----------------------------------------------------------------------