kusano 2b45e8
      PROGRAM ZBLAT3
kusano 2b45e8
*
kusano 2b45e8
*  Test program for the COMPLEX*16       Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  The program must be driven by a short data file. The first 14 records
kusano 2b45e8
*  of the file are read using list-directed input, the last 9 records
kusano 2b45e8
*  are read using the format ( A6, L2 ). An annotated example of a data
kusano 2b45e8
*  file can be obtained by deleting the first 3 characters from the
kusano 2b45e8
*  following 23 lines:
kusano 2b45e8
*  'ZBLAT3.SUMM'     NAME OF SUMMARY OUTPUT FILE
kusano 2b45e8
*  6                 UNIT NUMBER OF SUMMARY FILE
kusano 2b45e8
*  'ZBLAT3.SNAP'     NAME OF SNAPSHOT OUTPUT FILE
kusano 2b45e8
*  -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
kusano 2b45e8
*  F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
kusano 2b45e8
*  F        LOGICAL FLAG, T TO STOP ON FAILURES.
kusano 2b45e8
*  T        LOGICAL FLAG, T TO TEST ERROR EXITS.
kusano 2b45e8
*  16.0     THRESHOLD VALUE OF TEST RATIO
kusano 2b45e8
*  6                 NUMBER OF VALUES OF N
kusano 2b45e8
*  0 1 2 3 5 9       VALUES OF N
kusano 2b45e8
*  3                 NUMBER OF VALUES OF ALPHA
kusano 2b45e8
*  (0.0,0.0) (1.0,0.0) (0.7,-0.9)       VALUES OF ALPHA
kusano 2b45e8
*  3                 NUMBER OF VALUES OF BETA
kusano 2b45e8
*  (0.0,0.0) (1.0,0.0) (1.3,-1.1)       VALUES OF BETA
kusano 2b45e8
*  ZGEMM  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZHEMM  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZSYMM  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZTRMM  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZTRSM  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZHERK  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZSYRK  T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZHER2K T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*  ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
kusano 2b45e8
*
kusano 2b45e8
*  See:
kusano 2b45e8
*
kusano 2b45e8
*     Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
kusano 2b45e8
*     A Set of Level 3 Basic Linear Algebra Subprograms.
kusano 2b45e8
*
kusano 2b45e8
*     Technical Memorandum No.88 (Revision 1), Mathematics and
kusano 2b45e8
*     Computer Science Division, Argonne National Laboratory, 9700
kusano 2b45e8
*     South Cass Avenue, Argonne, Illinois 60439, US.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER            NIN
kusano 2b45e8
      PARAMETER          ( NIN = 5 )
kusano 2b45e8
      INTEGER            NSUBS
kusano 2b45e8
      PARAMETER          ( NSUBS = 9 )
kusano 2b45e8
      COMPLEX*16         ZERO, ONE
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),
kusano 2b45e8
     $                   ONE = ( 1.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RZERO, RHALF, RONE
kusano 2b45e8
      PARAMETER          ( RZERO = 0.0D0, RHALF = 0.5D0, RONE = 1.0D0 )
kusano 2b45e8
      INTEGER            NMAX
kusano 2b45e8
      PARAMETER          ( NMAX = 65 )
kusano 2b45e8
      INTEGER            NIDMAX, NALMAX, NBEMAX
kusano 2b45e8
      PARAMETER          ( NIDMAX = 9, NALMAX = 7, NBEMAX = 7 )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      DOUBLE PRECISION   EPS, ERR, THRESH
kusano 2b45e8
      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NOUT, NTRA
kusano 2b45e8
      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,
kusano 2b45e8
     $                   TSTERR
kusano 2b45e8
      CHARACTER*1        TRANSA, TRANSB
kusano 2b45e8
      CHARACTER*6        SNAMET
kusano 2b45e8
      CHARACTER*32       SNAPS, SUMMRY
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      COMPLEX*16         AA( NMAX*NMAX ), AB( NMAX, 2*NMAX ),
kusano 2b45e8
     $                   ALF( NALMAX ), AS( NMAX*NMAX ),
kusano 2b45e8
     $                   BB( NMAX*NMAX ), BET( NBEMAX ),
kusano 2b45e8
     $                   BS( NMAX*NMAX ), C( NMAX, NMAX ),
kusano 2b45e8
     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),
kusano 2b45e8
     $                   W( 2*NMAX )
kusano 2b45e8
      DOUBLE PRECISION   G( NMAX )
kusano 2b45e8
      INTEGER            IDIM( NIDMAX )
kusano 2b45e8
      LOGICAL            LTEST( NSUBS )
kusano 2b45e8
      CHARACTER*6        SNAMES( NSUBS )
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      DOUBLE PRECISION   DDIFF
kusano 2b45e8
      LOGICAL            LZE
kusano 2b45e8
      EXTERNAL           DDIFF, LZE
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZCHK1, ZCHK2, ZCHK3, ZCHK4, ZCHK5, ZCHKE, ZMMCH
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          MAX, MIN
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
      CHARACTER*6        SRNAMT
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
      COMMON             /SRNAMC/SRNAMT
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA               SNAMES/'ZGEMM ', 'ZHEMM ', 'ZSYMM ', 'ZTRMM ',
kusano 2b45e8
     $                   'ZTRSM ', 'ZHERK ', 'ZSYRK ', 'ZHER2K',
kusano 2b45e8
     $                   'ZSYR2K'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
*     Read name and unit number for summary output file and open file.
kusano 2b45e8
*
kusano 2b45e8
      READ( NIN, FMT = * )SUMMRY
kusano 2b45e8
      READ( NIN, FMT = * )NOUT
kusano 2b45e8
      OPEN( NOUT, FILE = SUMMRY, STATUS = 'NEW' )
kusano 2b45e8
      NOUTC = NOUT
kusano 2b45e8
*
kusano 2b45e8
*     Read name and unit number for snapshot output file and open file.
kusano 2b45e8
*
kusano 2b45e8
      READ( NIN, FMT = * )SNAPS
kusano 2b45e8
      READ( NIN, FMT = * )NTRA
kusano 2b45e8
      TRACE = NTRA.GE.0
kusano 2b45e8
      IF( TRACE )THEN
kusano 2b45e8
         OPEN( NTRA, FILE = SNAPS, STATUS = 'NEW' )
kusano 2b45e8
      END IF
kusano 2b45e8
*     Read the flag that directs rewinding of the snapshot file.
kusano 2b45e8
      READ( NIN, FMT = * )REWI
kusano 2b45e8
      REWI = REWI.AND.TRACE
kusano 2b45e8
*     Read the flag that directs stopping on any failure.
kusano 2b45e8
      READ( NIN, FMT = * )SFATAL
kusano 2b45e8
*     Read the flag that indicates whether error exits are to be tested.
kusano 2b45e8
      READ( NIN, FMT = * )TSTERR
kusano 2b45e8
*     Read the threshold value of the test ratio
kusano 2b45e8
      READ( NIN, FMT = * )THRESH
kusano 2b45e8
*
kusano 2b45e8
*     Read and check the parameter values for the tests.
kusano 2b45e8
*
kusano 2b45e8
*     Values of N
kusano 2b45e8
      READ( NIN, FMT = * )NIDIM
kusano 2b45e8
      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )'N', NIDMAX
kusano 2b45e8
         GO TO 220
kusano 2b45e8
      END IF
kusano 2b45e8
      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )
kusano 2b45e8
      DO 10 I = 1, NIDIM
kusano 2b45e8
         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN
kusano 2b45e8
            WRITE( NOUT, FMT = 9996 )NMAX
kusano 2b45e8
            GO TO 220
kusano 2b45e8
         END IF
kusano 2b45e8
   10 CONTINUE
kusano 2b45e8
*     Values of ALPHA
kusano 2b45e8
      READ( NIN, FMT = * )NALF
kusano 2b45e8
      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX
kusano 2b45e8
         GO TO 220
kusano 2b45e8
      END IF
kusano 2b45e8
      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )
kusano 2b45e8
*     Values of BETA
kusano 2b45e8
      READ( NIN, FMT = * )NBET
kusano 2b45e8
      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX
kusano 2b45e8
         GO TO 220
kusano 2b45e8
      END IF
kusano 2b45e8
      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )
kusano 2b45e8
*
kusano 2b45e8
*     Report values of parameters.
kusano 2b45e8
*
kusano 2b45e8
      WRITE( NOUT, FMT = 9995 )
kusano 2b45e8
      WRITE( NOUT, FMT = 9994 )( IDIM( I ), I = 1, NIDIM )
kusano 2b45e8
      WRITE( NOUT, FMT = 9993 )( ALF( I ), I = 1, NALF )
kusano 2b45e8
      WRITE( NOUT, FMT = 9992 )( BET( I ), I = 1, NBET )
kusano 2b45e8
      IF( .NOT.TSTERR )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = * )
kusano 2b45e8
         WRITE( NOUT, FMT = 9984 )
kusano 2b45e8
      END IF
kusano 2b45e8
      WRITE( NOUT, FMT = * )
kusano 2b45e8
      WRITE( NOUT, FMT = 9999 )THRESH
kusano 2b45e8
      WRITE( NOUT, FMT = * )
kusano 2b45e8
*
kusano 2b45e8
*     Read names of subroutines and flags which indicate
kusano 2b45e8
*     whether they are to be tested.
kusano 2b45e8
*
kusano 2b45e8
      DO 20 I = 1, NSUBS
kusano 2b45e8
         LTEST( I ) = .FALSE.
kusano 2b45e8
   20 CONTINUE
kusano 2b45e8
   30 READ( NIN, FMT = 9988, END = 60 )SNAMET, LTESTT
kusano 2b45e8
      DO 40 I = 1, NSUBS
kusano 2b45e8
         IF( SNAMET.EQ.SNAMES( I ) )
kusano 2b45e8
     $      GO TO 50
kusano 2b45e8
   40 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9990 )SNAMET
kusano 2b45e8
      STOP
kusano 2b45e8
   50 LTEST( I ) = LTESTT
kusano 2b45e8
      GO TO 30
kusano 2b45e8
*
kusano 2b45e8
   60 CONTINUE
kusano 2b45e8
      CLOSE ( NIN )
kusano 2b45e8
*
kusano 2b45e8
*     Compute EPS (the machine precision).
kusano 2b45e8
*
kusano 2b45e8
      EPS = RONE
kusano 2b45e8
   70 CONTINUE
kusano 2b45e8
      IF( DDIFF( RONE + EPS, RONE ).EQ.RZERO )
kusano 2b45e8
     $   GO TO 80
kusano 2b45e8
      EPS = RHALF*EPS
kusano 2b45e8
      GO TO 70
kusano 2b45e8
   80 CONTINUE
kusano 2b45e8
      EPS = EPS + EPS
kusano 2b45e8
      WRITE( NOUT, FMT = 9998 )EPS
kusano 2b45e8
*
kusano 2b45e8
*     Check the reliability of ZMMCH using exact data.
kusano 2b45e8
*
kusano 2b45e8
      N = MIN( 32, NMAX )
kusano 2b45e8
      DO 100 J = 1, N
kusano 2b45e8
         DO 90 I = 1, N
kusano 2b45e8
            AB( I, J ) = MAX( I - J + 1, 0 )
kusano 2b45e8
   90    CONTINUE
kusano 2b45e8
         AB( J, NMAX + 1 ) = J
kusano 2b45e8
         AB( 1, NMAX + J ) = J
kusano 2b45e8
         C( J, 1 ) = ZERO
kusano 2b45e8
  100 CONTINUE
kusano 2b45e8
      DO 110 J = 1, N
kusano 2b45e8
         CC( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3
kusano 2b45e8
  110 CONTINUE
kusano 2b45e8
*     CC holds the exact result. On exit from ZMMCH CT holds
kusano 2b45e8
*     the result computed by ZMMCH.
kusano 2b45e8
      TRANSA = 'N'
kusano 2b45e8
      TRANSB = 'N'
kusano 2b45e8
      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
kusano 2b45e8
     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
kusano 2b45e8
     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
kusano 2b45e8
      SAME = LZE( CC, CT, N )
kusano 2b45e8
      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
kusano 2b45e8
         STOP
kusano 2b45e8
      END IF
kusano 2b45e8
      TRANSB = 'C'
kusano 2b45e8
      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
kusano 2b45e8
     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
kusano 2b45e8
     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
kusano 2b45e8
      SAME = LZE( CC, CT, N )
kusano 2b45e8
      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
kusano 2b45e8
         STOP
kusano 2b45e8
      END IF
kusano 2b45e8
      DO 120 J = 1, N
kusano 2b45e8
         AB( J, NMAX + 1 ) = N - J + 1
kusano 2b45e8
         AB( 1, NMAX + J ) = N - J + 1
kusano 2b45e8
  120 CONTINUE
kusano 2b45e8
      DO 130 J = 1, N
kusano 2b45e8
         CC( N - J + 1 ) = J*( ( J + 1 )*J )/2 -
kusano 2b45e8
     $                     ( ( J + 1 )*J*( J - 1 ) )/3
kusano 2b45e8
  130 CONTINUE
kusano 2b45e8
      TRANSA = 'C'
kusano 2b45e8
      TRANSB = 'N'
kusano 2b45e8
      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
kusano 2b45e8
     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
kusano 2b45e8
     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
kusano 2b45e8
      SAME = LZE( CC, CT, N )
kusano 2b45e8
      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
kusano 2b45e8
         STOP
kusano 2b45e8
      END IF
kusano 2b45e8
      TRANSB = 'C'
kusano 2b45e8
      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,
kusano 2b45e8
     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,
kusano 2b45e8
     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )
kusano 2b45e8
      SAME = LZE( CC, CT, N )
kusano 2b45e8
      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR
kusano 2b45e8
         STOP
kusano 2b45e8
      END IF
kusano 2b45e8
*
kusano 2b45e8
*     Test each subroutine in turn.
kusano 2b45e8
*
kusano 2b45e8
      DO 200 ISNUM = 1, NSUBS
kusano 2b45e8
         WRITE( NOUT, FMT = * )
kusano 2b45e8
         IF( .NOT.LTEST( ISNUM ) )THEN
kusano 2b45e8
*           Subprogram is not to be tested.
kusano 2b45e8
            WRITE( NOUT, FMT = 9987 )SNAMES( ISNUM )
kusano 2b45e8
         ELSE
kusano 2b45e8
            SRNAMT = SNAMES( ISNUM )
kusano 2b45e8
*           Test error exits.
kusano 2b45e8
            IF( TSTERR )THEN
kusano 2b45e8
               CALL ZCHKE( ISNUM, SNAMES( ISNUM ), NOUT )
kusano 2b45e8
               WRITE( NOUT, FMT = * )
kusano 2b45e8
            END IF
kusano 2b45e8
*           Test computations.
kusano 2b45e8
            INFOT = 0
kusano 2b45e8
            OK = .TRUE.
kusano 2b45e8
            FATAL = .FALSE.
kusano 2b45e8
            GO TO ( 140, 150, 150, 160, 160, 170, 170,
kusano 2b45e8
     $              180, 180 )ISNUM
kusano 2b45e8
*           Test ZGEMM, 01.
kusano 2b45e8
  140       CALL ZCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
kusano 2b45e8
     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
kusano 2b45e8
     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
kusano 2b45e8
     $                  CC, CS, CT, G )
kusano 2b45e8
            GO TO 190
kusano 2b45e8
*           Test ZHEMM, 02, ZSYMM, 03.
kusano 2b45e8
  150       CALL ZCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
