To: J3 J3/25-127 From: R. Bader & D. Bonachea & HPC Subject: Edits for DIN1: Collectives over a specified team Date: 2025-February-20 References: 22-163: F202Y feature request - extend collective semantics 25-125: F202Y feature request: collectives over a specified team 25-007: Fortran 202Y Working Draft Introduction ~~~~~~~~~~~~ This paper is a republication of 22-163, with the suggested edits in the final section adjusted to apply against the current 25-007 Fortran 202Y Working Draft (as requested in J3 afternoon plenary session on 2025-Feb-19). Aside from the addition of page and line numbers in the suggested edits and this introduction section, the content of this paper remains entirely unchanged from 22-163. See also paper 25-125 for some expanded background and motivation. Formal Requirement ~~~~~~~~~~~~~~~~~~ The collective subroutines from Fortran 2018 should support execution in a team that is not the current team. Rationale ~~~~~~~~~ If e.g. a reduction operation across the initial team's images is needed within the context of a CHANGE TEAM construct, this is rather cumbersome to do with the Fortran 2018/2023 semantics. Either it is necessary to exit the CHANGE TEAM construct (this permits a single CO_REDUCE invocation but can impose significant overhead on handling of team- specific data), or the reduction must be manually performed in two phases: first, a team-specific call to CO_REDUCE, followed by a manual assembly across teams (this leads to code that is hard to understand and maintain). Also, the ability to perform a reduction on a subset of images corresponding to a defined team variable without needing to execute a CHANGE TEAM statement is considered useful. Specification ~~~~~~~~~~~~~ Add an optional TEAM argument of type TEAM_TYPE to all collective subroutines and say that execution of the subroutine applies for the specified team. Suggested edits (against 25-007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 16.6 Collective subroutines: [379:26] para 1: replace "the current team" by "of its specified team" [379:28] para 1: replace "its current team" by "its specified team" [379:30+] after para 1: Insert new paragraph reading: "The team specified for an invocation of a collective subroutine is the current team if the TEAM argument is not present in that invocation. Otherwise, it is the team identified by the value of the TEAM argument; on all images that execute the collective subroutine, these values shall either be those of the initial team, or those of team variables defined by corresponding executions of the same FORM TEAM statement (11.7.9)." [380:8,13,19,21] para 3, para 4 bullet 4, para 6 (twice): replace "the current team" by "the specified team". 16.9.54 CO_BROADCAST: [407:29] in the heading: replace "[, STAT, ERRMSG]" by "[, STAT, ERRMSG, TEAM]" [407:35-36] in the description of A: replace "the current team" by "the specified team" [408:4] in the description of SOURCE_IMAGE: replace "the current team" by "the specified team" [408:8+] after the description of ERRMSG in para 3: add "TEAM (optional) shall be a scalar of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV. It is an INTENT(IN) argument." [408:9] in para 4: replace "and ERRMSG" by ", ERRMSG and TEAM" 16.9.55 CO_MAX: [408:13] in the heading: replace "[, STAT, ERRMSG]" by "[, STAT, ERRMSG, TEAM]" [408:27] in the description of RESULT_IMAGE: replace "the current team" by "the specified team" [408:30+] after the description of ERRMSG in para 3: add "TEAM (optional) shall be a scalar of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV. It is an INTENT(IN) argument." [408:31] in para 4: replace "and ERRMSG" by ", ERRMSG and TEAM" 16.9.56 CO_MIN: [408:35] in the heading: replace "[, STAT, ERRMSG]" by "[, STAT, ERRMSG, TEAM]" [409:11] in the description of RESULT_IMAGE: replace "the current team" by "the specified team" [409:14+] after the description of ERRMSG in para 3: add "TEAM (optional) shall be a scalar of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV. It is an INTENT(IN) argument." [409:15] in para 4: replace "and ERRMSG" by ", ERRMSG and TEAM" 16.9.57 CO_REDUCE: [409:19] in the heading: replace "[, STAT, ERRMSG]" by "[, STAT, ERRMSG, TEAM]" [410:3] in the description of RESULT_IMAGE: replace "the current team" by "the specified team" [410:6+] after the description of ERRMSG in para 3: add "TEAM (optional) shall be a scalar of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV. It is an INTENT(IN) argument." [410:7] in para 4: replace "and ERRMSG" by ", ERRMSG and TEAM" 16.9.58 CO_SUM: [410:20] in the heading: replace "[, STAT, ERRMSG]" by "[, STAT, ERRMSG, TEAM]" [410:35] in the description of RESULT_IMAGE: replace "the current team" by "the specified team" [410:38+] after the description of ERRMSG in para 3: add "TEAM (optional) shall be a scalar of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV. It is an INTENT(IN) argument." [410:39] in para 4: replace "and ERRMSG" by ", ERRMSG and TEAM" ===END===