      SUBROUTINE MTPRD(M,N,A,IA,JA,X,Y)
C     ******************************************************************
C     PRODUCT OF A VECTOR AND A SPARSE MATRIX
C     ******************************************************************
      REAL A(1), X(M), Y(N)
      INTEGER IA(1), JA(1)
C
      DO 10 J = 1,N
   10 Y(J) = 0.0
C
      DO 21 I = 1,M
      XI = X(I)
      JMIN = IA(I)
      JMAX = IA(I+1) - 1
      IF (JMIN .GT. JMAX) GO TO 21
         DO 20 J = JMIN,JMAX
         JCOL = JA(J)
   20    Y(JCOL) = Y(JCOL) + XI*A(J)
   21 CONTINUE
      RETURN
      END
