C.hr DGMTRA
C@
C....*...1.........2.........3.........4.........5.........6.........7.*
C     DGMTRA  8/23/73
C
C     PURPOSE
C     TRANSPOSE A MATRIX: R = A'
C
C     USAGE
C     CALL DGMTRA(A,R,N,M)
C
C     ARGUMENTS
C     A - INPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     R - OUTPUT M BY N MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     N - NUMBER OF ROWS IN A AND COLUMNS IN R
C         INTEGER*4
C     M - NUMBER OF COLUMNS IN A AND ROWS IN R
C         INTEGER*4
C
C
      SUBROUTINE DGMTRA(A,R,N,M)
      implicit real*8 (a-h,o-z)
      save
      REAL*8 A(N*M),R(M*N)
      DO 10 I=1,N
      DO 10 J=1,M
 10   R((I-1)*M+J)=A((J-1)*N+I)
      RETURN
      END
