6 integer, parameter :: n
=10,m
=1001
8 integer, dimension(n
) :: sumarray
11 if (sumarray(i
).ne
.m
*i
) call abort
15 subroutine foo(n
,m
,sumarray
)
16 use omp_lib
, only
: omp_get_thread_num
18 integer, intent(in
) :: n
,m
19 integer, dimension(n
), intent(out
) :: sumarray
22 !$OMP PARALLEL DEFAULT(shared) NUM_THREADS(4)
23 !$OMP DO PRIVATE(j,i), REDUCTION(+:sumarray)
26 sumarray(i
)=sumarray(i
)+i