!   ****************************
    subroutine pdscal (n,x,y,ps)
!   ****************************
!
        implicit none
!
        integer, intent(in) :: n
        real(kind=8), intent(in), dimension (n) ::x,y
        real(kind=8), intent(out) :: ps
!
        integer :: i 
!
        ps=0.d0
        do i=1,n
         ps=ps+x(i)*y(i)
        end do
!
    return
!
!   *********************
    end subroutine pdscal
!   *********************