kusano 2b45e8
     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
kusano 2b45e8
     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
kusano 2b45e8
     $                  CC, CS, CT, G )
kusano 2b45e8
            GO TO 190
kusano 2b45e8
*           Test ZTRMM, 04, ZTRSM, 05.
kusano 2b45e8
  160       CALL ZCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
kusano 2b45e8
     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,
kusano 2b45e8
     $                  AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C )
kusano 2b45e8
            GO TO 190
kusano 2b45e8
*           Test ZHERK, 06, ZSYRK, 07.
kusano 2b45e8
  170       CALL ZCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
kusano 2b45e8
     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
kusano 2b45e8
     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,
kusano 2b45e8
     $                  CC, CS, CT, G )
kusano 2b45e8
            GO TO 190
kusano 2b45e8
*           Test ZHER2K, 08, ZSYR2K, 09.
kusano 2b45e8
  180       CALL ZCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,
kusano 2b45e8
     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,
kusano 2b45e8
     $                  NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )
kusano 2b45e8
            GO TO 190
kusano 2b45e8
*
kusano 2b45e8
  190       IF( FATAL.AND.SFATAL )
kusano 2b45e8
     $         GO TO 210
kusano 2b45e8
         END IF
kusano 2b45e8
  200 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9986 )
kusano 2b45e8
      GO TO 230
kusano 2b45e8
*
kusano 2b45e8
  210 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9985 )
kusano 2b45e8
      GO TO 230
kusano 2b45e8
*
kusano 2b45e8
  220 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9991 )
kusano 2b45e8
*
kusano 2b45e8
  230 CONTINUE
kusano 2b45e8
      IF( TRACE )
kusano 2b45e8
     $   CLOSE ( NTRA )
kusano 2b45e8
      CLOSE ( NOUT )
kusano 2b45e8
      STOP
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
kusano 2b45e8
     $      'S THAN', F8.2 )
kusano 2b45e8
 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, D9.1 )
kusano 2b45e8
 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',
kusano 2b45e8
     $      'THAN ', I2 )
kusano 2b45e8
 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )
kusano 2b45e8
 9995 FORMAT( ' TESTS OF THE COMPLEX*16       LEVEL 3 BLAS', //' THE F',
kusano 2b45e8
     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )
kusano 2b45e8
 9994 FORMAT( '   FOR N              ', 9I6 )
kusano 2b45e8
 9993 FORMAT( '   FOR ALPHA          ',
kusano 2b45e8
     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )
kusano 2b45e8
 9992 FORMAT( '   FOR BETA           ',
kusano 2b45e8
     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )
kusano 2b45e8
 9991 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
kusano 2b45e8
     $      /' ******* TESTS ABANDONED *******' )
kusano 2b45e8
 9990 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',
kusano 2b45e8
     $      'ESTS ABANDONED *******' )
kusano 2b45e8
 9989 FORMAT( ' ERROR IN ZMMCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',
kusano 2b45e8
     $      'ATED WRONGLY.', /' ZMMCH WAS CALLED WITH TRANSA = ', A1,
kusano 2b45e8
     $      ' AND TRANSB = ', A1, /' AND RETURNED SAME = ', L1, ' AND ',
kusano 2b45e8
     $      'ERR = ', F12.3, '.', /' THIS MAY BE DUE TO FAULTS IN THE ',
kusano 2b45e8
     $      'ARITHMETIC OR THE COMPILER.', /' ******* TESTS ABANDONED ',
kusano 2b45e8
     $      '*******' )
kusano 2b45e8
 9988 FORMAT( A6, L2 )
kusano 2b45e8
 9987 FORMAT( 1X, A6, ' WAS NOT TESTED' )
kusano 2b45e8
 9986 FORMAT( /' END OF TESTS' )
kusano 2b45e8
 9985 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )
kusano 2b45e8
 9984 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZBLAT3.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
kusano 2b45e8
     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
kusano 2b45e8
     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
kusano 2b45e8
*
kusano 2b45e8
*  Tests ZGEMM.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RZERO
kusano 2b45e8
      PARAMETER          ( RZERO = 0.0D0 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION   EPS, THRESH
kusano 2b45e8
      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA
kusano 2b45e8
      LOGICAL            FATAL, REWI, TRACE
kusano 2b45e8
      CHARACTER*6        SNAME
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
kusano 2b45e8
     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),
kusano 2b45e8
     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),
kusano 2b45e8
     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),
kusano 2b45e8
     $                   CS( NMAX*NMAX ), CT( NMAX )
kusano 2b45e8
      DOUBLE PRECISION   G( NMAX )
kusano 2b45e8
      INTEGER            IDIM( NIDIM )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         ALPHA, ALS, BETA, BLS
kusano 2b45e8
      DOUBLE PRECISION   ERR, ERRMAX
kusano 2b45e8
      INTEGER            I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,
kusano 2b45e8
     $                   LBB, LCC, LDA, LDAS, LDB, LDBS, LDC, LDCS, M,
kusano 2b45e8
     $                   MA, MB, MS, N, NA, NARGS, NB, NC, NS
kusano 2b45e8
      LOGICAL            NULL, RESET, SAME, TRANA, TRANB
kusano 2b45e8
      CHARACTER*1        TRANAS, TRANBS, TRANSA, TRANSB
kusano 2b45e8
      CHARACTER*3        ICH
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      LOGICAL            ISAME( 13 )
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      LOGICAL            LZE, LZERES
kusano 2b45e8
      EXTERNAL           LZE, LZERES
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZGEMM, ZMAKE, ZMMCH
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          MAX
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA               ICH/'NTC'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      NARGS = 13
kusano 2b45e8
      NC = 0
kusano 2b45e8
      RESET = .TRUE.
kusano 2b45e8
      ERRMAX = RZERO
kusano 2b45e8
*
kusano 2b45e8
      DO 110 IM = 1, NIDIM
kusano 2b45e8
         M = IDIM( IM )
kusano 2b45e8
*
kusano 2b45e8
         DO 100 IN = 1, NIDIM
kusano 2b45e8
            N = IDIM( IN )
kusano 2b45e8
*           Set LDC to 1 more than minimum value if room.
kusano 2b45e8
            LDC = M
kusano 2b45e8
            IF( LDC.LT.NMAX )
kusano 2b45e8
     $         LDC = LDC + 1
kusano 2b45e8
*           Skip tests if not enough room.
kusano 2b45e8
            IF( LDC.GT.NMAX )
kusano 2b45e8
     $         GO TO 100
kusano 2b45e8
            LCC = LDC*N
kusano 2b45e8
            NULL = N.LE.0.OR.M.LE.0
kusano 2b45e8
*
kusano 2b45e8
            DO 90 IK = 1, NIDIM
kusano 2b45e8
               K = IDIM( IK )
kusano 2b45e8
*
kusano 2b45e8
               DO 80 ICA = 1, 3
kusano 2b45e8
                  TRANSA = ICH( ICA: ICA )
kusano 2b45e8
                  TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'
kusano 2b45e8
*
kusano 2b45e8
                  IF( TRANA )THEN
kusano 2b45e8
                     MA = K
kusano 2b45e8
                     NA = M
kusano 2b45e8
                  ELSE
kusano 2b45e8
                     MA = M
kusano 2b45e8
                     NA = K
kusano 2b45e8
                  END IF
kusano 2b45e8
*                 Set LDA to 1 more than minimum value if room.
kusano 2b45e8
                  LDA = MA
kusano 2b45e8
                  IF( LDA.LT.NMAX )
kusano 2b45e8
     $               LDA = LDA + 1
kusano 2b45e8
*                 Skip tests if not enough room.
kusano 2b45e8
                  IF( LDA.GT.NMAX )
kusano 2b45e8
     $               GO TO 80
kusano 2b45e8
                  LAA = LDA*NA
kusano 2b45e8
*
kusano 2b45e8
*                 Generate the matrix A.
kusano 2b45e8
*
kusano 2b45e8
                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,
kusano 2b45e8
     $                        RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                  DO 70 ICB = 1, 3
kusano 2b45e8
                     TRANSB = ICH( ICB: ICB )
kusano 2b45e8
                     TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'
kusano 2b45e8
*
kusano 2b45e8
                     IF( TRANB )THEN
kusano 2b45e8
                        MB = N
kusano 2b45e8
                        NB = K
kusano 2b45e8
                     ELSE
kusano 2b45e8
                        MB = K
kusano 2b45e8
                        NB = N
kusano 2b45e8
                     END IF
kusano 2b45e8
*                    Set LDB to 1 more than minimum value if room.
kusano 2b45e8
                     LDB = MB
kusano 2b45e8
                     IF( LDB.LT.NMAX )
kusano 2b45e8
     $                  LDB = LDB + 1
kusano 2b45e8
*                    Skip tests if not enough room.
kusano 2b45e8
                     IF( LDB.GT.NMAX )
kusano 2b45e8
     $                  GO TO 70
kusano 2b45e8
                     LBB = LDB*NB
kusano 2b45e8
*
kusano 2b45e8
*                    Generate the matrix B.
kusano 2b45e8
*
kusano 2b45e8
                     CALL ZMAKE( 'GE', ' ', ' ', MB, NB, B, NMAX, BB,
kusano 2b45e8
     $                           LDB, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                     DO 60 IA = 1, NALF
kusano 2b45e8
                        ALPHA = ALF( IA )
kusano 2b45e8
*
kusano 2b45e8
                        DO 50 IB = 1, NBET
kusano 2b45e8
                           BETA = BET( IB )
kusano 2b45e8
*
kusano 2b45e8
*                          Generate the matrix C.
kusano 2b45e8
*
kusano 2b45e8
                           CALL ZMAKE( 'GE', ' ', ' ', M, N, C, NMAX,
kusano 2b45e8
     $                                 CC, LDC, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                           NC = NC + 1
kusano 2b45e8
*
kusano 2b45e8
*                          Save every datum before calling the
kusano 2b45e8
*                          subroutine.
kusano 2b45e8
*
kusano 2b45e8
                           TRANAS = TRANSA
kusano 2b45e8
                           TRANBS = TRANSB
kusano 2b45e8
                           MS = M
kusano 2b45e8
                           NS = N
kusano 2b45e8
                           KS = K
kusano 2b45e8
                           ALS = ALPHA
kusano 2b45e8
                           DO 10 I = 1, LAA
kusano 2b45e8
                              AS( I ) = AA( I )
kusano 2b45e8
   10                      CONTINUE
kusano 2b45e8
                           LDAS = LDA
kusano 2b45e8
                           DO 20 I = 1, LBB
kusano 2b45e8
                              BS( I ) = BB( I )
kusano 2b45e8
   20                      CONTINUE
kusano 2b45e8
                           LDBS = LDB
kusano 2b45e8
                           BLS = BETA
kusano 2b45e8
                           DO 30 I = 1, LCC
kusano 2b45e8
                              CS( I ) = CC( I )
kusano 2b45e8
   30                      CONTINUE
kusano 2b45e8
                           LDCS = LDC
kusano 2b45e8
*
kusano 2b45e8
*                          Call the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                           IF( TRACE )
kusano 2b45e8
     $                        WRITE( NTRA, FMT = 9995 )NC, SNAME,
kusano 2b45e8
     $                        TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB,
kusano 2b45e8
     $                        BETA, LDC
kusano 2b45e8
                           IF( REWI )
kusano 2b45e8
     $                        REWIND NTRA
kusano 2b45e8
                           CALL ZGEMM( TRANSA, TRANSB, M, N, K, ALPHA,
kusano 2b45e8
     $                                 AA, LDA, BB, LDB, BETA, CC, LDC )
kusano 2b45e8
*
kusano 2b45e8
*                          Check if error-exit was taken incorrectly.
kusano 2b45e8
*
kusano 2b45e8
                           IF( .NOT.OK )THEN
kusano 2b45e8
                              WRITE( NOUT, FMT = 9994 )
kusano 2b45e8
                              FATAL = .TRUE.
kusano 2b45e8
                              GO TO 120
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
*                          See what data changed inside subroutines.
kusano 2b45e8
*
kusano 2b45e8
                           ISAME( 1 ) = TRANSA.EQ.TRANAS
kusano 2b45e8
                           ISAME( 2 ) = TRANSB.EQ.TRANBS
kusano 2b45e8
                           ISAME( 3 ) = MS.EQ.M
kusano 2b45e8
                           ISAME( 4 ) = NS.EQ.N
kusano 2b45e8
                           ISAME( 5 ) = KS.EQ.K
kusano 2b45e8
                           ISAME( 6 ) = ALS.EQ.ALPHA
kusano 2b45e8
                           ISAME( 7 ) = LZE( AS, AA, LAA )
kusano 2b45e8
                           ISAME( 8 ) = LDAS.EQ.LDA
kusano 2b45e8
                           ISAME( 9 ) = LZE( BS, BB, LBB )
kusano 2b45e8
                           ISAME( 10 ) = LDBS.EQ.LDB
kusano 2b45e8
                           ISAME( 11 ) = BLS.EQ.BETA
kusano 2b45e8
                           IF( NULL )THEN
kusano 2b45e8
                              ISAME( 12 ) = LZE( CS, CC, LCC )
kusano 2b45e8
                           ELSE
kusano 2b45e8
                              ISAME( 12 ) = LZERES( 'GE', ' ', M, N, CS,
kusano 2b45e8
     $                                      CC, LDC )
kusano 2b45e8
                           END IF
kusano 2b45e8
                           ISAME( 13 ) = LDCS.EQ.LDC
kusano 2b45e8
*
kusano 2b45e8
*                          If data was incorrectly changed, report
kusano 2b45e8
*                          and return.
kusano 2b45e8
*
kusano 2b45e8
                           SAME = .TRUE.
kusano 2b45e8
                           DO 40 I = 1, NARGS
kusano 2b45e8
                              SAME = SAME.AND.ISAME( I )
kusano 2b45e8
                              IF( .NOT.ISAME( I ) )
kusano 2b45e8
     $                           WRITE( NOUT, FMT = 9998 )I
kusano 2b45e8
   40                      CONTINUE
kusano 2b45e8
                           IF( .NOT.SAME )THEN
kusano 2b45e8
                              FATAL = .TRUE.
kusano 2b45e8
                              GO TO 120
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
                           IF( .NOT.NULL )THEN
kusano 2b45e8
*
kusano 2b45e8
*                             Check the result.
kusano 2b45e8
*
kusano 2b45e8
                              CALL ZMMCH( TRANSA, TRANSB, M, N, K,
kusano 2b45e8
     $                                    ALPHA, A, NMAX, B, NMAX, BETA,
kusano 2b45e8
     $                                    C, NMAX, CT, G, CC, LDC, EPS,
kusano 2b45e8
     $                                    ERR, FATAL, NOUT, .TRUE. )
kusano 2b45e8
                              ERRMAX = MAX( ERRMAX, ERR )
kusano 2b45e8
*                             If got really bad answer, report and
kusano 2b45e8
*                             return.
kusano 2b45e8
                              IF( FATAL )
kusano 2b45e8
     $                           GO TO 120
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
   50                   CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   60                CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   70             CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   80          CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   90       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  100    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  110 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     Report result.
kusano 2b45e8
*
kusano 2b45e8
      IF( ERRMAX.LT.THRESH )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )SNAME, NC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX
kusano 2b45e8
      END IF
kusano 2b45e8
      GO TO 130
kusano 2b45e8
*
kusano 2b45e8
  120 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9996 )SNAME
