SUBROUTINE vec_sum (xvec, xsum, n)
IMPLICIT DOUBLE PRECISION (a-h, o-z)
DIMENSION xvec(n)
INTENT (IN) :: xvec, n
INTENT (OUT) :: xsum
xsum = SUM(xvec)
RETURN
END
