-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Defect: get_team() does not compile properly #545
Comments
@dobrecht Sorry, am I understanding you correctly that you are compiling with GCC/GFortran trunk? Or at least the latest commit on the 8.x branch? Or are you using the 8.1.0 official release? |
CC: @scrasmussen |
From my own testing: the get_team intrinsic function does not seem to be implemented yet and using it gives error messages at multiple levels (I did use gfortran 9.0.0 20180506 (experimental); on my system, the error messages are in german): sync team (get_team()) generates the same compile time error as yours above. sync team (get_team(1)) generates compile time error: sync team (get_team(initial_team)) generates compile time error: The full test case: program Main
! please compile and run with 15 coarray images
!
use,intrinsic :: ISO_FORTRAN_ENV
implicit none
!
integer :: intTeamNumber
type (team_type) :: MainTeam
type (team_type) :: SubTeam
!
!
!************************************************
! MainTeam **************************************
!************************************************
!
! split the 15 images of the initial team into 3 child teams consisting of 5 images each:
if (this_image() <= 5) then
intTeamNumber = 1
else if (this_image() >= 6 .and. this_image() <= 10) then
intTeamNumber = 2
else if (this_image() >= 11) then
intTeamNumber = 3
end if
!
form team (intTeamNumber, MainTeam) ! this creates the 3 child teams in MainTeam
!
change team (MainTeam)
!
! important: the following gets executed on the images of all the 3 newly created child teams:
!
!************************************************
! SubTeam ***************************************
!************************************************
!
! split the 5 images of the MainTeam's child teams into two distinct teams resp.:
if (this_image() < 3) then
intTeamNumber = 1
else
intTeamNumber = 2
end if
!
form team (intTeamNumber, SubTeam) ! this generates 6 teams (2 new sub teams in the 3 main teams resp.)
! within the change team (MainTeam) construct
change team (SubTeam)
!
sync team (get_team()) ! generates compile time error
!sync team (get_team(1)) ! generates compile time error
!sync team (get_team(initial_team)) ! generates compile time error
!
SubTeam_select: select case (team_number())
!
case (1) SubTeam_select
! codes for child team 1 of SubTeam:
write(*,*) 'image number: ', this_image(), ' of team number: ', team_number(), &
' in SubTeam, of MainTeam''s child team number:' !, team_number(MainTeam)
!Fortran runtime error on image 1: team_number does not yet support the optional team argument
!
!*******************
case (2) SubTeam_select
! codes for child team 2 of SubTeam:
write(*,*) 'image number: ', this_image(), ' of team number: ', team_number(), &
' in SubTeam, of MainTeam''s child team number:' !, team_number(MainTeam)
!Fortran runtime error on image 1: team_number does not yet support the optional team argument
!
end select SubTeam_select
!
end team !(SubTeam)
!
!*************
!*************
!*************
!
end team !(MainTeam)
!
end program Main Best Regards |
@zbeekman I am using the updated branch of 8.1.X (gcc 8.1.1 20180528) ; the 2018-05-28 build |
@scrasmussen is Fortran 8.2 and OpenCoarrays 2.2.0 supposed to support
|
In case it helps: cheers |
@zbeekman Fortran 8.2 is supposed to support Thanks @MichaelSiehl for your work and comments on this, they are helpful |
Any updates @scrasmussen ? |
After doing some code spelunking, it seems clear that |
Just FYI, the missing intrinsic function get_team() can easily be circumvented by the programmer for the team variable of the parent and the current team (just by maintaining the values of these team variables locally). Only the team value of the initial team is not accessible to the programmer without the get_team() function. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I did just newly check using OpenCoarrays 2.6.1 and the most recent gfortran 9.0.1 (experimental). My above test case does still generate the same compile time errors. Therefore, I would recommend to leave this issue open yet. These error messages remain:
|
Yes, I agree... I needed to fix something in the configuration of the stalebot. This issue should stay open until it is resolved. |
This has also been reported in the gfortran front end: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88154 |
This bug happens with |
I read through this thread and understand that implementation of Posting here for the next person who lands here: It be extremely helpful to maintain a doc that lists the status of features (not implemented/in progress/implemented) so that people know what they can expect. Is there any such doc? |
I'm not part of the OpenCoarrays team but, regarding coarray teams, did maintain such a list myself. The good news: this open issue here was the last unresolved issue on my (old) list. Among the already solved (more important) issues on my list are: But I did not too many new coding with coarray teams in the last few month, since my recent main focus is on object-oriented parallel programming through coarray components using OpenCoarrays/gfortran. cheers |
I think this would be more straightforward to implement if OpenCoarrays (at least when compiled with MPI support) used the underlying MPI communicator to directly represent the team object. I had a branch of an older version of OpenCoarrays that implemented this (as well as the optional TEAM argument to TEAM_NUMBER()): nathanweeks@31e39f2 If there's interest, I could update this branch for OpenCoarrays 2.8.0 and submit a PR for more formal review. |
Defect/Bug Report
uname -a
: Linux dune 4.16.12-1-ARCH tests dis_transpose: test passed #1 SMP PREEMPT Fri May 25 23:30:31 UTC 2018 x86_64 GNU/Linux (running under VirtualBox on an iMac)Observed Behavior
I get a compile error when trying to use the get_team() intrinsic:
Compiling the above, I get:
So, it appears that get_team() returns an integer.
FURTHER...
I then changed the return type to an integer:
I then get a internal compiler error:
Expected Behavior
get_team() should compile and link. get_team should return a TEAM_TYPE variable.
NOTE: This could be a bug in both gfortran and opencoarrays.
Steps to Reproduce
In Observed Behavior.
The text was updated successfully, but these errors were encountered: