aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/teams1.f90
blob: 4f146074d3dc8196115047744f3c5ed0bd84a763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
program teams1
  use omp_lib
!$omp teams thread_limit (2)
  if (omp_in_parallel ()) stop 1
  if (omp_get_level () .ne. 0) stop 2
  if (omp_get_ancestor_thread_num (0) .ne. 0) stop 3
  if (omp_get_ancestor_thread_num (1) .ne. -1) stop 4
  call omp_set_dynamic (.false.)
  call omp_set_nested (.true.)
!$omp parallel num_threads (2)
  if (.not. omp_in_parallel ()) stop 5
  if (omp_get_level () .ne. 1) stop 6
  if (omp_get_ancestor_thread_num (0) .ne. 0) stop 7
  if (omp_get_ancestor_thread_num (1) &
&     .ne. omp_get_thread_num ()) stop 8
  if (omp_get_ancestor_thread_num (2) .ne. -1) stop 9
!$omp end parallel
!$omp end teams
end program