C....*...1.........2.........3.........4.........5.........6.........7.*.......8
C     DGMAPB
C
C     PURPOSE
C     PREMULTIPLY B BY THE TRANSPOSE OF A: R = A'B.
C
C     USAGE
C     CALL DGMAPB(A,B,R,N,M,L)
C
C     ARGUMENTS
C     A - INPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0).
C         ELEMENTS OF A ARE REAL*8.
C     B - INPUT N BY L MATRIX STORED COLUMNWISE (STORAGE MODE 0).
C         ELEMENTS OF B ARE REAL*8.
C     R - OUTPUT M BY L MATRIX CONTAINING (A-TRANSPOSE)*B STORED COLUMN-
C         WISE (STORAGE MODE 0).
C         ELEMENTS OF R ARE REAL*8.
C     N - NUMBER OF ROWS IN A AND B.
C     M - NUMBER OF COLUMNS IN A, ROWS IN R.
C     L - NUMBER OF COLUMNS IN B AND R.
C
      SUBROUTINE DGMAPB(A,B,R,N,M,L)
      implicit real*8 (a-h,o-z)
      save
      REAL*8 A(N,M),B(N,L),R(M,L)
      DO 10 I=1,M
      DO 10 J=1,L
      R(I,J)=0.D0
      DO 10 K=1,N
10    R(I,J)=R(I,J)+A(K,I)*B(K,J)
      RETURN
      END