kusano 2b45e8
      WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANSA, TRANSB, M, N, K,
kusano 2b45e8
     $   ALPHA, LDA, LDB, BETA, LDC
kusano 2b45e8
*
kusano 2b45e8
  130 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',
kusano 2b45e8
     $      'S)' )
kusano 2b45e8
 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
kusano 2b45e8
     $      'ANGED INCORRECTLY *******' )
kusano 2b45e8
 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',
kusano 2b45e8
     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,
kusano 2b45e8
     $      ' - SUSPECT *******' )
kusano 2b45e8
 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )
kusano 2b45e8
 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',''', A1, ''',',
kusano 2b45e8
     $      3( I3, ',' ), '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3,
kusano 2b45e8
     $      ',(', F4.1, ',', F4.1, '), C,', I3, ').' )
kusano 2b45e8
 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
kusano 2b45e8
     $      '******' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZCHK1.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
kusano 2b45e8
     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
kusano 2b45e8
     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
kusano 2b45e8
*
kusano 2b45e8
*  Tests ZHEMM and ZSYMM.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RZERO
kusano 2b45e8
      PARAMETER          ( RZERO = 0.0D0 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION   EPS, THRESH
kusano 2b45e8
      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA
kusano 2b45e8
      LOGICAL            FATAL, REWI, TRACE
kusano 2b45e8
      CHARACTER*6        SNAME
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
kusano 2b45e8
     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),
kusano 2b45e8
     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),
kusano 2b45e8
     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),
kusano 2b45e8
     $                   CS( NMAX*NMAX ), CT( NMAX )
kusano 2b45e8
      DOUBLE PRECISION   G( NMAX )
kusano 2b45e8
      INTEGER            IDIM( NIDIM )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         ALPHA, ALS, BETA, BLS
kusano 2b45e8
      DOUBLE PRECISION   ERR, ERRMAX
kusano 2b45e8
      INTEGER            I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,
kusano 2b45e8
     $                   LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,
kusano 2b45e8
     $                   NARGS, NC, NS
kusano 2b45e8
      LOGICAL            CONJ, LEFT, NULL, RESET, SAME
kusano 2b45e8
      CHARACTER*1        SIDE, SIDES, UPLO, UPLOS
kusano 2b45e8
      CHARACTER*2        ICHS, ICHU
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      LOGICAL            ISAME( 13 )
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      LOGICAL            LZE, LZERES
kusano 2b45e8
      EXTERNAL           LZE, LZERES
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZHEMM, ZMAKE, ZMMCH, ZSYMM
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          MAX
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA               ICHS/'LR'/, ICHU/'UL'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      CONJ = SNAME( 2: 3 ).EQ.'HE'
kusano 2b45e8
*
kusano 2b45e8
      NARGS = 12
kusano 2b45e8
      NC = 0
kusano 2b45e8
      RESET = .TRUE.
kusano 2b45e8
      ERRMAX = RZERO
kusano 2b45e8
*
kusano 2b45e8
      DO 100 IM = 1, NIDIM
kusano 2b45e8
         M = IDIM( IM )
kusano 2b45e8
*
kusano 2b45e8
         DO 90 IN = 1, NIDIM
kusano 2b45e8
            N = IDIM( IN )
kusano 2b45e8
*           Set LDC to 1 more than minimum value if room.
kusano 2b45e8
            LDC = M
kusano 2b45e8
            IF( LDC.LT.NMAX )
kusano 2b45e8
     $         LDC = LDC + 1
kusano 2b45e8
*           Skip tests if not enough room.
kusano 2b45e8
            IF( LDC.GT.NMAX )
kusano 2b45e8
     $         GO TO 90
kusano 2b45e8
            LCC = LDC*N
kusano 2b45e8
            NULL = N.LE.0.OR.M.LE.0
kusano 2b45e8
*           Set LDB to 1 more than minimum value if room.
kusano 2b45e8
            LDB = M
kusano 2b45e8
            IF( LDB.LT.NMAX )
kusano 2b45e8
     $         LDB = LDB + 1
kusano 2b45e8
*           Skip tests if not enough room.
kusano 2b45e8
            IF( LDB.GT.NMAX )
kusano 2b45e8
     $         GO TO 90
kusano 2b45e8
            LBB = LDB*N
kusano 2b45e8
*
kusano 2b45e8
*           Generate the matrix B.
kusano 2b45e8
*
kusano 2b45e8
            CALL ZMAKE( 'GE', ' ', ' ', M, N, B, NMAX, BB, LDB, RESET,
kusano 2b45e8
     $                  ZERO )
kusano 2b45e8
*
kusano 2b45e8
            DO 80 ICS = 1, 2
kusano 2b45e8
               SIDE = ICHS( ICS: ICS )
kusano 2b45e8
               LEFT = SIDE.EQ.'L'
kusano 2b45e8
*
kusano 2b45e8
               IF( LEFT )THEN
kusano 2b45e8
                  NA = M
kusano 2b45e8
               ELSE
kusano 2b45e8
                  NA = N
kusano 2b45e8
               END IF
kusano 2b45e8
*              Set LDA to 1 more than minimum value if room.
kusano 2b45e8
               LDA = NA
kusano 2b45e8
               IF( LDA.LT.NMAX )
kusano 2b45e8
     $            LDA = LDA + 1
kusano 2b45e8
*              Skip tests if not enough room.
kusano 2b45e8
               IF( LDA.GT.NMAX )
kusano 2b45e8
     $            GO TO 80
kusano 2b45e8
               LAA = LDA*NA
kusano 2b45e8
*
kusano 2b45e8
               DO 70 ICU = 1, 2
kusano 2b45e8
                  UPLO = ICHU( ICU: ICU )
kusano 2b45e8
*
kusano 2b45e8
*                 Generate the hermitian or symmetric matrix A.
kusano 2b45e8
*
kusano 2b45e8
                  CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', NA, NA, A, NMAX,
kusano 2b45e8
     $                        AA, LDA, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                  DO 60 IA = 1, NALF
kusano 2b45e8
                     ALPHA = ALF( IA )
kusano 2b45e8
*
kusano 2b45e8
                     DO 50 IB = 1, NBET
kusano 2b45e8
                        BETA = BET( IB )
kusano 2b45e8
*
kusano 2b45e8
*                       Generate the matrix C.
kusano 2b45e8
*
kusano 2b45e8
                        CALL ZMAKE( 'GE', ' ', ' ', M, N, C, NMAX, CC,
kusano 2b45e8
     $                              LDC, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                        NC = NC + 1
kusano 2b45e8
*
kusano 2b45e8
*                       Save every datum before calling the
kusano 2b45e8
*                       subroutine.
kusano 2b45e8
*
kusano 2b45e8
                        SIDES = SIDE
kusano 2b45e8
                        UPLOS = UPLO
kusano 2b45e8
                        MS = M
kusano 2b45e8
                        NS = N
kusano 2b45e8
                        ALS = ALPHA
kusano 2b45e8
                        DO 10 I = 1, LAA
kusano 2b45e8
                           AS( I ) = AA( I )
kusano 2b45e8
   10                   CONTINUE
kusano 2b45e8
                        LDAS = LDA
kusano 2b45e8
                        DO 20 I = 1, LBB
kusano 2b45e8
                           BS( I ) = BB( I )
kusano 2b45e8
   20                   CONTINUE
kusano 2b45e8
                        LDBS = LDB
kusano 2b45e8
                        BLS = BETA
kusano 2b45e8
                        DO 30 I = 1, LCC
kusano 2b45e8
                           CS( I ) = CC( I )
kusano 2b45e8
   30                   CONTINUE
kusano 2b45e8
                        LDCS = LDC
kusano 2b45e8
*
kusano 2b45e8
*                       Call the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                        IF( TRACE )
kusano 2b45e8
     $                     WRITE( NTRA, FMT = 9995 )NC, SNAME, SIDE,
kusano 2b45e8
     $                     UPLO, M, N, ALPHA, LDA, LDB, BETA, LDC
kusano 2b45e8
                        IF( REWI )
kusano 2b45e8
     $                     REWIND NTRA
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           CALL ZHEMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,
kusano 2b45e8
     $                                 BB, LDB, BETA, CC, LDC )
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           CALL ZSYMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,
kusano 2b45e8
     $                                 BB, LDB, BETA, CC, LDC )
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
*                       Check if error-exit was taken incorrectly.
kusano 2b45e8
*
kusano 2b45e8
                        IF( .NOT.OK )THEN
kusano 2b45e8
                           WRITE( NOUT, FMT = 9994 )
kusano 2b45e8
                           FATAL = .TRUE.
kusano 2b45e8
                           GO TO 110
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
*                       See what data changed inside subroutines.
kusano 2b45e8
*
kusano 2b45e8
                        ISAME( 1 ) = SIDES.EQ.SIDE
kusano 2b45e8
                        ISAME( 2 ) = UPLOS.EQ.UPLO
kusano 2b45e8
                        ISAME( 3 ) = MS.EQ.M
kusano 2b45e8
                        ISAME( 4 ) = NS.EQ.N
kusano 2b45e8
                        ISAME( 5 ) = ALS.EQ.ALPHA
kusano 2b45e8
                        ISAME( 6 ) = LZE( AS, AA, LAA )
kusano 2b45e8
                        ISAME( 7 ) = LDAS.EQ.LDA
kusano 2b45e8
                        ISAME( 8 ) = LZE( BS, BB, LBB )
kusano 2b45e8
                        ISAME( 9 ) = LDBS.EQ.LDB
kusano 2b45e8
                        ISAME( 10 ) = BLS.EQ.BETA
kusano 2b45e8
                        IF( NULL )THEN
kusano 2b45e8
                           ISAME( 11 ) = LZE( CS, CC, LCC )
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ISAME( 11 ) = LZERES( 'GE', ' ', M, N, CS,
kusano 2b45e8
     $                                   CC, LDC )
kusano 2b45e8
                        END IF
kusano 2b45e8
                        ISAME( 12 ) = LDCS.EQ.LDC
kusano 2b45e8
*
kusano 2b45e8
*                       If data was incorrectly changed, report and
kusano 2b45e8
*                       return.
kusano 2b45e8
*
kusano 2b45e8
                        SAME = .TRUE.
kusano 2b45e8
                        DO 40 I = 1, NARGS
kusano 2b45e8
                           SAME = SAME.AND.ISAME( I )
kusano 2b45e8
                           IF( .NOT.ISAME( I ) )
kusano 2b45e8
     $                        WRITE( NOUT, FMT = 9998 )I
kusano 2b45e8
   40                   CONTINUE
kusano 2b45e8
                        IF( .NOT.SAME )THEN
kusano 2b45e8
                           FATAL = .TRUE.
kusano 2b45e8
                           GO TO 110
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
                        IF( .NOT.NULL )THEN
kusano 2b45e8
*
kusano 2b45e8
*                          Check the result.
kusano 2b45e8
*
kusano 2b45e8
                           IF( LEFT )THEN
kusano 2b45e8
                              CALL ZMMCH( 'N', 'N', M, N, M, ALPHA, A,
kusano 2b45e8
     $                                    NMAX, B, NMAX, BETA, C, NMAX,
kusano 2b45e8
     $                                    CT, G, CC, LDC, EPS, ERR,
kusano 2b45e8
     $                                    FATAL, NOUT, .TRUE. )
kusano 2b45e8
                           ELSE
kusano 2b45e8
                              CALL ZMMCH( 'N', 'N', M, N, N, ALPHA, B,
kusano 2b45e8
     $                                    NMAX, A, NMAX, BETA, C, NMAX,
kusano 2b45e8
     $                                    CT, G, CC, LDC, EPS, ERR,
kusano 2b45e8
     $                                    FATAL, NOUT, .TRUE. )
kusano 2b45e8
                           END IF
kusano 2b45e8
                           ERRMAX = MAX( ERRMAX, ERR )
kusano 2b45e8
*                          If got really bad answer, report and
kusano 2b45e8
*                          return.
kusano 2b45e8
                           IF( FATAL )
kusano 2b45e8
     $                        GO TO 110
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
   50                CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   60             CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   70          CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   80       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   90    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  100 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     Report result.
kusano 2b45e8
*
kusano 2b45e8
      IF( ERRMAX.LT.THRESH )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )SNAME, NC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX
kusano 2b45e8
      END IF
kusano 2b45e8
      GO TO 120
kusano 2b45e8
*
kusano 2b45e8
  110 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9996 )SNAME
kusano 2b45e8
      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, M, N, ALPHA, LDA,
kusano 2b45e8
     $   LDB, BETA, LDC
kusano 2b45e8
*
kusano 2b45e8
  120 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',
kusano 2b45e8
     $      'S)' )
kusano 2b45e8
 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
kusano 2b45e8
     $      'ANGED INCORRECTLY *******' )
kusano 2b45e8
 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',
kusano 2b45e8
     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,
kusano 2b45e8
     $      ' - SUSPECT *******' )
kusano 2b45e8
 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )
kusano 2b45e8
 9995 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),
kusano 2b45e8
     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',(', F4.1,
kusano 2b45e8
     $      ',', F4.1, '), C,', I3, ')    .' )
kusano 2b45e8
 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
kusano 2b45e8
     $      '******' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZCHK2.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
kusano 2b45e8
     $                  FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,
kusano 2b45e8
     $                  B, BB, BS, CT, G, C )
kusano 2b45e8
*
kusano 2b45e8
*  Tests ZTRMM and ZTRSM.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO, ONE
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),
kusano 2b45e8
     $                   ONE = ( 1.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RZERO
kusano 2b45e8
      PARAMETER          ( RZERO = 0.0D0 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION   EPS, THRESH
kusano 2b45e8
      INTEGER            NALF, NIDIM, NMAX, NOUT, NTRA
kusano 2b45e8
      LOGICAL            FATAL, REWI, TRACE
kusano 2b45e8
      CHARACTER*6        SNAME
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
kusano 2b45e8
     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),
kusano 2b45e8
     $                   BB( NMAX*NMAX ), BS( NMAX*NMAX ),
kusano 2b45e8
     $                   C( NMAX, NMAX ), CT( NMAX )
kusano 2b45e8
      DOUBLE PRECISION   G( NMAX )
kusano 2b45e8
      INTEGER            IDIM( NIDIM )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         ALPHA, ALS
kusano 2b45e8
      DOUBLE PRECISION   ERR, ERRMAX
kusano 2b45e8
      INTEGER            I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,
kusano 2b45e8
     $                   LDA, LDAS, LDB, LDBS, M, MS, N, NA, NARGS, NC,
kusano 2b45e8
     $                   NS
kusano 2b45e8
      LOGICAL            LEFT, NULL, RESET, SAME
kusano 2b45e8
      CHARACTER*1        DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,
kusano 2b45e8
     $                   UPLOS
kusano 2b45e8
      CHARACTER*2        ICHD, ICHS, ICHU
kusano 2b45e8
      CHARACTER*3        ICHT
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      LOGICAL            ISAME( 13 )
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      LOGICAL            LZE, LZERES
kusano 2b45e8
      EXTERNAL           LZE, LZERES
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZMAKE, ZMMCH, ZTRMM, ZTRSM
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          MAX
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/, ICHS/'LR'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      NARGS = 11
kusano 2b45e8
      NC = 0
kusano 2b45e8
      RESET = .TRUE.
kusano 2b45e8
      ERRMAX = RZERO
kusano 2b45e8
*     Set up zero matrix for ZMMCH.
kusano 2b45e8
      DO 20 J = 1, NMAX
kusano 2b45e8
         DO 10 I = 1, NMAX
kusano 2b45e8
            C( I, J ) = ZERO
kusano 2b45e8
   10    CONTINUE
kusano 2b45e8
   20 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
      DO 140 IM = 1, NIDIM
kusano 2b45e8
         M = IDIM( IM )
kusano 2b45e8
*
kusano 2b45e8
         DO 130 IN = 1, NIDIM
kusano 2b45e8
            N = IDIM( IN )
kusano 2b45e8
*           Set LDB to 1 more than minimum value if room.
kusano 2b45e8
            LDB = M
kusano 2b45e8
            IF( LDB.LT.NMAX )
kusano 2b45e8
     $         LDB = LDB + 1
kusano 2b45e8
*           Skip tests if not enough room.
kusano 2b45e8
            IF( LDB.GT.NMAX )
kusano 2b45e8
     $         GO TO 130
kusano 2b45e8
            LBB = LDB*N
kusano 2b45e8
            NULL = M.LE.0.OR.N.LE.0
kusano 2b45e8
*
kusano 2b45e8
            DO 120 ICS = 1, 2
kusano 2b45e8
               SIDE = ICHS( ICS: ICS )
kusano 2b45e8
               LEFT = SIDE.EQ.'L'
kusano 2b45e8
               IF( LEFT )THEN
kusano 2b45e8
                  NA = M
kusano 2b45e8
               ELSE
kusano 2b45e8
                  NA = N
kusano 2b45e8
               END IF
kusano 2b45e8
*              Set LDA to 1 more than minimum value if room.
kusano 2b45e8
               LDA = NA
kusano 2b45e8
               IF( LDA.LT.NMAX )
kusano 2b45e8
     $            LDA = LDA + 1
kusano 2b45e8
*              Skip tests if not enough room.
kusano 2b45e8
               IF( LDA.GT.NMAX )
kusano 2b45e8
     $            GO TO 130
kusano 2b45e8
               LAA = LDA*NA
kusano 2b45e8
*
kusano 2b45e8
               DO 110 ICU = 1, 2
kusano 2b45e8
                  UPLO = ICHU( ICU: ICU )
kusano 2b45e8
*
kusano 2b45e8
                  DO 100 ICT = 1, 3
kusano 2b45e8
                     TRANSA = ICHT( ICT: ICT )
kusano 2b45e8
*
kusano 2b45e8
                     DO 90 ICD = 1, 2
kusano 2b45e8
                        DIAG = ICHD( ICD: ICD )
kusano 2b45e8
*
kusano 2b45e8
                        DO 80 IA = 1, NALF
kusano 2b45e8
                           ALPHA = ALF( IA )
kusano 2b45e8
*
kusano 2b45e8
*                          Generate the matrix A.
kusano 2b45e8
*
kusano 2b45e8
                           CALL ZMAKE( 'TR', UPLO, DIAG, NA, NA, A,
kusano 2b45e8
     $                                 NMAX, AA, LDA, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
*                          Generate the matrix B.
kusano 2b45e8
*
kusano 2b45e8
                           CALL ZMAKE( 'GE', ' ', ' ', M, N, B, NMAX,
kusano 2b45e8
     $                                 BB, LDB, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                           NC = NC + 1
kusano 2b45e8
*
kusano 2b45e8
*                          Save every datum before calling the
kusano 2b45e8
*                          subroutine.
kusano 2b45e8
*
kusano 2b45e8
                           SIDES = SIDE
kusano 2b45e8
                           UPLOS = UPLO
kusano 2b45e8
                           TRANAS = TRANSA
kusano 2b45e8
                           DIAGS = DIAG
kusano 2b45e8
                           MS = M
kusano 2b45e8
                           NS = N
kusano 2b45e8
                           ALS = ALPHA
kusano 2b45e8
                           DO 30 I = 1, LAA
kusano 2b45e8
                              AS( I ) = AA( I )
kusano 2b45e8
   30                      CONTINUE
kusano 2b45e8
                           LDAS = LDA
kusano 2b45e8
                           DO 40 I = 1, LBB
kusano 2b45e8
                              BS( I ) = BB( I )
kusano 2b45e8
   40                      CONTINUE
kusano 2b45e8
                           LDBS = LDB
kusano 2b45e8
*
kusano 2b45e8
*                          Call the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                           IF( SNAME( 4: 5 ).EQ.'MM' )THEN
kusano 2b45e8
                              IF( TRACE )
kusano 2b45e8
     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,
kusano 2b45e8
     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,
kusano 2b45e8
     $                           LDA, LDB
kusano 2b45e8
                              IF( REWI )
kusano 2b45e8
     $                           REWIND NTRA
kusano 2b45e8
                              CALL ZTRMM( SIDE, UPLO, TRANSA, DIAG, M,
kusano 2b45e8
     $                                    N, ALPHA, AA, LDA, BB, LDB )
kusano 2b45e8
                           ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN
kusano 2b45e8
                              IF( TRACE )
kusano 2b45e8
     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,
kusano 2b45e8
     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,
kusano 2b45e8
     $                           LDA, LDB
kusano 2b45e8
                              IF( REWI )
kusano 2b45e8
     $                           REWIND NTRA
kusano 2b45e8
                              CALL ZTRSM( SIDE, UPLO, TRANSA, DIAG, M,
kusano 2b45e8
     $                                    N, ALPHA, AA, LDA, BB, LDB )
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
*                          Check if error-exit was taken incorrectly.
kusano 2b45e8
*
kusano 2b45e8
                           IF( .NOT.OK )THEN
kusano 2b45e8
                              WRITE( NOUT, FMT = 9994 )
kusano 2b45e8
                              FATAL = .TRUE.
kusano 2b45e8
                              GO TO 150
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
*                          See what data changed inside subroutines.
kusano 2b45e8
*
kusano 2b45e8
                           ISAME( 1 ) = SIDES.EQ.SIDE
kusano 2b45e8
                           ISAME( 2 ) = UPLOS.EQ.UPLO
kusano 2b45e8
                           ISAME( 3 ) = TRANAS.EQ.TRANSA
kusano 2b45e8
                           ISAME( 4 ) = DIAGS.EQ.DIAG
kusano 2b45e8
                           ISAME( 5 ) = MS.EQ.M
kusano 2b45e8
                           ISAME( 6 ) = NS.EQ.N
kusano 2b45e8
                           ISAME( 7 ) = ALS.EQ.ALPHA
kusano 2b45e8
                           ISAME( 8 ) = LZE( AS, AA, LAA )
kusano 2b45e8
                           ISAME( 9 ) = LDAS.EQ.LDA
kusano 2b45e8
                           IF( NULL )THEN
kusano 2b45e8
                              ISAME( 10 ) = LZE( BS, BB, LBB )
kusano 2b45e8
                           ELSE
kusano 2b45e8
                              ISAME( 10 ) = LZERES( 'GE', ' ', M, N, BS,
kusano 2b45e8
     $                                      BB, LDB )
kusano 2b45e8
                           END IF
kusano 2b45e8
                           ISAME( 11 ) = LDBS.EQ.LDB
kusano 2b45e8
*
kusano 2b45e8
*                          If data was incorrectly changed, report and
kusano 2b45e8
*                          return.
kusano 2b45e8
*
kusano 2b45e8
                           SAME = .TRUE.
kusano 2b45e8
                           DO 50 I = 1, NARGS
kusano 2b45e8
                              SAME = SAME.AND.ISAME( I )
kusano 2b45e8
                              IF( .NOT.ISAME( I ) )
kusano 2b45e8
     $                           WRITE( NOUT, FMT = 9998 )I
kusano 2b45e8
   50                      CONTINUE
kusano 2b45e8
                           IF( .NOT.SAME )THEN
kusano 2b45e8
                              FATAL = .TRUE.
kusano 2b45e8
                              GO TO 150
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
                           IF( .NOT.NULL )THEN
kusano 2b45e8
                              IF( SNAME( 4: 5 ).EQ.'MM' )THEN
kusano 2b45e8
*
kusano 2b45e8
*                                Check the result.
kusano 2b45e8
*
kusano 2b45e8
                                 IF( LEFT )THEN
kusano 2b45e8
                                    CALL ZMMCH( TRANSA, 'N', M, N, M,
kusano 2b45e8
     $                                          ALPHA, A, NMAX, B, NMAX,
kusano 2b45e8
     $                                          ZERO, C, NMAX, CT, G,
kusano 2b45e8
     $                                          BB, LDB, EPS, ERR,
kusano 2b45e8
     $                                          FATAL, NOUT, .TRUE. )
kusano 2b45e8
                                 ELSE
kusano 2b45e8
                                    CALL ZMMCH( 'N', TRANSA, M, N, N,
kusano 2b45e8
     $                                          ALPHA, B, NMAX, A, NMAX,
kusano 2b45e8
     $                                          ZERO, C, NMAX, CT, G,
kusano 2b45e8
     $                                          BB, LDB, EPS, ERR,
kusano 2b45e8
     $                                          FATAL, NOUT, .TRUE. )
kusano 2b45e8
                                 END IF
kusano 2b45e8
                              ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN
kusano 2b45e8
*
kusano 2b45e8
*                                Compute approximation to original
kusano 2b45e8
*                                matrix.
kusano 2b45e8
*
kusano 2b45e8
                                 DO 70 J = 1, N
kusano 2b45e8
                                    DO 60 I = 1, M
kusano 2b45e8
                                       C( I, J ) = BB( I + ( J - 1 )*
kusano 2b45e8
     $                                             LDB )
kusano 2b45e8
                                       BB( I + ( J - 1 )*LDB ) = ALPHA*
kusano 2b45e8
     $                                    B( I, J )
kusano 2b45e8
   60                               CONTINUE
kusano 2b45e8
   70                            CONTINUE
kusano 2b45e8
*
kusano 2b45e8
                                 IF( LEFT )THEN
kusano 2b45e8
                                    CALL ZMMCH( TRANSA, 'N', M, N, M,
kusano 2b45e8
     $                                          ONE, A, NMAX, C, NMAX,
kusano 2b45e8
     $                                          ZERO, B, NMAX, CT, G,
kusano 2b45e8
     $                                          BB, LDB, EPS, ERR,
kusano 2b45e8
     $                                          FATAL, NOUT, .FALSE. )
kusano 2b45e8
                                 ELSE
kusano 2b45e8
                                    CALL ZMMCH( 'N', TRANSA, M, N, N,
kusano 2b45e8
     $                                          ONE, C, NMAX, A, NMAX,
kusano 2b45e8
     $                                          ZERO, B, NMAX, CT, G,
kusano 2b45e8
     $                                          BB, LDB, EPS, ERR,
kusano 2b45e8
     $                                          FATAL, NOUT, .FALSE. )
kusano 2b45e8
                                 END IF
kusano 2b45e8
                              END IF
kusano 2b45e8
                              ERRMAX = MAX( ERRMAX, ERR )
kusano 2b45e8
*                             If got really bad answer, report and
kusano 2b45e8
*                             return.
kusano 2b45e8
                              IF( FATAL )
kusano 2b45e8
     $                           GO TO 150
kusano 2b45e8
                           END IF
kusano 2b45e8
*
kusano 2b45e8
   80                   CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   90                CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  100             CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  110          CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  120       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  130    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  140 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     Report result.
kusano 2b45e8
*
kusano 2b45e8
      IF( ERRMAX.LT.THRESH )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )SNAME, NC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX
kusano 2b45e8
      END IF
kusano 2b45e8
      GO TO 160
kusano 2b45e8
*
kusano 2b45e8
  150 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9996 )SNAME
kusano 2b45e8
      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, TRANSA, DIAG, M,
kusano 2b45e8
     $   N, ALPHA, LDA, LDB
kusano 2b45e8
*
kusano 2b45e8
  160 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',
kusano 2b45e8
     $      'S)' )
kusano 2b45e8
 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
kusano 2b45e8
     $      'ANGED INCORRECTLY *******' )
kusano 2b45e8
 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',
kusano 2b45e8
     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,
kusano 2b45e8
     $      ' - SUSPECT *******' )
kusano 2b45e8
 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )
kusano 2b45e8
 9995 FORMAT( 1X, I6, ': ', A6, '(', 4( '''', A1, ''',' ), 2( I3, ',' ),
kusano 2b45e8
     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ')         ',
kusano 2b45e8
     $      '      .' )
kusano 2b45e8
 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
kusano 2b45e8
     $      '******' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZCHK3.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
kusano 2b45e8
     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
kusano 2b45e8
     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
kusano 2b45e8
*
kusano 2b45e8
*  Tests ZHERK and ZSYRK.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RONE, RZERO
kusano 2b45e8
      PARAMETER          ( RONE = 1.0D0, RZERO = 0.0D0 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION   EPS, THRESH
kusano 2b45e8
      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA
kusano 2b45e8
      LOGICAL            FATAL, REWI, TRACE
kusano 2b45e8
      CHARACTER*6        SNAME
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
kusano 2b45e8
     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),
kusano 2b45e8
     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),
kusano 2b45e8
     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),
kusano 2b45e8
     $                   CS( NMAX*NMAX ), CT( NMAX )
kusano 2b45e8
      DOUBLE PRECISION   G( NMAX )
kusano 2b45e8
      INTEGER            IDIM( NIDIM )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         ALPHA, ALS, BETA, BETS
kusano 2b45e8
      DOUBLE PRECISION   ERR, ERRMAX, RALPHA, RALS, RBETA, RBETS
kusano 2b45e8
      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,
kusano 2b45e8
     $                   LAA, LCC, LDA, LDAS, LDC, LDCS, LJ, MA, N, NA,
kusano 2b45e8
     $                   NARGS, NC, NS
kusano 2b45e8
      LOGICAL            CONJ, NULL, RESET, SAME, TRAN, UPPER
kusano 2b45e8
      CHARACTER*1        TRANS, TRANSS, TRANST, UPLO, UPLOS
kusano 2b45e8
      CHARACTER*2        ICHT, ICHU
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      LOGICAL            ISAME( 13 )
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      LOGICAL            LZE, LZERES
kusano 2b45e8
      EXTERNAL           LZE, LZERES
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZHERK, ZMAKE, ZMMCH, ZSYRK
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          DCMPLX, MAX, DBLE
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA               ICHT/'NC'/, ICHU/'UL'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      CONJ = SNAME( 2: 3 ).EQ.'HE'
kusano 2b45e8
*
kusano 2b45e8
      NARGS = 10
kusano 2b45e8
      NC = 0
kusano 2b45e8
      RESET = .TRUE.
kusano 2b45e8
      ERRMAX = RZERO
kusano 2b45e8
      RALS = RONE
kusano 2b45e8
      RBETS = RONE
kusano 2b45e8
*
kusano 2b45e8
      DO 100 IN = 1, NIDIM
kusano 2b45e8
         N = IDIM( IN )
kusano 2b45e8
*        Set LDC to 1 more than minimum value if room.
kusano 2b45e8
         LDC = N
kusano 2b45e8
         IF( LDC.LT.NMAX )
kusano 2b45e8
     $      LDC = LDC + 1
kusano 2b45e8
*        Skip tests if not enough room.
kusano 2b45e8
         IF( LDC.GT.NMAX )
kusano 2b45e8
     $      GO TO 100
kusano 2b45e8
         LCC = LDC*N
kusano 2b45e8
*
kusano 2b45e8
         DO 90 IK = 1, NIDIM
kusano 2b45e8
            K = IDIM( IK )
kusano 2b45e8
*
kusano 2b45e8
            DO 80 ICT = 1, 2
kusano 2b45e8
               TRANS = ICHT( ICT: ICT )
kusano 2b45e8
               TRAN = TRANS.EQ.'C'
kusano 2b45e8
               IF( TRAN.AND..NOT.CONJ )
kusano 2b45e8
     $            TRANS = 'T'
kusano 2b45e8
               IF( TRAN )THEN
kusano 2b45e8
                  MA = K
kusano 2b45e8
                  NA = N
kusano 2b45e8
               ELSE
kusano 2b45e8
                  MA = N
kusano 2b45e8
                  NA = K
kusano 2b45e8
               END IF
kusano 2b45e8
*              Set LDA to 1 more than minimum value if room.
kusano 2b45e8
               LDA = MA
kusano 2b45e8
               IF( LDA.LT.NMAX )
kusano 2b45e8
     $            LDA = LDA + 1
kusano 2b45e8
*              Skip tests if not enough room.
kusano 2b45e8
               IF( LDA.GT.NMAX )
kusano 2b45e8
     $            GO TO 80
kusano 2b45e8
               LAA = LDA*NA
kusano 2b45e8
*
kusano 2b45e8
*              Generate the matrix A.
kusano 2b45e8
*
kusano 2b45e8
               CALL ZMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,
kusano 2b45e8
     $                     RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
               DO 70 ICU = 1, 2
kusano 2b45e8
                  UPLO = ICHU( ICU: ICU )
kusano 2b45e8
                  UPPER = UPLO.EQ.'U'
kusano 2b45e8
*
kusano 2b45e8
                  DO 60 IA = 1, NALF
kusano 2b45e8
                     ALPHA = ALF( IA )
kusano 2b45e8
                     IF( CONJ )THEN
kusano 2b45e8
                        RALPHA = DBLE( ALPHA )
kusano 2b45e8
                        ALPHA = DCMPLX( RALPHA, RZERO )
kusano 2b45e8
                     END IF
kusano 2b45e8
*
kusano 2b45e8
                     DO 50 IB = 1, NBET
kusano 2b45e8
                        BETA = BET( IB )
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           RBETA = DBLE( BETA )
kusano 2b45e8
                           BETA = DCMPLX( RBETA, RZERO )
kusano 2b45e8
                        END IF
kusano 2b45e8
                        NULL = N.LE.0
kusano 2b45e8
                        IF( CONJ )
kusano 2b45e8
     $                     NULL = NULL.OR.( ( K.LE.0.OR.RALPHA.EQ.
kusano 2b45e8
     $                            RZERO ).AND.RBETA.EQ.RONE )
kusano 2b45e8
*
kusano 2b45e8
*                       Generate the matrix C.
kusano 2b45e8
*
kusano 2b45e8
                        CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, C,
kusano 2b45e8
     $                              NMAX, CC, LDC, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                        NC = NC + 1
kusano 2b45e8
*
kusano 2b45e8
*                       Save every datum before calling the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                        UPLOS = UPLO
kusano 2b45e8
                        TRANSS = TRANS
kusano 2b45e8
                        NS = N
kusano 2b45e8
                        KS = K
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           RALS = RALPHA
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ALS = ALPHA
kusano 2b45e8
                        END IF
kusano 2b45e8
                        DO 10 I = 1, LAA
kusano 2b45e8
                           AS( I ) = AA( I )
kusano 2b45e8
   10                   CONTINUE
kusano 2b45e8
                        LDAS = LDA
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           RBETS = RBETA
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           BETS = BETA
kusano 2b45e8
                        END IF
kusano 2b45e8
                        DO 20 I = 1, LCC
kusano 2b45e8
                           CS( I ) = CC( I )
kusano 2b45e8
   20                   CONTINUE
kusano 2b45e8
                        LDCS = LDC
kusano 2b45e8
*
kusano 2b45e8
*                       Call the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           IF( TRACE )
kusano 2b45e8
     $                        WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,
kusano 2b45e8
     $                        TRANS, N, K, RALPHA, LDA, RBETA, LDC
kusano 2b45e8
                           IF( REWI )
kusano 2b45e8
     $                        REWIND NTRA
kusano 2b45e8
                           CALL ZHERK( UPLO, TRANS, N, K, RALPHA, AA,
kusano 2b45e8
     $                                 LDA, RBETA, CC, LDC )
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           IF( TRACE )
kusano 2b45e8
     $                        WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO,
kusano 2b45e8
     $                        TRANS, N, K, ALPHA, LDA, BETA, LDC
kusano 2b45e8
                           IF( REWI )
kusano 2b45e8
     $                        REWIND NTRA
kusano 2b45e8
                           CALL ZSYRK( UPLO, TRANS, N, K, ALPHA, AA,
kusano 2b45e8
     $                                 LDA, BETA, CC, LDC )
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
*                       Check if error-exit was taken incorrectly.
kusano 2b45e8
*
kusano 2b45e8
                        IF( .NOT.OK )THEN
kusano 2b45e8
                           WRITE( NOUT, FMT = 9992 )
kusano 2b45e8
                           FATAL = .TRUE.
kusano 2b45e8
                           GO TO 120
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
*                       See what data changed inside subroutines.
kusano 2b45e8
*
kusano 2b45e8
                        ISAME( 1 ) = UPLOS.EQ.UPLO
kusano 2b45e8
                        ISAME( 2 ) = TRANSS.EQ.TRANS
kusano 2b45e8
                        ISAME( 3 ) = NS.EQ.N
kusano 2b45e8
                        ISAME( 4 ) = KS.EQ.K
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           ISAME( 5 ) = RALS.EQ.RALPHA
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ISAME( 5 ) = ALS.EQ.ALPHA
kusano 2b45e8
                        END IF
kusano 2b45e8
                        ISAME( 6 ) = LZE( AS, AA, LAA )
kusano 2b45e8
                        ISAME( 7 ) = LDAS.EQ.LDA
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           ISAME( 8 ) = RBETS.EQ.RBETA
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ISAME( 8 ) = BETS.EQ.BETA
kusano 2b45e8
                        END IF
kusano 2b45e8
                        IF( NULL )THEN
kusano 2b45e8
                           ISAME( 9 ) = LZE( CS, CC, LCC )
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ISAME( 9 ) = LZERES( SNAME( 2: 3 ), UPLO, N,
kusano 2b45e8
     $                                  N, CS, CC, LDC )
kusano 2b45e8
                        END IF
kusano 2b45e8
                        ISAME( 10 ) = LDCS.EQ.LDC
kusano 2b45e8
*
kusano 2b45e8
*                       If data was incorrectly changed, report and
kusano 2b45e8
*                       return.
kusano 2b45e8
*
kusano 2b45e8
                        SAME = .TRUE.
kusano 2b45e8
                        DO 30 I = 1, NARGS
kusano 2b45e8
                           SAME = SAME.AND.ISAME( I )
kusano 2b45e8
                           IF( .NOT.ISAME( I ) )
kusano 2b45e8
     $                        WRITE( NOUT, FMT = 9998 )I
kusano 2b45e8
   30                   CONTINUE
kusano 2b45e8
                        IF( .NOT.SAME )THEN
kusano 2b45e8
                           FATAL = .TRUE.
kusano 2b45e8
                           GO TO 120
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
                        IF( .NOT.NULL )THEN
kusano 2b45e8
*
kusano 2b45e8
*                          Check the result column by column.
kusano 2b45e8
*
kusano 2b45e8
                           IF( CONJ )THEN
kusano 2b45e8
                              TRANST = 'C'
kusano 2b45e8
                           ELSE
kusano 2b45e8
                              TRANST = 'T'
kusano 2b45e8
                           END IF
kusano 2b45e8
                           JC = 1
kusano 2b45e8
                           DO 40 J = 1, N
kusano 2b45e8
                              IF( UPPER )THEN
kusano 2b45e8
                                 JJ = 1
kusano 2b45e8
                                 LJ = J
kusano 2b45e8
                              ELSE
kusano 2b45e8
                                 JJ = J
kusano 2b45e8
                                 LJ = N - J + 1
kusano 2b45e8
                              END IF
kusano 2b45e8
                              IF( TRAN )THEN
kusano 2b45e8
                                 CALL ZMMCH( TRANST, 'N', LJ, 1, K,
kusano 2b45e8
     $                                       ALPHA, A( 1, JJ ), NMAX,
kusano 2b45e8
     $                                       A( 1, J ), NMAX, BETA,
kusano 2b45e8
     $                                       C( JJ, J ), NMAX, CT, G,
kusano 2b45e8
     $                                       CC( JC ), LDC, EPS, ERR,
kusano 2b45e8
     $                                       FATAL, NOUT, .TRUE. )
kusano 2b45e8
                              ELSE
kusano 2b45e8
                                 CALL ZMMCH( 'N', TRANST, LJ, 1, K,
kusano 2b45e8
     $                                       ALPHA, A( JJ, 1 ), NMAX,
kusano 2b45e8
     $                                       A( J, 1 ), NMAX, BETA,
kusano 2b45e8
     $                                       C( JJ, J ), NMAX, CT, G,
kusano 2b45e8
     $                                       CC( JC ), LDC, EPS, ERR,
kusano 2b45e8
     $                                       FATAL, NOUT, .TRUE. )
kusano 2b45e8
                              END IF
kusano 2b45e8
                              IF( UPPER )THEN
kusano 2b45e8
                                 JC = JC + LDC
kusano 2b45e8
                              ELSE
kusano 2b45e8
                                 JC = JC + LDC + 1
kusano 2b45e8
                              END IF
kusano 2b45e8
                              ERRMAX = MAX( ERRMAX, ERR )
kusano 2b45e8
*                             If got really bad answer, report and
kusano 2b45e8
*                             return.
kusano 2b45e8
                              IF( FATAL )
kusano 2b45e8
     $                           GO TO 110
kusano 2b45e8
   40                      CONTINUE
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
   50                CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   60             CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   70          CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   80       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   90    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  100 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     Report result.
kusano 2b45e8
*
kusano 2b45e8
      IF( ERRMAX.LT.THRESH )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )SNAME, NC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX
kusano 2b45e8
      END IF
kusano 2b45e8
      GO TO 130
kusano 2b45e8
*
kusano 2b45e8
  110 CONTINUE
kusano 2b45e8
      IF( N.GT.1 )
kusano 2b45e8
     $   WRITE( NOUT, FMT = 9995 )J
kusano 2b45e8
*
kusano 2b45e8
  120 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9996 )SNAME
kusano 2b45e8
      IF( CONJ )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, RALPHA,
kusano 2b45e8
     $      LDA, RBETA, LDC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,
kusano 2b45e8
     $      LDA, BETA, LDC
kusano 2b45e8
      END IF
kusano 2b45e8
*
kusano 2b45e8
  130 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',
kusano 2b45e8
     $      'S)' )
kusano 2b45e8
 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
kusano 2b45e8
     $      'ANGED INCORRECTLY *******' )
kusano 2b45e8
 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',
kusano 2b45e8
     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,
kusano 2b45e8
     $      ' - SUSPECT *******' )
kusano 2b45e8
 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )
kusano 2b45e8
 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )
kusano 2b45e8
 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),
kusano 2b45e8
     $      F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ')               ',
kusano 2b45e8
     $      '          .' )
kusano 2b45e8
 9993 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),
kusano 2b45e8
     $      '(', F4.1, ',', F4.1, ') , A,', I3, ',(', F4.1, ',', F4.1,
kusano 2b45e8
     $      '), C,', I3, ')          .' )
kusano 2b45e8
 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
kusano 2b45e8
     $      '******' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZCHK4.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
kusano 2b45e8
     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
kusano 2b45e8
     $                  AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )
kusano 2b45e8
*
kusano 2b45e8
*  Tests ZHER2K and ZSYR2K.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO, ONE
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),
kusano 2b45e8
     $                   ONE = ( 1.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RONE, RZERO
kusano 2b45e8
      PARAMETER          ( RONE = 1.0D0, RZERO = 0.0D0 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION   EPS, THRESH
kusano 2b45e8
      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA
kusano 2b45e8
      LOGICAL            FATAL, REWI, TRACE
kusano 2b45e8
      CHARACTER*6        SNAME
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),
kusano 2b45e8
     $                   ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),
kusano 2b45e8
     $                   BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),
kusano 2b45e8
     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),
kusano 2b45e8
     $                   W( 2*NMAX )
kusano 2b45e8
      DOUBLE PRECISION   G( NMAX )
kusano 2b45e8
      INTEGER            IDIM( NIDIM )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         ALPHA, ALS, BETA, BETS
kusano 2b45e8
      DOUBLE PRECISION   ERR, ERRMAX, RBETA, RBETS
kusano 2b45e8
      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,
kusano 2b45e8
     $                   K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,
kusano 2b45e8
     $                   LDC, LDCS, LJ, MA, N, NA, NARGS, NC, NS
kusano 2b45e8
      LOGICAL            CONJ, NULL, RESET, SAME, TRAN, UPPER
kusano 2b45e8
      CHARACTER*1        TRANS, TRANSS, TRANST, UPLO, UPLOS
kusano 2b45e8
      CHARACTER*2        ICHT, ICHU
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      LOGICAL            ISAME( 13 )
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      LOGICAL            LZE, LZERES
kusano 2b45e8
      EXTERNAL           LZE, LZERES
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZHER2K, ZMAKE, ZMMCH, ZSYR2K
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          DCMPLX, DCONJG, MAX, DBLE
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA               ICHT/'NC'/, ICHU/'UL'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      CONJ = SNAME( 2: 3 ).EQ.'HE'
kusano 2b45e8
*
kusano 2b45e8
      NARGS = 12
kusano 2b45e8
      NC = 0
kusano 2b45e8
      RESET = .TRUE.
kusano 2b45e8
      ERRMAX = RZERO
kusano 2b45e8
*
kusano 2b45e8
      DO 130 IN = 1, NIDIM
kusano 2b45e8
         N = IDIM( IN )
kusano 2b45e8
*        Set LDC to 1 more than minimum value if room.
kusano 2b45e8
         LDC = N
kusano 2b45e8
         IF( LDC.LT.NMAX )
kusano 2b45e8
     $      LDC = LDC + 1
kusano 2b45e8
*        Skip tests if not enough room.
kusano 2b45e8
         IF( LDC.GT.NMAX )
kusano 2b45e8
     $      GO TO 130
kusano 2b45e8
         LCC = LDC*N
kusano 2b45e8
*
kusano 2b45e8
         DO 120 IK = 1, NIDIM
kusano 2b45e8
            K = IDIM( IK )
kusano 2b45e8
*
kusano 2b45e8
            DO 110 ICT = 1, 2
kusano 2b45e8
               TRANS = ICHT( ICT: ICT )
kusano 2b45e8
               TRAN = TRANS.EQ.'C'
kusano 2b45e8
               IF( TRAN.AND..NOT.CONJ )
kusano 2b45e8
     $            TRANS = 'T'
kusano 2b45e8
               IF( TRAN )THEN
kusano 2b45e8
                  MA = K
kusano 2b45e8
                  NA = N
kusano 2b45e8
               ELSE
kusano 2b45e8
                  MA = N
kusano 2b45e8
                  NA = K
kusano 2b45e8
               END IF
kusano 2b45e8
*              Set LDA to 1 more than minimum value if room.
kusano 2b45e8
               LDA = MA
kusano 2b45e8
               IF( LDA.LT.NMAX )
kusano 2b45e8
     $            LDA = LDA + 1
kusano 2b45e8
*              Skip tests if not enough room.
kusano 2b45e8
               IF( LDA.GT.NMAX )
kusano 2b45e8
     $            GO TO 110
kusano 2b45e8
               LAA = LDA*NA
kusano 2b45e8
*
kusano 2b45e8
*              Generate the matrix A.
kusano 2b45e8
*
kusano 2b45e8
               IF( TRAN )THEN
kusano 2b45e8
                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB, 2*NMAX, AA,
kusano 2b45e8
     $                        LDA, RESET, ZERO )
kusano 2b45e8
               ELSE
kusano 2b45e8
                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB, NMAX, AA, LDA,
kusano 2b45e8
     $                        RESET, ZERO )
kusano 2b45e8
               END IF
kusano 2b45e8
*
kusano 2b45e8
*              Generate the matrix B.
kusano 2b45e8
*
kusano 2b45e8
               LDB = LDA
kusano 2b45e8
               LBB = LAA
kusano 2b45e8
               IF( TRAN )THEN
kusano 2b45e8
                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB( K + 1 ),
kusano 2b45e8
     $                        2*NMAX, BB, LDB, RESET, ZERO )
kusano 2b45e8
               ELSE
kusano 2b45e8
                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB( K*NMAX + 1 ),
kusano 2b45e8
     $                        NMAX, BB, LDB, RESET, ZERO )
kusano 2b45e8
               END IF
kusano 2b45e8
*
kusano 2b45e8
               DO 100 ICU = 1, 2
kusano 2b45e8
                  UPLO = ICHU( ICU: ICU )
kusano 2b45e8
                  UPPER = UPLO.EQ.'U'
kusano 2b45e8
*
kusano 2b45e8
                  DO 90 IA = 1, NALF
kusano 2b45e8
                     ALPHA = ALF( IA )
kusano 2b45e8
*
kusano 2b45e8
                     DO 80 IB = 1, NBET
kusano 2b45e8
                        BETA = BET( IB )
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           RBETA = DBLE( BETA )
kusano 2b45e8
                           BETA = DCMPLX( RBETA, RZERO )
kusano 2b45e8
                        END IF
kusano 2b45e8
                        NULL = N.LE.0
kusano 2b45e8
                        IF( CONJ )
kusano 2b45e8
     $                     NULL = NULL.OR.( ( K.LE.0.OR.ALPHA.EQ.
kusano 2b45e8
     $                            ZERO ).AND.RBETA.EQ.RONE )
kusano 2b45e8
*
kusano 2b45e8
*                       Generate the matrix C.
kusano 2b45e8
*
kusano 2b45e8
                        CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, C,
kusano 2b45e8
     $                              NMAX, CC, LDC, RESET, ZERO )
kusano 2b45e8
*
kusano 2b45e8
                        NC = NC + 1
kusano 2b45e8
*
kusano 2b45e8
*                       Save every datum before calling the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                        UPLOS = UPLO
kusano 2b45e8
                        TRANSS = TRANS
kusano 2b45e8
                        NS = N
kusano 2b45e8
                        KS = K
kusano 2b45e8
                        ALS = ALPHA
kusano 2b45e8
                        DO 10 I = 1, LAA
kusano 2b45e8
                           AS( I ) = AA( I )
kusano 2b45e8
   10                   CONTINUE
kusano 2b45e8
                        LDAS = LDA
kusano 2b45e8
                        DO 20 I = 1, LBB
kusano 2b45e8
                           BS( I ) = BB( I )
kusano 2b45e8
   20                   CONTINUE
kusano 2b45e8
                        LDBS = LDB
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           RBETS = RBETA
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           BETS = BETA
kusano 2b45e8
                        END IF
kusano 2b45e8
                        DO 30 I = 1, LCC
kusano 2b45e8
                           CS( I ) = CC( I )
kusano 2b45e8
   30                   CONTINUE
kusano 2b45e8
                        LDCS = LDC
kusano 2b45e8
*
kusano 2b45e8
*                       Call the subroutine.
kusano 2b45e8
*
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           IF( TRACE )
kusano 2b45e8
     $                        WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,
kusano 2b45e8
     $                        TRANS, N, K, ALPHA, LDA, LDB, RBETA, LDC
kusano 2b45e8
                           IF( REWI )
kusano 2b45e8
     $                        REWIND NTRA
kusano 2b45e8
                           CALL ZHER2K( UPLO, TRANS, N, K, ALPHA, AA,
kusano 2b45e8
     $                                  LDA, BB, LDB, RBETA, CC, LDC )
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           IF( TRACE )
kusano 2b45e8
     $                        WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO,
kusano 2b45e8
     $                        TRANS, N, K, ALPHA, LDA, LDB, BETA, LDC
kusano 2b45e8
                           IF( REWI )
kusano 2b45e8
     $                        REWIND NTRA
kusano 2b45e8
                           CALL ZSYR2K( UPLO, TRANS, N, K, ALPHA, AA,
kusano 2b45e8
     $                                  LDA, BB, LDB, BETA, CC, LDC )
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
*                       Check if error-exit was taken incorrectly.
kusano 2b45e8
*
kusano 2b45e8
                        IF( .NOT.OK )THEN
kusano 2b45e8
                           WRITE( NOUT, FMT = 9992 )
kusano 2b45e8
                           FATAL = .TRUE.
kusano 2b45e8
                           GO TO 150
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
*                       See what data changed inside subroutines.
kusano 2b45e8
*
kusano 2b45e8
                        ISAME( 1 ) = UPLOS.EQ.UPLO
kusano 2b45e8
                        ISAME( 2 ) = TRANSS.EQ.TRANS
kusano 2b45e8
                        ISAME( 3 ) = NS.EQ.N
kusano 2b45e8
                        ISAME( 4 ) = KS.EQ.K
kusano 2b45e8
                        ISAME( 5 ) = ALS.EQ.ALPHA
kusano 2b45e8
                        ISAME( 6 ) = LZE( AS, AA, LAA )
kusano 2b45e8
                        ISAME( 7 ) = LDAS.EQ.LDA
kusano 2b45e8
                        ISAME( 8 ) = LZE( BS, BB, LBB )
kusano 2b45e8
                        ISAME( 9 ) = LDBS.EQ.LDB
kusano 2b45e8
                        IF( CONJ )THEN
kusano 2b45e8
                           ISAME( 10 ) = RBETS.EQ.RBETA
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ISAME( 10 ) = BETS.EQ.BETA
kusano 2b45e8
                        END IF
kusano 2b45e8
                        IF( NULL )THEN
kusano 2b45e8
                           ISAME( 11 ) = LZE( CS, CC, LCC )
kusano 2b45e8
                        ELSE
kusano 2b45e8
                           ISAME( 11 ) = LZERES( 'HE', UPLO, N, N, CS,
kusano 2b45e8
     $                                   CC, LDC )
kusano 2b45e8
                        END IF
kusano 2b45e8
                        ISAME( 12 ) = LDCS.EQ.LDC
kusano 2b45e8
*
kusano 2b45e8
*                       If data was incorrectly changed, report and
kusano 2b45e8
*                       return.
kusano 2b45e8
*
kusano 2b45e8
                        SAME = .TRUE.
kusano 2b45e8
                        DO 40 I = 1, NARGS
kusano 2b45e8
                           SAME = SAME.AND.ISAME( I )
kusano 2b45e8
                           IF( .NOT.ISAME( I ) )
kusano 2b45e8
     $                        WRITE( NOUT, FMT = 9998 )I
kusano 2b45e8
   40                   CONTINUE
kusano 2b45e8
                        IF( .NOT.SAME )THEN
kusano 2b45e8
                           FATAL = .TRUE.
kusano 2b45e8
                           GO TO 150
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
                        IF( .NOT.NULL )THEN
kusano 2b45e8
*
kusano 2b45e8
*                          Check the result column by column.
kusano 2b45e8
*
kusano 2b45e8
                           IF( CONJ )THEN
kusano 2b45e8
                              TRANST = 'C'
kusano 2b45e8
                           ELSE
kusano 2b45e8
                              TRANST = 'T'
kusano 2b45e8
                           END IF
kusano 2b45e8
                           JJAB = 1
kusano 2b45e8
                           JC = 1
kusano 2b45e8
                           DO 70 J = 1, N
kusano 2b45e8
                              IF( UPPER )THEN
kusano 2b45e8
                                 JJ = 1
kusano 2b45e8
                                 LJ = J
kusano 2b45e8
                              ELSE
kusano 2b45e8
                                 JJ = J
kusano 2b45e8
                                 LJ = N - J + 1
kusano 2b45e8
                              END IF
kusano 2b45e8
                              IF( TRAN )THEN
kusano 2b45e8
                                 DO 50 I = 1, K
kusano 2b45e8
                                    W( I ) = ALPHA*AB( ( J - 1 )*2*
kusano 2b45e8
     $                                       NMAX + K + I )
kusano 2b45e8
                                    IF( CONJ )THEN
kusano 2b45e8
                                       W( K + I ) = DCONJG( ALPHA )*
kusano 2b45e8
     $                                              AB( ( J - 1 )*2*
kusano 2b45e8
     $                                              NMAX + I )
kusano 2b45e8
                                    ELSE
kusano 2b45e8
                                       W( K + I ) = ALPHA*
kusano 2b45e8
     $                                              AB( ( J - 1 )*2*
kusano 2b45e8
     $                                              NMAX + I )
kusano 2b45e8
                                    END IF
kusano 2b45e8
   50                            CONTINUE
kusano 2b45e8
                                 CALL ZMMCH( TRANST, 'N', LJ, 1, 2*K,
kusano 2b45e8
     $                                       ONE, AB( JJAB ), 2*NMAX, W,
kusano 2b45e8
     $                                       2*NMAX, BETA, C( JJ, J ),
kusano 2b45e8
     $                                       NMAX, CT, G, CC( JC ), LDC,
kusano 2b45e8
     $                                       EPS, ERR, FATAL, NOUT,
kusano 2b45e8
     $                                       .TRUE. )
kusano 2b45e8
                              ELSE
kusano 2b45e8
                                 DO 60 I = 1, K
kusano 2b45e8
                                    IF( CONJ )THEN
kusano 2b45e8
                                       W( I ) = ALPHA*DCONJG( AB( ( K +
kusano 2b45e8
     $                                          I - 1 )*NMAX + J ) )
kusano 2b45e8
                                       W( K + I ) = DCONJG( ALPHA*
kusano 2b45e8
     $                                              AB( ( I - 1 )*NMAX +
kusano 2b45e8
     $                                              J ) )
kusano 2b45e8
                                    ELSE
kusano 2b45e8
                                       W( I ) = ALPHA*AB( ( K + I - 1 )*
kusano 2b45e8
     $                                          NMAX + J )
kusano 2b45e8
                                       W( K + I ) = ALPHA*
kusano 2b45e8
     $                                              AB( ( I - 1 )*NMAX +
kusano 2b45e8
     $                                              J )
kusano 2b45e8
                                    END IF
kusano 2b45e8
   60                            CONTINUE
kusano 2b45e8
                                 CALL ZMMCH( 'N', 'N', LJ, 1, 2*K, ONE,
kusano 2b45e8
     $                                       AB( JJ ), NMAX, W, 2*NMAX,
kusano 2b45e8
     $                                       BETA, C( JJ, J ), NMAX, CT,
kusano 2b45e8
     $                                       G, CC( JC ), LDC, EPS, ERR,
kusano 2b45e8
     $                                       FATAL, NOUT, .TRUE. )
kusano 2b45e8
                              END IF
kusano 2b45e8
                              IF( UPPER )THEN
kusano 2b45e8
                                 JC = JC + LDC
kusano 2b45e8
                              ELSE
kusano 2b45e8
                                 JC = JC + LDC + 1
kusano 2b45e8
                                 IF( TRAN )
kusano 2b45e8
     $                              JJAB = JJAB + 2*NMAX
kusano 2b45e8
                              END IF
kusano 2b45e8
                              ERRMAX = MAX( ERRMAX, ERR )
kusano 2b45e8
*                             If got really bad answer, report and
kusano 2b45e8
*                             return.
kusano 2b45e8
                              IF( FATAL )
kusano 2b45e8
     $                           GO TO 140
kusano 2b45e8
   70                      CONTINUE
kusano 2b45e8
                        END IF
kusano 2b45e8
*
kusano 2b45e8
   80                CONTINUE
kusano 2b45e8
*
kusano 2b45e8
   90             CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  100          CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  110       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  120    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  130 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     Report result.
kusano 2b45e8
*
kusano 2b45e8
      IF( ERRMAX.LT.THRESH )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )SNAME, NC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX
kusano 2b45e8
      END IF
kusano 2b45e8
      GO TO 160
kusano 2b45e8
*
kusano 2b45e8
  140 CONTINUE
kusano 2b45e8
      IF( N.GT.1 )
kusano 2b45e8
     $   WRITE( NOUT, FMT = 9995 )J
kusano 2b45e8
*
kusano 2b45e8
  150 CONTINUE
kusano 2b45e8
      WRITE( NOUT, FMT = 9996 )SNAME
kusano 2b45e8
      IF( CONJ )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,
kusano 2b45e8
     $      LDA, LDB, RBETA, LDC
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,
kusano 2b45e8
     $      LDA, LDB, BETA, LDC
kusano 2b45e8
      END IF
kusano 2b45e8
*
kusano 2b45e8
  160 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',
kusano 2b45e8
     $      'S)' )
kusano 2b45e8
 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',
kusano 2b45e8
     $      'ANGED INCORRECTLY *******' )
kusano 2b45e8
 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',
kusano 2b45e8
     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,
kusano 2b45e8
     $      ' - SUSPECT *******' )
kusano 2b45e8
 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )
kusano 2b45e8
 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )
kusano 2b45e8
 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),
kusano 2b45e8
     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',', F4.1,
kusano 2b45e8
     $      ', C,', I3, ')           .' )
kusano 2b45e8
 9993 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),
kusano 2b45e8
     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',(', F4.1,
kusano 2b45e8
     $      ',', F4.1, '), C,', I3, ')    .' )
kusano 2b45e8
 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
kusano 2b45e8
     $      '******' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZCHK5.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZCHKE( ISNUM, SRNAMT, NOUT )
kusano 2b45e8
*
kusano 2b45e8
*  Tests the error exits from the Level 3 Blas.
kusano 2b45e8
*  Requires a special version of the error-handling routine XERBLA.
kusano 2b45e8
*  ALPHA, RALPHA, BETA, RBETA, A, B and C should not need to be defined.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      INTEGER            ISNUM, NOUT
kusano 2b45e8
      CHARACTER*6        SRNAMT
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUTC
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         ALPHA, BETA
kusano 2b45e8
      DOUBLE PRECISION   RALPHA, RBETA
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      COMPLEX*16         A( 2, 1 ), B( 2, 1 ), C( 2, 1 )
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL           ZGEMM, ZHEMM, ZHER2K, ZHERK, CHKXER, ZSYMM,
kusano 2b45e8
     $                   ZSYR2K, ZSYRK, ZTRMM, ZTRSM
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUTC, OK, LERR
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER
kusano 2b45e8
*     if anything is wrong.
kusano 2b45e8
      OK = .TRUE.
kusano 2b45e8
*     LERR is set to .TRUE. by the special version of XERBLA each time
kusano 2b45e8
*     it is called, and is then tested and re-set by CHKXER.
kusano 2b45e8
      LERR = .FALSE.
kusano 2b45e8
      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,
kusano 2b45e8
     $        90 )ISNUM
kusano 2b45e8
   10 INFOT = 1
kusano 2b45e8
      CALL ZGEMM( '/', 'N', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 1
kusano 2b45e8
      CALL ZGEMM( '/', 'C', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 1
kusano 2b45e8
      CALL ZGEMM( '/', 'T', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZGEMM( 'N', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZGEMM( 'C', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZGEMM( 'T', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'N', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'N', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'N', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'C', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'C', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'C', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'T', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'T', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZGEMM( 'T', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'N', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'N', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'N', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'C', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'C', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'C', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'T', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'T', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZGEMM( 'T', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'N', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'N', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'N', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'C', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'C', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'C', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'T', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'T', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZGEMM( 'T', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'N', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'C', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'C', 'C', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'C', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'T', 'C', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 8
kusano 2b45e8
      CALL ZGEMM( 'T', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'N', 'N', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'C', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'N', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'C', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'T', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'N', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'C', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZGEMM( 'T', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'N', 'C', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'C', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'C', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'C', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'T', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'T', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 13
kusano 2b45e8
      CALL ZGEMM( 'T', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   20 INFOT = 1
kusano 2b45e8
      CALL ZHEMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZHEMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHEMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHEMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHEMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHEMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHEMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHEMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHEMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHEMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHEMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHEMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHEMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHEMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHEMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHEMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHEMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHEMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHEMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHEMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHEMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHEMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   30 INFOT = 1
kusano 2b45e8
      CALL ZSYMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZSYMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   40 INFOT = 1
kusano 2b45e8
      CALL ZTRMM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZTRMM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRMM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   50 INFOT = 1
kusano 2b45e8
      CALL ZTRSM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZTRSM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 5
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 6
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 11
kusano 2b45e8
      CALL ZTRSM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   60 INFOT = 1
kusano 2b45e8
      CALL ZHERK( '/', 'N', 0, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZHERK( 'U', 'T', 0, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHERK( 'U', 'N', -1, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHERK( 'U', 'C', -1, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHERK( 'L', 'N', -1, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHERK( 'L', 'C', -1, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHERK( 'U', 'N', 0, -1, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHERK( 'U', 'C', 0, -1, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHERK( 'L', 'N', 0, -1, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHERK( 'L', 'C', 0, -1, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHERK( 'U', 'N', 2, 0, RALPHA, A, 1, RBETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHERK( 'U', 'C', 0, 2, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHERK( 'L', 'N', 2, 0, RALPHA, A, 1, RBETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHERK( 'L', 'C', 0, 2, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZHERK( 'U', 'N', 2, 0, RALPHA, A, 2, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZHERK( 'U', 'C', 2, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZHERK( 'L', 'N', 2, 0, RALPHA, A, 2, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZHERK( 'L', 'C', 2, 0, RALPHA, A, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   70 INFOT = 1
kusano 2b45e8
      CALL ZSYRK( '/', 'N', 0, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZSYRK( 'U', 'C', 0, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYRK( 'U', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYRK( 'U', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYRK( 'L', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYRK( 'L', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYRK( 'U', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYRK( 'U', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYRK( 'L', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYRK( 'L', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYRK( 'U', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYRK( 'U', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYRK( 'L', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYRK( 'L', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZSYRK( 'U', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZSYRK( 'U', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZSYRK( 'L', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 10
kusano 2b45e8
      CALL ZSYRK( 'L', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   80 INFOT = 1
kusano 2b45e8
      CALL ZHER2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZHER2K( 'U', 'T', 0, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHER2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHER2K( 'U', 'C', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHER2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZHER2K( 'L', 'C', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHER2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHER2K( 'U', 'C', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHER2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZHER2K( 'L', 'C', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHER2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHER2K( 'U', 'C', 0, 2, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHER2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZHER2K( 'L', 'C', 0, 2, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHER2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, RBETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHER2K( 'U', 'C', 0, 2, ALPHA, A, 2, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHER2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, RBETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZHER2K( 'L', 'C', 0, 2, ALPHA, A, 2, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHER2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHER2K( 'U', 'C', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHER2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZHER2K( 'L', 'C', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      GO TO 100
kusano 2b45e8
   90 INFOT = 1
kusano 2b45e8
      CALL ZSYR2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 2
kusano 2b45e8
      CALL ZSYR2K( 'U', 'C', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYR2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYR2K( 'U', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYR2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 3
kusano 2b45e8
      CALL ZSYR2K( 'L', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYR2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYR2K( 'U', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYR2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 4
kusano 2b45e8
      CALL ZSYR2K( 'L', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYR2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYR2K( 'U', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYR2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 7
kusano 2b45e8
      CALL ZSYR2K( 'L', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYR2K( 'U', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 9
kusano 2b45e8
      CALL ZSYR2K( 'L', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYR2K( 'U', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
      INFOT = 12
kusano 2b45e8
      CALL ZSYR2K( 'L', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )
kusano 2b45e8
      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
*
kusano 2b45e8
  100 IF( OK )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )SRNAMT
kusano 2b45e8
      ELSE
kusano 2b45e8
         WRITE( NOUT, FMT = 9998 )SRNAMT
kusano 2b45e8
      END IF
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )
kusano 2b45e8
 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',
kusano 2b45e8
     $      '**' )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZCHKE.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,
kusano 2b45e8
     $                  TRANSL )
kusano 2b45e8
*
kusano 2b45e8
*  Generates values for an M by N matrix A.
kusano 2b45e8
*  Stores the values in the array AA in the data structure required
kusano 2b45e8
*  by the routine, with unwanted elements set to rogue value.
kusano 2b45e8
*
kusano 2b45e8
*  TYPE is 'GE', 'HE', 'SY' or 'TR'.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO, ONE
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),
kusano 2b45e8
     $                   ONE = ( 1.0D0, 0.0D0 ) )
kusano 2b45e8
      COMPLEX*16         ROGUE
kusano 2b45e8
      PARAMETER          ( ROGUE = ( -1.0D10, 1.0D10 ) )
kusano 2b45e8
      DOUBLE PRECISION   RZERO
kusano 2b45e8
      PARAMETER          ( RZERO = 0.0D0 )
kusano 2b45e8
      DOUBLE PRECISION   RROGUE
kusano 2b45e8
      PARAMETER          ( RROGUE = -1.0D10 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      COMPLEX*16         TRANSL
kusano 2b45e8
      INTEGER            LDA, M, N, NMAX
kusano 2b45e8
      LOGICAL            RESET
kusano 2b45e8
      CHARACTER*1        DIAG, UPLO
kusano 2b45e8
      CHARACTER*2        TYPE
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         A( NMAX, * ), AA( * )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      INTEGER            I, IBEG, IEND, J, JJ
kusano 2b45e8
      LOGICAL            GEN, HER, LOWER, SYM, TRI, UNIT, UPPER
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      COMPLEX*16         ZBEG
kusano 2b45e8
      EXTERNAL           ZBEG
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          DCMPLX, DCONJG, DBLE
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      GEN = TYPE.EQ.'GE'
kusano 2b45e8
      HER = TYPE.EQ.'HE'
kusano 2b45e8
      SYM = TYPE.EQ.'SY'
kusano 2b45e8
      TRI = TYPE.EQ.'TR'
kusano 2b45e8
      UPPER = ( HER.OR.SYM.OR.TRI ).AND.UPLO.EQ.'U'
kusano 2b45e8
      LOWER = ( HER.OR.SYM.OR.TRI ).AND.UPLO.EQ.'L'
kusano 2b45e8
      UNIT = TRI.AND.DIAG.EQ.'U'
kusano 2b45e8
*
kusano 2b45e8
*     Generate data in array A.
kusano 2b45e8
*
kusano 2b45e8
      DO 20 J = 1, N
kusano 2b45e8
         DO 10 I = 1, M
kusano 2b45e8
            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )
kusano 2b45e8
     $          THEN
kusano 2b45e8
               A( I, J ) = ZBEG( RESET ) + TRANSL
kusano 2b45e8
               IF( I.NE.J )THEN
kusano 2b45e8
*                 Set some elements to zero
kusano 2b45e8
                  IF( N.GT.3.AND.J.EQ.N/2 )
kusano 2b45e8
     $               A( I, J ) = ZERO
kusano 2b45e8
                  IF( HER )THEN
kusano 2b45e8
                     A( J, I ) = DCONJG( A( I, J ) )
kusano 2b45e8
                  ELSE IF( SYM )THEN
kusano 2b45e8
                     A( J, I ) = A( I, J )
kusano 2b45e8
                  ELSE IF( TRI )THEN
kusano 2b45e8
                     A( J, I ) = ZERO
kusano 2b45e8
                  END IF
kusano 2b45e8
               END IF
kusano 2b45e8
            END IF
kusano 2b45e8
   10    CONTINUE
kusano 2b45e8
         IF( HER )
kusano 2b45e8
     $      A( J, J ) = DCMPLX( DBLE( A( J, J ) ), RZERO )
kusano 2b45e8
         IF( TRI )
kusano 2b45e8
     $      A( J, J ) = A( J, J ) + ONE
kusano 2b45e8
         IF( UNIT )
kusano 2b45e8
     $      A( J, J ) = ONE
kusano 2b45e8
   20 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     Store elements in array AS in data structure required by routine.
kusano 2b45e8
*
kusano 2b45e8
      IF( TYPE.EQ.'GE' )THEN
kusano 2b45e8
         DO 50 J = 1, N
kusano 2b45e8
            DO 30 I = 1, M
kusano 2b45e8
               AA( I + ( J - 1 )*LDA ) = A( I, J )
kusano 2b45e8
   30       CONTINUE
kusano 2b45e8
            DO 40 I = M + 1, LDA
kusano 2b45e8
               AA( I + ( J - 1 )*LDA ) = ROGUE
kusano 2b45e8
   40       CONTINUE
kusano 2b45e8
   50    CONTINUE
kusano 2b45e8
      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN
kusano 2b45e8
         DO 90 J = 1, N
kusano 2b45e8
            IF( UPPER )THEN
kusano 2b45e8
               IBEG = 1
kusano 2b45e8
               IF( UNIT )THEN
kusano 2b45e8
                  IEND = J - 1
kusano 2b45e8
               ELSE
kusano 2b45e8
                  IEND = J
kusano 2b45e8
               END IF
kusano 2b45e8
            ELSE
kusano 2b45e8
               IF( UNIT )THEN
kusano 2b45e8
                  IBEG = J + 1
kusano 2b45e8
               ELSE
kusano 2b45e8
                  IBEG = J
kusano 2b45e8
               END IF
kusano 2b45e8
               IEND = N
kusano 2b45e8
            END IF
kusano 2b45e8
            DO 60 I = 1, IBEG - 1
kusano 2b45e8
               AA( I + ( J - 1 )*LDA ) = ROGUE
kusano 2b45e8
   60       CONTINUE
kusano 2b45e8
            DO 70 I = IBEG, IEND
kusano 2b45e8
               AA( I + ( J - 1 )*LDA ) = A( I, J )
kusano 2b45e8
   70       CONTINUE
kusano 2b45e8
            DO 80 I = IEND + 1, LDA
kusano 2b45e8
               AA( I + ( J - 1 )*LDA ) = ROGUE
kusano 2b45e8
   80       CONTINUE
kusano 2b45e8
            IF( HER )THEN
kusano 2b45e8
               JJ = J + ( J - 1 )*LDA
kusano 2b45e8
               AA( JJ ) = DCMPLX( DBLE( AA( JJ ) ), RROGUE )
kusano 2b45e8
            END IF
kusano 2b45e8
   90    CONTINUE
kusano 2b45e8
      END IF
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
*     End of ZMAKE.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ZMMCH( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,
kusano 2b45e8
     $                  BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,
kusano 2b45e8
     $                  NOUT, MV )
kusano 2b45e8
*
kusano 2b45e8
*  Checks the results of the computational tests.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      COMPLEX*16         ZERO
kusano 2b45e8
      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )
kusano 2b45e8
      DOUBLE PRECISION   RZERO, RONE
kusano 2b45e8
      PARAMETER          ( RZERO = 0.0D0, RONE = 1.0D0 )
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      COMPLEX*16         ALPHA, BETA
kusano 2b45e8
      DOUBLE PRECISION   EPS, ERR
kusano 2b45e8
      INTEGER            KK, LDA, LDB, LDC, LDCC, M, N, NOUT
kusano 2b45e8
      LOGICAL            FATAL, MV
kusano 2b45e8
      CHARACTER*1        TRANSA, TRANSB
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * ),
kusano 2b45e8
     $                   CC( LDCC, * ), CT( * )
kusano 2b45e8
      DOUBLE PRECISION   G( * )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      COMPLEX*16         CL
kusano 2b45e8
      DOUBLE PRECISION   ERRI
kusano 2b45e8
      INTEGER            I, J, K
kusano 2b45e8
      LOGICAL            CTRANA, CTRANB, TRANA, TRANB
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          ABS, DIMAG, DCONJG, MAX, DBLE, SQRT
kusano 2b45e8
*     .. Statement Functions ..
kusano 2b45e8
      DOUBLE PRECISION   ABS1
kusano 2b45e8
*     .. Statement Function definitions ..
kusano 2b45e8
      ABS1( CL ) = ABS( DBLE( CL ) ) + ABS( DIMAG( CL ) )
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'
kusano 2b45e8
      TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'
kusano 2b45e8
      CTRANA = TRANSA.EQ.'C'
kusano 2b45e8
      CTRANB = TRANSB.EQ.'C'
kusano 2b45e8
*
kusano 2b45e8
*     Compute expected result, one column at a time, in CT using data
kusano 2b45e8
*     in A, B and C.
kusano 2b45e8
*     Compute gauges in G.
kusano 2b45e8
*
kusano 2b45e8
      DO 220 J = 1, N
kusano 2b45e8
*
kusano 2b45e8
         DO 10 I = 1, M
kusano 2b45e8
            CT( I ) = ZERO
kusano 2b45e8
            G( I ) = RZERO
kusano 2b45e8
   10    CONTINUE
kusano 2b45e8
         IF( .NOT.TRANA.AND..NOT.TRANB )THEN
kusano 2b45e8
            DO 30 K = 1, KK
kusano 2b45e8
               DO 20 I = 1, M
kusano 2b45e8
                  CT( I ) = CT( I ) + A( I, K )*B( K, J )
kusano 2b45e8
                  G( I ) = G( I ) + ABS1( A( I, K ) )*ABS1( B( K, J ) )
kusano 2b45e8
   20          CONTINUE
kusano 2b45e8
   30       CONTINUE
kusano 2b45e8
         ELSE IF( TRANA.AND..NOT.TRANB )THEN
kusano 2b45e8
            IF( CTRANA )THEN
kusano 2b45e8
               DO 50 K = 1, KK
kusano 2b45e8
                  DO 40 I = 1, M
kusano 2b45e8
                     CT( I ) = CT( I ) + DCONJG( A( K, I ) )*B( K, J )
kusano 2b45e8
                     G( I ) = G( I ) + ABS1( A( K, I ) )*
kusano 2b45e8
     $                        ABS1( B( K, J ) )
kusano 2b45e8
   40             CONTINUE
kusano 2b45e8
   50          CONTINUE
kusano 2b45e8
            ELSE
kusano 2b45e8
               DO 70 K = 1, KK
kusano 2b45e8
                  DO 60 I = 1, M
kusano 2b45e8
                     CT( I ) = CT( I ) + A( K, I )*B( K, J )
kusano 2b45e8
                     G( I ) = G( I ) + ABS1( A( K, I ) )*
kusano 2b45e8
     $                        ABS1( B( K, J ) )
kusano 2b45e8
   60             CONTINUE
kusano 2b45e8
   70          CONTINUE
kusano 2b45e8
            END IF
kusano 2b45e8
         ELSE IF( .NOT.TRANA.AND.TRANB )THEN
kusano 2b45e8
            IF( CTRANB )THEN
kusano 2b45e8
               DO 90 K = 1, KK
kusano 2b45e8
                  DO 80 I = 1, M
kusano 2b45e8
                     CT( I ) = CT( I ) + A( I, K )*DCONJG( B( J, K ) )
kusano 2b45e8
                     G( I ) = G( I ) + ABS1( A( I, K ) )*
kusano 2b45e8
     $                        ABS1( B( J, K ) )
kusano 2b45e8
   80             CONTINUE
kusano 2b45e8
   90          CONTINUE
kusano 2b45e8
            ELSE
kusano 2b45e8
               DO 110 K = 1, KK
kusano 2b45e8
                  DO 100 I = 1, M
kusano 2b45e8
                     CT( I ) = CT( I ) + A( I, K )*B( J, K )
kusano 2b45e8
                     G( I ) = G( I ) + ABS1( A( I, K ) )*
kusano 2b45e8
     $                        ABS1( B( J, K ) )
kusano 2b45e8
  100             CONTINUE
kusano 2b45e8
  110          CONTINUE
kusano 2b45e8
            END IF
kusano 2b45e8
         ELSE IF( TRANA.AND.TRANB )THEN
kusano 2b45e8
            IF( CTRANA )THEN
kusano 2b45e8
               IF( CTRANB )THEN
kusano 2b45e8
                  DO 130 K = 1, KK
kusano 2b45e8
                     DO 120 I = 1, M
kusano 2b45e8
                        CT( I ) = CT( I ) + DCONJG( A( K, I ) )*
kusano 2b45e8
     $                            DCONJG( B( J, K ) )
kusano 2b45e8
                        G( I ) = G( I ) + ABS1( A( K, I ) )*
kusano 2b45e8
     $                           ABS1( B( J, K ) )
kusano 2b45e8
  120                CONTINUE
kusano 2b45e8
  130             CONTINUE
kusano 2b45e8
               ELSE
kusano 2b45e8
                  DO 150 K = 1, KK
kusano 2b45e8
                     DO 140 I = 1, M
kusano 2b45e8
                        CT( I ) = CT( I ) + DCONJG( A( K, I ) )*
kusano 2b45e8
     $                            B( J, K )
kusano 2b45e8
                        G( I ) = G( I ) + ABS1( A( K, I ) )*
kusano 2b45e8
     $                           ABS1( B( J, K ) )
kusano 2b45e8
  140                CONTINUE
kusano 2b45e8
  150             CONTINUE
kusano 2b45e8
               END IF
kusano 2b45e8
            ELSE
kusano 2b45e8
               IF( CTRANB )THEN
kusano 2b45e8
                  DO 170 K = 1, KK
kusano 2b45e8
                     DO 160 I = 1, M
kusano 2b45e8
                        CT( I ) = CT( I ) + A( K, I )*
kusano 2b45e8
     $                            DCONJG( B( J, K ) )
kusano 2b45e8
                        G( I ) = G( I ) + ABS1( A( K, I ) )*
kusano 2b45e8
     $                           ABS1( B( J, K ) )
kusano 2b45e8
  160                CONTINUE
kusano 2b45e8
  170             CONTINUE
kusano 2b45e8
               ELSE
kusano 2b45e8
                  DO 190 K = 1, KK
kusano 2b45e8
                     DO 180 I = 1, M
kusano 2b45e8
                        CT( I ) = CT( I ) + A( K, I )*B( J, K )
kusano 2b45e8
                        G( I ) = G( I ) + ABS1( A( K, I ) )*
kusano 2b45e8
     $                           ABS1( B( J, K ) )
kusano 2b45e8
  180                CONTINUE
kusano 2b45e8
  190             CONTINUE
kusano 2b45e8
               END IF
kusano 2b45e8
            END IF
kusano 2b45e8
         END IF
kusano 2b45e8
         DO 200 I = 1, M
kusano 2b45e8
            CT( I ) = ALPHA*CT( I ) + BETA*C( I, J )
kusano 2b45e8
            G( I ) = ABS1( ALPHA )*G( I ) +
kusano 2b45e8
     $               ABS1( BETA )*ABS1( C( I, J ) )
kusano 2b45e8
  200    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*        Compute the error ratio for this result.
kusano 2b45e8
*
kusano 2b45e8
         ERR = ZERO
kusano 2b45e8
         DO 210 I = 1, M
kusano 2b45e8
            ERRI = ABS1( CT( I ) - CC( I, J ) )/EPS
kusano 2b45e8
            IF( G( I ).NE.RZERO )
kusano 2b45e8
     $         ERRI = ERRI/G( I )
kusano 2b45e8
            ERR = MAX( ERR, ERRI )
kusano 2b45e8
            IF( ERR*SQRT( EPS ).GE.RONE )
kusano 2b45e8
     $         GO TO 230
kusano 2b45e8
  210    CONTINUE
kusano 2b45e8
*
kusano 2b45e8
  220 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
*     If the loop completes, all results are at least half accurate.
kusano 2b45e8
      GO TO 250
kusano 2b45e8
*
kusano 2b45e8
*     Report fatal error.
kusano 2b45e8
*
kusano 2b45e8
  230 FATAL = .TRUE.
kusano 2b45e8
      WRITE( NOUT, FMT = 9999 )
kusano 2b45e8
      DO 240 I = 1, M
kusano 2b45e8
         IF( MV )THEN
kusano 2b45e8
            WRITE( NOUT, FMT = 9998 )I, CT( I ), CC( I, J )
kusano 2b45e8
         ELSE
kusano 2b45e8
            WRITE( NOUT, FMT = 9998 )I, CC( I, J ), CT( I )
kusano 2b45e8
         END IF
kusano 2b45e8
  240 CONTINUE
kusano 2b45e8
      IF( N.GT.1 )
kusano 2b45e8
     $   WRITE( NOUT, FMT = 9997 )J
kusano 2b45e8
*
kusano 2b45e8
  250 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
kusano 2b45e8
     $      'F ACCURATE *******', /'                       EXPECTED RE',
kusano 2b45e8
     $      'SULT                    COMPUTED RESULT' )
kusano 2b45e8
 9998 FORMAT( 1X, I7, 2( '  (', G15.6, ',', G15.6, ')' ) )
kusano 2b45e8
 9997 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )
kusano 2b45e8
*
kusano 2b45e8
*     End of ZMMCH.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      LOGICAL FUNCTION LZE( RI, RJ, LR )
kusano 2b45e8
*
kusano 2b45e8
*  Tests if two arrays are identical.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      INTEGER            LR
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         RI( * ), RJ( * )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      INTEGER            I
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      DO 10 I = 1, LR
kusano 2b45e8
         IF( RI( I ).NE.RJ( I ) )
kusano 2b45e8
     $      GO TO 20
kusano 2b45e8
   10 CONTINUE
kusano 2b45e8
      LZE = .TRUE.
kusano 2b45e8
      GO TO 30
kusano 2b45e8
   20 CONTINUE
kusano 2b45e8
      LZE = .FALSE.
kusano 2b45e8
   30 RETURN
kusano 2b45e8
*
kusano 2b45e8
*     End of LZE.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      LOGICAL FUNCTION LZERES( TYPE, UPLO, M, N, AA, AS, LDA )
kusano 2b45e8
*
kusano 2b45e8
*  Tests if selected elements in two arrays are equal.
kusano 2b45e8
*
kusano 2b45e8
*  TYPE is 'GE' or 'HE' or 'SY'.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      INTEGER            LDA, M, N
kusano 2b45e8
      CHARACTER*1        UPLO
kusano 2b45e8
      CHARACTER*2        TYPE
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      COMPLEX*16         AA( LDA, * ), AS( LDA, * )
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      INTEGER            I, IBEG, IEND, J
kusano 2b45e8
      LOGICAL            UPPER
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      UPPER = UPLO.EQ.'U'
kusano 2b45e8
      IF( TYPE.EQ.'GE' )THEN
kusano 2b45e8
         DO 20 J = 1, N
kusano 2b45e8
            DO 10 I = M + 1, LDA
kusano 2b45e8
               IF( AA( I, J ).NE.AS( I, J ) )
kusano 2b45e8
     $            GO TO 70
kusano 2b45e8
   10       CONTINUE
kusano 2b45e8
   20    CONTINUE
kusano 2b45e8
      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'SY' )THEN
kusano 2b45e8
         DO 50 J = 1, N
kusano 2b45e8
            IF( UPPER )THEN
kusano 2b45e8
               IBEG = 1
kusano 2b45e8
               IEND = J
kusano 2b45e8
            ELSE
kusano 2b45e8
               IBEG = J
kusano 2b45e8
               IEND = N
kusano 2b45e8
            END IF
kusano 2b45e8
            DO 30 I = 1, IBEG - 1
kusano 2b45e8
               IF( AA( I, J ).NE.AS( I, J ) )
kusano 2b45e8
     $            GO TO 70
kusano 2b45e8
   30       CONTINUE
kusano 2b45e8
            DO 40 I = IEND + 1, LDA
kusano 2b45e8
               IF( AA( I, J ).NE.AS( I, J ) )
kusano 2b45e8
     $            GO TO 70
kusano 2b45e8
   40       CONTINUE
kusano 2b45e8
   50    CONTINUE
kusano 2b45e8
      END IF
kusano 2b45e8
*
kusano 2b45e8
   60 CONTINUE
kusano 2b45e8
      LZERES = .TRUE.
kusano 2b45e8
      GO TO 80
kusano 2b45e8
   70 CONTINUE
kusano 2b45e8
      LZERES = .FALSE.
kusano 2b45e8
   80 RETURN
kusano 2b45e8
*
kusano 2b45e8
*     End of LZERES.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      COMPLEX*16     FUNCTION ZBEG( RESET )
kusano 2b45e8
*
kusano 2b45e8
*  Generates complex numbers as pairs of random numbers uniformly
kusano 2b45e8
*  distributed between -0.5 and 0.5.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      LOGICAL            RESET
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      INTEGER            I, IC, J, MI, MJ
kusano 2b45e8
*     .. Save statement ..
kusano 2b45e8
      SAVE               I, IC, J, MI, MJ
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC          DCMPLX
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      IF( RESET )THEN
kusano 2b45e8
*        Initialize local variables.
kusano 2b45e8
         MI = 891
kusano 2b45e8
         MJ = 457
kusano 2b45e8
         I = 7
kusano 2b45e8
         J = 7
kusano 2b45e8
         IC = 0
kusano 2b45e8
         RESET = .FALSE.
kusano 2b45e8
      END IF
kusano 2b45e8
*
kusano 2b45e8
*     The sequence of values of I or J is bounded between 1 and 999.
kusano 2b45e8
*     If initial I or J = 1,2,3,6,7 or 9, the period will be 50.
kusano 2b45e8
*     If initial I or J = 4 or 8, the period will be 25.
kusano 2b45e8
*     If initial I or J = 5, the period will be 10.
kusano 2b45e8
*     IC is used to break up the period by skipping 1 value of I or J
kusano 2b45e8
*     in 6.
kusano 2b45e8
*
kusano 2b45e8
      IC = IC + 1
kusano 2b45e8
   10 I = I*MI
kusano 2b45e8
      J = J*MJ
kusano 2b45e8
      I = I - 1000*( I/1000 )
kusano 2b45e8
      J = J - 1000*( J/1000 )
kusano 2b45e8
      IF( IC.GE.5 )THEN
kusano 2b45e8
         IC = 0
kusano 2b45e8
         GO TO 10
kusano 2b45e8
      END IF
kusano 2b45e8
      ZBEG = DCMPLX( ( I - 500 )/1001.0D0, ( J - 500 )/1001.0D0 )
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
*     End of ZBEG.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      DOUBLE PRECISION FUNCTION DDIFF( X, Y )
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION   X, Y
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      DDIFF = X - Y
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
*     End of DDIFF.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
kusano 2b45e8
*
kusano 2b45e8
*  Tests whether XERBLA has detected an error when it should.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      INTEGER            INFOT, NOUT
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
      CHARACTER*6        SRNAMT
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      IF( .NOT.LERR )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT
kusano 2b45e8
         OK = .FALSE.
kusano 2b45e8
      END IF
kusano 2b45e8
      LERR = .FALSE.
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',
kusano 2b45e8
     $      'ETECTED BY ', A6, ' *****' )
kusano 2b45e8
*
kusano 2b45e8
*     End of CHKXER.
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE XERBLA( SRNAME, INFO )
kusano 2b45e8
*
kusano 2b45e8
*  This is a special version of XERBLA to be used only as part of
kusano 2b45e8
*  the test program for testing error exits from the Level 3 BLAS
kusano 2b45e8
*  routines.
kusano 2b45e8
*
kusano 2b45e8
*  XERBLA  is an error handler for the Level 3 BLAS routines.
kusano 2b45e8
*
kusano 2b45e8
*  It is called by the Level 3 BLAS routines if an input parameter is
kusano 2b45e8
*  invalid.
kusano 2b45e8
*
kusano 2b45e8
*  Auxiliary routine for test program for Level 3 Blas.
kusano 2b45e8
*
kusano 2b45e8
*  -- Written on 8-February-1989.
kusano 2b45e8
*     Jack Dongarra, Argonne National Laboratory.
kusano 2b45e8
*     Iain Duff, AERE Harwell.
kusano 2b45e8
*     Jeremy Du Croz, Numerical Algorithms Group Ltd.
kusano 2b45e8
*     Sven Hammarling, Numerical Algorithms Group Ltd.
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      INTEGER            INFO
kusano 2b45e8
      CHARACTER*6        SRNAME
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER            INFOT, NOUT
kusano 2b45e8
      LOGICAL            LERR, OK
kusano 2b45e8
      CHARACTER*6        SRNAMT
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON             /INFOC/INFOT, NOUT, OK, LERR
kusano 2b45e8
      COMMON             /SRNAMC/SRNAMT
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      LERR = .TRUE.
kusano 2b45e8
      IF( INFO.NE.INFOT )THEN
kusano 2b45e8
         IF( INFOT.NE.0 )THEN
kusano 2b45e8
            WRITE( NOUT, FMT = 9999 )INFO, INFOT
kusano 2b45e8
         ELSE
kusano 2b45e8
            WRITE( NOUT, FMT = 9997 )INFO
kusano 2b45e8
         END IF
kusano 2b45e8
         OK = .FALSE.
kusano 2b45e8
      END IF
kusano 2b45e8
      IF( SRNAME.NE.SRNAMT )THEN
kusano 2b45e8
         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT
kusano 2b45e8
         OK = .FALSE.
kusano 2b45e8
      END IF
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',
kusano 2b45e8
     $      ' OF ', I2, ' *******' )
kusano 2b45e8
 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',
kusano 2b45e8
     $      'AD OF ', A6, ' *******' )
kusano 2b45e8
 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,
kusano 2b45e8
     $      ' *******' )
kusano 2b45e8
*
kusano 2b45e8
*     End of XERBLA
kusano 2b45e8
*
kusano 2b45e8
      END
kusano 2b45e8