program parallel implicit none integer, parameter :: n=5 integer :: i, s=0, p=1, r=1 !$OMP PARALLEL !$OMP DO REDUCTION(+:s) REDUCTION(*:p,r) do i = 1, n s = s + 1 p = p * 2 r = r * 3 end do !$OMP END DO !$OMP END PARALLEL print *,"s =",s, "; p =",p, "; r =",r end program parallel