Skip to content

Commit 8e72b5d

Browse files
committed
Fix team_number test.
1 parent b2c1bf4 commit 8e72b5d

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
@@ -803,6 +803,7 @@ if(opencoarrays_aware_compiler)
803803
add_caf_test(comp_allocated_2 2 comp_allocated_2)
804804
add_caf_test(alloc_comp_get_convert_nums 2 alloc_comp_get_convert_nums)
805805
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8)
806+
add_caf_test(team_number 8 team_number)
806807
add_caf_test(teams_subset 3 teams_subset)
807808
add_caf_test(get_communicator 3 get_communicator)
808809
add_caf_test(teams_coarray_get 5 teams_coarray_get)
@@ -815,11 +816,8 @@ if(opencoarrays_aware_compiler)
815816
set_tests_properties(alloc_comp_multidim_shape PROPERTIES TIMEOUT 300)
816817
endif()
817818
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 15)
818-
add_caf_test(team_number 8 team_number)
819819
add_caf_test(teams_this_image 8 teams_this_image)
820820
add_caf_test(teams_num_images 8 teams_num_images)
821-
else()
822-
add_caf_test(team_number_pre15 8 team_number_pre15)
823821
endif()
824822
endif()
825823

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 15.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)