Skip to content

SYNC TEAM doesn't support child team-value #655

Closed
@nathanweeks

Description

@nathanweeks
  • I am reporting a bug others will be able to reproduce and not asking a question or requesting a new feature.

    • OpenCoarrays Version: 2.6.1 (6aff6d3)
    • Fortran Compiler: gfortran 8.3.0
    • C compiler used for building lib: gcc 8.3.0
    • Installation method: cmake
    • All flags & options passed to the installer: -DCMAKE_BUILD_TYPE=Debug
    • MPI library being used: MPICH 3.3
    • Version of CMake: 3.13.4

To help us debug your issue please explain:

SYNC TEAM (team-value) emits an error and terminates the program when the team-value is a child team.

What you were trying to do (and why)

SYNC TEAM(child-team-value) is useful for the images in a parent team to efficiently synchronize on the images in the child team, without paying the extra synchronization penalty of using CHANGE TEAM / END TEAM.

What happened (include command output, screenshots, logs, etc.)

$ cat sync-team-child.f90 
program sync_team_child
   use, intrinsic :: iso_fortran_env, only: team_type
   implicit none

   type(team_type) :: child_team

   form team (mod(this_image(), 2)+1, child_team)

   sync team (child_team)
end program sync_team_child
$ caf  sync-team-child.f90
$ cafrun -np 4 ./a.out
Fortran runtime error on image 1: SYNC TEAM called on team different from current, or ancestor, or descendant
Fortran runtime error on image 2: SYNC TEAM called on team different from current, or ancestor, or descendant
Fortran runtime error on image 3: SYNC TEAM called on team different from current, or ancestor, or descendant
Fortran runtime error on image 4: SYNC TEAM called on team different from current, or ancestor, or descendant

What you expected to happen

Per the Fortran 2018 (N2146 draft) standard:

SYNC TEAM ( team-value [, sync-stat-list ] )
The team-value shall identify an ancestor team, the current team, or a team whose parent is the current team.

Note that the error message emitted above is slightly misleading; the team-value cannot be any descendent team, but only a child team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp-wantedteamsIssues related to the use of Coarray teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions