5 !$omp teams reduction(+:err)
6 err
= err
+ bar (0, 0, 0)
9 !$omp teams reduction(+:err)
10 err
= err
+ bar (1, 0, 0)
12 if (err
.ne
. 0) stop 2
13 !$omp teams reduction(+:err)
16 err
= err
+ bar (2, i
, 0)
19 if (err
.ne
. 0) stop 3
20 !$omp teams reduction(+:err)
23 !$omp parallel do reduction(+:err)
25 err
= err
+ bar (3, i
, j
)
29 if (err
.ne
. 0) stop 4
31 subroutine foo (x
, y
, z
, a
, b
)
32 integer :: x
, y
, z
, a
, b(64), i
, j
35 !$omp parallel do shared (a, b)
37 call foo (3, i
, j
, a
, b
)
40 else if (x
.eq
. 1) then
41 !$omp distribute dist_schedule (static, 1)
43 !$omp parallel do shared (a, b)
45 call foo (3, i
, j
, a
, b
)
48 else if (x
.eq
. 2) then
49 !$omp parallel do shared (a, b)
51 call foo (3, y
, j
, a
, b
)
55 b(y
+ 1) = b(y
+ 1) + z
63 integer function bar (x
, y
, z
)
65 integer :: x
, y
, z
, a
, b(64), i
, c
, d
, e
, f
70 call foo (x
, y
, z
, a
, b
)
72 if (a
.ne
. 8 + 64 * 32) then
77 if (b(i
+ 1) .ne
. i
+ 31 * 32 / 2) then
82 else if (x
.eq
. 1) then
83 c
= omp_get_num_teams ()
84 d
= omp_get_team_num ()
89 if (b(i
+ 1) .ne
. i
+ 31 * 32 / 2) then
95 else if (b(i
+ 1) .ne
. i
) then
100 if (a
.lt
. 8 .or
. a
> 8 + f
* 32) then
104 else if (x
.eq
. 2) then
105 if (a
.ne
. 8 + 32) then
115 if (b(i
+ 1) .ne
. i
+ c
) then
120 else if (x
.eq
. 3) then
121 if (a
.ne
. 8 + 1) then
131 if (b (i
+ 1) .ne
. i
+ c
) then