      SUBROUTINE SMPROD(M,N,A,KA,B)
      REAL A(KA,N),B(1)
      DOUBLE PRECISION S
      II=1
      DO 12 I=1,N
      DO 11 J=1,I
      S = 0.D0
      DO 10 K=1,M
   10 S = S + DBLE(A(K,I))*DBLE(A(K,J))
      B(II) = S
   11 II = II + 1
   12 CONTINUE
      RETURN
      END
