Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
nathanweeks opened this issue Apr 26, 2019 · 0 comments · Fixed by #656
Closed
1 task done

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

nathanweeks opened this issue Apr 26, 2019 · 0 comments · Fixed by #656
Labels
bug help-wanted teams Issues related to the use of Coarray teams

Comments

@nathanweeks
Copy link
Contributor

  • 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.

@zbeekman zbeekman added bug help-wanted teams Issues related to the use of Coarray teams labels Apr 26, 2019
@ghost ghost added the needs-review label Apr 26, 2019
@ghost ghost removed the needs-review label Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help-wanted teams Issues related to the use of Coarray teams
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants