      SUBROUTINE MMULT(MATXI1,M1ROW,N1COL,MATXI2,M2ROW,N2COL,MATXO)
C
C***********************************************************************
C
C   NAME- MMULT
C
C   LANGUAGE- VS FORTRAN  TYPE- SUBROUTINE      COMPUTER- NAS 9000
C
C   VERSION- 1.0    DATE- 07/14/89   PROGRAMMER- G. RAJASHEKAR (SMSRC)
C   VERSION- 3.0    DATE- 06/04/96   PROGRAMMER- TIM GARDNER (HSTX)
C   VERSION- 3.1    DATE- 06/10/96   PROGRAMMER- TIM GARDNER (HSTX)
C
C   FUNCTION - THIS SUBROUTINE WILL MATHEMATICALLY MULTIPLY TWO INPUT
C              MATRICES AND PLACE THE RESULT IN THE OUTPUT MATRIX.  A
C              MISSING VALUE ON INPUT PRODUCES A FATAL ERROR.
C
C   VERSION 3.0- DOCUMENTATION AND SYNTAX CHANGES FOR ATOVS BASELINE
C                ON THE CRAY.
C
C   VERSION 3.1- REPLACED IMSL ROUTINE DMRRRR WITH SGEMMS SINCE THE
C                IMSL ROUTINES ARE NOT ON THE CRAY.
C
C   CALLING SEQUENCE PARAMETERS-
C
C   NAME     TYPE  I/O     FUNCTION
C   ----     ----  ---     --------
C
C   MATXI1   REAL   I   INPUT MATRIX OF DIMENSION M1ROW * N1COL.
C
C   MATXI2   REAL   I   INPUT MATRIX OF DIMENSION M2ROW * N2COL.
C
C   MATXO    REAL   O   OUTPUT MATRIX OF DIMENSION M1ROW * N2COL.
C
C   M1ROW    INT    I   NUMBER OF ROWS IN THE FIRST INPUT MATRIX.
C
C   N1COL    INT    I   NUMBER OF COLS IN THE FIRST INPUT MATRIX.
C
C   M2ROW    INT    I   NUMBER OF ROWS IN THE SECOND INPUT MATRIX.
C
C   N2COL    INT    I   NUMBER OF COLS IN THE SECOND INPUT MATRIX.
C
C   LOCAL PARAMETERS-
C
C   NAME     TYPE    FUNCTION
C   ----     ----    --------
C   M3ROW    INT     NUMBER OF ROWS IN THE OUTPUT IMSL MATRIX.
C
C   N3COL    INT     NUMBER OF COLS IN THE OUTPUT IMSL MATRIX.
C
C   LDM1     INT     LEADING DIMENSION OF INPUT MATRIX MATXI1.
C
C   LDM2     INT     LEADING DIMENSION OF INPUT MATRIX MATXI2.
C
C   LDM3     INT     LEADING DIMENSION OF OUTPUT MATRIX MATXO.
C
C   WORK     REAL    WORK AREA FOR SGEMMS.
C
      INTEGER M1ROW,N1COL,M2ROW,N2COL,M3ROW,N3COL,LDM1,
     +  LDM2,LDM3
      INTEGER*4 M1ROWI4,N1COLI4,N2COLI4,LDM1I4,
     +  LDM2I4,LDM3I4
      REAL MATXI1(M1ROW,N1COL),MATXI2(M2ROW,N2COL)
      REAL MATXO(M1ROW,N2COL),WORK(6*M1ROW*N1COL)
C
C   SUBROUTINES CALLED - SGEMMS (CRAY MATRIX MULT. ROUTINE)
C
C   FUNCTIONS USED - NONE
C
C   EXIT STATES - NONE
C
C   NOTES- INPUT MATRICES MATXI1 AND MATXI2 MUST NOT CONTAIN
C          MISSING VALUES.  MISSING VALUES WILL PRODUCE RUN-TIME
C          ERRORS.
C
C
C***********************************************************************
C
      LDM1 = M1ROW
      LDM2 = M2ROW
      LDM3 = M1ROW
      M3ROW = M1ROW
      N3COL = N2COL
C     CALL SGEMMS('N','N',M1ROW,N2COL,N1COL,1.0,MATXI1,LDM1,
C    +            MATXI2,LDM2,0.0,MATXO,LDM3,WORK)
      M1ROWI4 = M1ROW
      N2COLI4 = N2COL
      N1COLI4 = N1COL
      LDM1I4 = LDM1
      LDM2I4 = LDM2
      LDM3I4 = LDM3
      CALL DGEMM('N','N',M1ROWI4,N2COLI4,N1COLI4,1.0,MATXI1,LDM1I4,
     +            MATXI2,LDM2I4,0.0,MATXO,LDM3I4,WORK)
      M1ROW = M1ROWI4
      N2COL = N2COLI4
      N1COL = N1COLI4
      LDM1 = LDM1I4
      LDM2 = LDM2I4
      LDM3 = LDM3I4
C
      RETURN
      END
