subroutine sum_reduce(a, s, t)
real, intent(in) :: a(:)
real, intent(out) :: s, t
integer :: N, i
N = size(a)
s = 0
t = 0
do concurrent (i = 1:N) reduce(+:s,t)
    s = s + a(i)
    t = t + a(i)
end do
end subroutine
