6 integer, parameter :: n
=10,m
=1001
12 use omp_lib
, only
: omp_get_thread_num
14 integer, intent(in
) :: n
,m
16 integer, dimension(n
) :: sumarray
18 !$OMP PARALLEL DEFAULT(shared) NUM_THREADS(4)
19 !$OMP DO PRIVATE(j,i), REDUCTION(+:sumarray)
22 sumarray(i
)=sumarray(i
)+i
28 if (sumarray(i
).ne
.m
*i
) STOP 1