5 subroutine sub (a
, b
, c
, d
, n
)
7 integer, allocatable
:: a(:), b(:), c(:), d(:)
11 integer, allocatable
:: a(:), b(:), c(:), d(:)
13 allocate (a(50), b(50), c(50), d(50))
15 a(i
) = 2 + modulo (i
, 7)
16 b(i
) = 179 - modulo (i
, 11)
20 call sub (a
, b
, c
, d
, 50)
25 else if (i
.gt
. 1 .and
. i
.lt
. 9) then
28 if (c(i
) .ne
. j
) call abort
29 j
= 179 - modulo (i
, 11)
30 if (i
.gt
. 1 .and
. i
.lt
. 9) j
= i
31 if (d(i
) .ne
. j
) call abort
33 deallocate (a
, b
, c
, d
)
36 subroutine sub (a
, b
, c
, d
, n
)
38 integer, allocatable
:: a(:), b(:), c(:), d(:)
39 !$omp parallel do shared(a, b) reduction(+:c) reduction(min:d)
42 d(i
) = min(d(i
), b(i
))
43 d(a(i
)) = min(d(a(i
)), a(i
))