Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.fortran/teams-1.f90
2023-03-06 14:48:14 +01:00

22 lines
564 B
Fortran

program main
use omp_lib
implicit none (type, external)
integer :: i
!$omp teams num_teams (5)
if (omp_get_num_teams () /= 5) stop 1
!$omp distribute dist_schedule(static,1)
do i = 0, 4
if (omp_get_team_num () /= i) stop 2
end do
!$omp end teams
!$omp teams num_teams (7 : 9)
if (omp_get_num_teams () < 7 .or. omp_get_num_teams () > 9) &
stop 3
!$omp distribute dist_schedule(static,1)
do i = 0, omp_get_num_teams () - 1
if (omp_get_team_num () /= i) stop 4
end do
!$omp end teams
end program main