Skip to content

Commit e64aa38

Browse files
committed
Fix team_number test.
1 parent 168615a commit e64aa38

File tree

4 files changed

+5
-77
lines changed

4 files changed

+5
-77
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ if(opencoarrays_aware_compiler)
806806
add_caf_test(comp_allocated_2 2 comp_allocated_2)
807807
add_caf_test(alloc_comp_get_convert_nums 2 alloc_comp_get_convert_nums)
808808
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8)
809+
add_caf_test(team_number 8 team_number)
809810
add_caf_test(teams_subset 3 teams_subset)
810811
add_caf_test(get_communicator 3 get_communicator)
811812
add_caf_test(teams_coarray_get 5 teams_coarray_get)
@@ -818,11 +819,8 @@ if(opencoarrays_aware_compiler)
818819
set_tests_properties(alloc_comp_multidim_shape PROPERTIES TIMEOUT 300)
819820
endif()
820821
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 15)
821-
add_caf_test(team_number 8 team_number)
822822
add_caf_test(teams_this_image 8 teams_this_image)
823823
add_caf_test(teams_num_images 8 teams_num_images)
824-
else()
825-
add_caf_test(team_number_pre15 8 team_number_pre15)
826824
endif()
827825
endif()
828826

src/tests/unit/teams/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
caf_compile_executable(team_number_pre15 team_number_pre15.f90)
1+
caf_compile_executable(team_number team_number.F90)
22
caf_compile_executable(teams_subset teams_subset.f90)
33
caf_compile_executable(get_communicator get-communicator.F90)
44
caf_compile_executable(teams_coarray_get teams_coarray_get.f90)
@@ -8,7 +8,6 @@ caf_compile_executable(teams_coarray_send_by_ref teams_coarray_send.f90)
88
caf_compile_executable(teams_coarray_sendget teams_coarray_sendget.f90)
99
caf_compile_executable(sync_team sync-team.f90)
1010
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 16.0.0))
11-
caf_compile_executable(team_number team_number.f90)
1211
caf_compile_executable(teams_this_image teams_this_image.f90)
1312
caf_compile_executable(teams_num_images teams_num_images.f90)
1413
endif()

src/tests/unit/teams/team_number.f90 renamed to src/tests/unit/teams/team_number.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
program main
3131
!! summary: Test team_number intrinsic function
32-
use iso_fortran_env, only : team_type, current_team
32+
use, intrinsic :: iso_fortran_env
3333
use iso_c_binding, only : c_loc
3434
use oc_assertions_interface, only : assert
3535

@@ -43,7 +43,9 @@ program main
4343

4444
call assert(team_number()==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
4545

46+
#ifdef GCC_GE_15
4647
call assert(team_number(get_team(current_team))==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
48+
#endif
4749

4850
after_change_team: block
4951
associate(parent_team_number => 100 + (num_images()-1)/4, child_team_number => 1000 + mod(num_images()-1,4)/2)

src/tests/unit/teams/team_number_pre15.f90

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)