LAPACK 3.3.1
Linear Algebra PACKage

zchkaa.f

Go to the documentation of this file.
00001       PROGRAM ZCHKAA
00002 *
00003 *  -- LAPACK test routine (version 3.1.1) --
00004 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
00005 *     January 2007
00006 *
00007 *  Purpose
00008 *  =======
00009 *
00010 *  ZCHKAA is the main test program for the COMPLEX*16 linear equation
00011 *  routines.
00012 *
00013 *  The program must be driven by a short data file. The first 14 records
00014 *  specify problem dimensions and program options using list-directed
00015 *  input.  The remaining lines specify the LAPACK test paths and the
00016 *  number of matrix types to use in testing.  An annotated example of a
00017 *  data file can be obtained by deleting the first 3 characters from the
00018 *  following 38 lines:
00019 *  Data file for testing COMPLEX*16 LAPACK linear equation routines
00020 *  7                      Number of values of M
00021 *  0 1 2 3 5 10 16        Values of M (row dimension)
00022 *  7                      Number of values of N
00023 *  0 1 2 3 5 10 16        Values of N (column dimension)
00024 *  1                      Number of values of NRHS
00025 *  2                      Values of NRHS (number of right hand sides)
00026 *  5                      Number of values of NB
00027 *  1 3 3 3 20             Values of NB (the blocksize)
00028 *  1 0 5 9 1              Values of NX (crossover point)
00029 *  3                      Number of values of RANK
00030 *  30 50 90               Values of rank (as a % of N)
00031 *  30.0                   Threshold value of test ratio
00032 *  T                      Put T to test the LAPACK routines
00033 *  T                      Put T to test the driver routines
00034 *  T                      Put T to test the error exits
00035 *  ZGE   11               List types on next line if 0 < NTYPES < 11
00036 *  ZGB    8               List types on next line if 0 < NTYPES <  8
00037 *  ZGT   12               List types on next line if 0 < NTYPES < 12
00038 *  ZPO    9               List types on next line if 0 < NTYPES <  9
00039 *  ZPS    9               List types on next line if 0 < NTYPES <  9
00040 *  ZPP    9               List types on next line if 0 < NTYPES <  9
00041 *  ZPB    8               List types on next line if 0 < NTYPES <  8
00042 *  ZPT   12               List types on next line if 0 < NTYPES < 12
00043 *  ZHE   10               List types on next line if 0 < NTYPES < 10
00044 *  ZHP   10               List types on next line if 0 < NTYPES < 10
00045 *  ZSY   11               List types on next line if 0 < NTYPES < 11
00046 *  ZSP   11               List types on next line if 0 < NTYPES < 11
00047 *  ZTR   18               List types on next line if 0 < NTYPES < 18
00048 *  ZTP   18               List types on next line if 0 < NTYPES < 18
00049 *  ZTB   17               List types on next line if 0 < NTYPES < 17
00050 *  ZQR    8               List types on next line if 0 < NTYPES <  8
00051 *  ZRQ    8               List types on next line if 0 < NTYPES <  8
00052 *  ZLQ    8               List types on next line if 0 < NTYPES <  8
00053 *  ZQL    8               List types on next line if 0 < NTYPES <  8
00054 *  ZQP    6               List types on next line if 0 < NTYPES <  6
00055 *  ZTZ    3               List types on next line if 0 < NTYPES <  3
00056 *  ZLS    6               List types on next line if 0 < NTYPES <  6
00057 *  ZEQ
00058 *
00059 *  Internal Parameters
00060 *  ===================
00061 *
00062 *  NMAX    INTEGER
00063 *          The maximum allowable value for N.
00064 *
00065 *  MAXIN   INTEGER
00066 *          The number of different values that can be used for each of
00067 *          M, N, or NB
00068 *
00069 *  MAXRHS  INTEGER
00070 *          The maximum number of right hand sides
00071 *
00072 *  NIN     INTEGER
00073 *          The unit number for input
00074 *
00075 *  NOUT    INTEGER
00076 *          The unit number for output
00077 *
00078 *  =====================================================================
00079 *
00080 *     .. Parameters ..
00081       INTEGER            NMAX
00082       PARAMETER          ( NMAX = 132 )
00083       INTEGER            MAXIN
00084       PARAMETER          ( MAXIN = 12 )
00085       INTEGER            MAXRHS
00086       PARAMETER          ( MAXRHS = 16 )
00087       INTEGER            MATMAX
00088       PARAMETER          ( MATMAX = 30 )
00089       INTEGER            NIN, NOUT
00090       PARAMETER          ( NIN = 5, NOUT = 6 )
00091       INTEGER            KDMAX
00092       PARAMETER          ( KDMAX = NMAX+( NMAX+1 ) / 4 )
00093 *     ..
00094 *     .. Local Scalars ..
00095       LOGICAL            FATAL, TSTCHK, TSTDRV, TSTERR
00096       CHARACTER          C1
00097       CHARACTER*2        C2
00098       CHARACTER*3        PATH
00099       CHARACTER*10       INTSTR
00100       CHARACTER*72       ALINE
00101       INTEGER            I, IC, J, K, LA, LAFAC, LDA, NB, NM, NMATS, NN,
00102      $                   NNB, NNB2, NNS, NRHS, NTYPES, NRANK,
00103      $                   VERS_MAJOR, VERS_MINOR, VERS_PATCH
00104       DOUBLE PRECISION   EPS, S1, S2, THREQ, THRESH
00105 *     ..
00106 *     .. Local Arrays ..
00107       LOGICAL            DOTYPE( MATMAX )
00108       INTEGER            IWORK( 25*NMAX ), MVAL( MAXIN ),
00109      $                   NBVAL( MAXIN ), NBVAL2( MAXIN ),
00110      $                   NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ),
00111      $                   RANKVAL( MAXIN ), PIV( NMAX )
00112       DOUBLE PRECISION   RWORK( 150*NMAX+2*MAXRHS ), S( 2*NMAX )
00113       COMPLEX*16         A( ( KDMAX+1 )*NMAX, 7 ), B( NMAX*MAXRHS, 4 ),
00114      $                   WORK( NMAX, NMAX+MAXRHS+10 )
00115 *     ..
00116 *     .. External Functions ..
00117       LOGICAL            LSAME, LSAMEN
00118       DOUBLE PRECISION   DLAMCH, DSECND
00119       EXTERNAL           LSAME, LSAMEN, DLAMCH, DSECND
00120 *     ..
00121 *     .. External Subroutines ..
00122       EXTERNAL           ALAREQ, ZCHKEQ, ZCHKGB, ZCHKGE, ZCHKGT, ZCHKHE,
00123      $                   ZCHKHP, ZCHKLQ, ZCHKPB, ZCHKPO, ZCHKPS, ZCHKPP,
00124      $                   ZCHKPT, ZCHKQ3, ZCHKQL, ZCHKQP, ZCHKQR, ZCHKRQ,
00125      $                   ZCHKSP, ZCHKSY, ZCHKTB, ZCHKTP, ZCHKTR, ZCHKTZ,
00126      $                   ZDRVGB, ZDRVGE, ZDRVGT, ZDRVHE, ZDRVHP, ZDRVLS,
00127      $                   ZDRVPB, ZDRVPO, ZDRVPP, ZDRVPT, ZDRVSP, ZDRVSY,
00128      $                   ILAVER
00129 *     ..
00130 *     .. Scalars in Common ..
00131       LOGICAL            LERR, OK
00132       CHARACTER*32       SRNAMT
00133       INTEGER            INFOT, NUNIT
00134 *     ..
00135 *     .. Arrays in Common ..
00136       INTEGER            IPARMS( 100 )
00137 *     ..
00138 *     .. Common blocks ..
00139       COMMON             / INFOC / INFOT, NUNIT, OK, LERR
00140       COMMON             / SRNAMC / SRNAMT
00141       COMMON             / CLAENV / IPARMS
00142 *     ..
00143 *     .. Data statements ..
00144       DATA               THREQ / 2.0D0 / , INTSTR / '0123456789' /
00145 *     ..
00146 *     .. Executable Statements ..
00147 *
00148       S1 = DSECND( )
00149       LDA = NMAX
00150       FATAL = .FALSE.
00151 *
00152 *     Read a dummy line.
00153 *
00154       READ( NIN, FMT = * )
00155 *
00156 *     Report values of parameters.
00157 *
00158       CALL ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
00159       WRITE( NOUT, FMT = 9994 ) VERS_MAJOR, VERS_MINOR, VERS_PATCH
00160 *
00161 *     Read the values of M
00162 *
00163       READ( NIN, FMT = * )NM
00164       IF( NM.LT.1 ) THEN
00165          WRITE( NOUT, FMT = 9996 )' NM ', NM, 1
00166          NM = 0
00167          FATAL = .TRUE.
00168       ELSE IF( NM.GT.MAXIN ) THEN
00169          WRITE( NOUT, FMT = 9995 )' NM ', NM, MAXIN
00170          NM = 0
00171          FATAL = .TRUE.
00172       END IF
00173       READ( NIN, FMT = * )( MVAL( I ), I = 1, NM )
00174       DO 10 I = 1, NM
00175          IF( MVAL( I ).LT.0 ) THEN
00176             WRITE( NOUT, FMT = 9996 )' M  ', MVAL( I ), 0
00177             FATAL = .TRUE.
00178          ELSE IF( MVAL( I ).GT.NMAX ) THEN
00179             WRITE( NOUT, FMT = 9995 )' M  ', MVAL( I ), NMAX
00180             FATAL = .TRUE.
00181          END IF
00182    10 CONTINUE
00183       IF( NM.GT.0 )
00184      $   WRITE( NOUT, FMT = 9993 )'M   ', ( MVAL( I ), I = 1, NM )
00185 *
00186 *     Read the values of N
00187 *
00188       READ( NIN, FMT = * )NN
00189       IF( NN.LT.1 ) THEN
00190          WRITE( NOUT, FMT = 9996 )' NN ', NN, 1
00191          NN = 0
00192          FATAL = .TRUE.
00193       ELSE IF( NN.GT.MAXIN ) THEN
00194          WRITE( NOUT, FMT = 9995 )' NN ', NN, MAXIN
00195          NN = 0
00196          FATAL = .TRUE.
00197       END IF
00198       READ( NIN, FMT = * )( NVAL( I ), I = 1, NN )
00199       DO 20 I = 1, NN
00200          IF( NVAL( I ).LT.0 ) THEN
00201             WRITE( NOUT, FMT = 9996 )' N  ', NVAL( I ), 0
00202             FATAL = .TRUE.
00203          ELSE IF( NVAL( I ).GT.NMAX ) THEN
00204             WRITE( NOUT, FMT = 9995 )' N  ', NVAL( I ), NMAX
00205             FATAL = .TRUE.
00206          END IF
00207    20 CONTINUE
00208       IF( NN.GT.0 )
00209      $   WRITE( NOUT, FMT = 9993 )'N   ', ( NVAL( I ), I = 1, NN )
00210 *
00211 *     Read the values of NRHS
00212 *
00213       READ( NIN, FMT = * )NNS
00214       IF( NNS.LT.1 ) THEN
00215          WRITE( NOUT, FMT = 9996 )' NNS', NNS, 1
00216          NNS = 0
00217          FATAL = .TRUE.
00218       ELSE IF( NNS.GT.MAXIN ) THEN
00219          WRITE( NOUT, FMT = 9995 )' NNS', NNS, MAXIN
00220          NNS = 0
00221          FATAL = .TRUE.
00222       END IF
00223       READ( NIN, FMT = * )( NSVAL( I ), I = 1, NNS )
00224       DO 30 I = 1, NNS
00225          IF( NSVAL( I ).LT.0 ) THEN
00226             WRITE( NOUT, FMT = 9996 )'NRHS', NSVAL( I ), 0
00227             FATAL = .TRUE.
00228          ELSE IF( NSVAL( I ).GT.MAXRHS ) THEN
00229             WRITE( NOUT, FMT = 9995 )'NRHS', NSVAL( I ), MAXRHS
00230             FATAL = .TRUE.
00231          END IF
00232    30 CONTINUE
00233       IF( NNS.GT.0 )
00234      $   WRITE( NOUT, FMT = 9993 )'NRHS', ( NSVAL( I ), I = 1, NNS )
00235 *
00236 *     Read the values of NB
00237 *
00238       READ( NIN, FMT = * )NNB
00239       IF( NNB.LT.1 ) THEN
00240          WRITE( NOUT, FMT = 9996 )'NNB ', NNB, 1
00241          NNB = 0
00242          FATAL = .TRUE.
00243       ELSE IF( NNB.GT.MAXIN ) THEN
00244          WRITE( NOUT, FMT = 9995 )'NNB ', NNB, MAXIN
00245          NNB = 0
00246          FATAL = .TRUE.
00247       END IF
00248       READ( NIN, FMT = * )( NBVAL( I ), I = 1, NNB )
00249       DO 40 I = 1, NNB
00250          IF( NBVAL( I ).LT.0 ) THEN
00251             WRITE( NOUT, FMT = 9996 )' NB ', NBVAL( I ), 0
00252             FATAL = .TRUE.
00253          END IF
00254    40 CONTINUE
00255       IF( NNB.GT.0 )
00256      $   WRITE( NOUT, FMT = 9993 )'NB  ', ( NBVAL( I ), I = 1, NNB )
00257 *
00258 *     Set NBVAL2 to be the set of unique values of NB
00259 *
00260       NNB2 = 0
00261       DO 60 I = 1, NNB
00262          NB = NBVAL( I )
00263          DO 50 J = 1, NNB2
00264             IF( NB.EQ.NBVAL2( J ) )
00265      $         GO TO 60
00266    50    CONTINUE
00267          NNB2 = NNB2 + 1
00268          NBVAL2( NNB2 ) = NB
00269    60 CONTINUE
00270 *
00271 *     Read the values of NX
00272 *
00273       READ( NIN, FMT = * )( NXVAL( I ), I = 1, NNB )
00274       DO 70 I = 1, NNB
00275          IF( NXVAL( I ).LT.0 ) THEN
00276             WRITE( NOUT, FMT = 9996 )' NX ', NXVAL( I ), 0
00277             FATAL = .TRUE.
00278          END IF
00279    70 CONTINUE
00280       IF( NNB.GT.0 )
00281      $   WRITE( NOUT, FMT = 9993 )'NX  ', ( NXVAL( I ), I = 1, NNB )
00282 *
00283 *     Read the values of RANKVAL
00284 *
00285       READ( NIN, FMT = * )NRANK
00286       IF( NN.LT.1 ) THEN
00287          WRITE( NOUT, FMT = 9996 )' NRANK ', NRANK, 1
00288          NRANK = 0
00289          FATAL = .TRUE.
00290       ELSE IF( NN.GT.MAXIN ) THEN
00291          WRITE( NOUT, FMT = 9995 )' NRANK ', NRANK, MAXIN
00292          NRANK = 0
00293          FATAL = .TRUE.
00294       END IF
00295       READ( NIN, FMT = * )( RANKVAL( I ), I = 1, NRANK )
00296       DO I = 1, NRANK
00297          IF( RANKVAL( I ).LT.0 ) THEN
00298             WRITE( NOUT, FMT = 9996 )' RANK  ', RANKVAL( I ), 0
00299             FATAL = .TRUE.
00300          ELSE IF( RANKVAL( I ).GT.100 ) THEN
00301             WRITE( NOUT, FMT = 9995 )' RANK  ', RANKVAL( I ), 100
00302             FATAL = .TRUE.
00303          END IF
00304       END DO
00305       IF( NRANK.GT.0 )
00306      $   WRITE( NOUT, FMT = 9993 )'RANK % OF N',
00307      $   ( RANKVAL( I ), I = 1, NRANK )
00308 *
00309 *     Read the threshold value for the test ratios.
00310 *
00311       READ( NIN, FMT = * )THRESH
00312       WRITE( NOUT, FMT = 9992 )THRESH
00313 *
00314 *     Read the flag that indicates whether to test the LAPACK routines.
00315 *
00316       READ( NIN, FMT = * )TSTCHK
00317 *
00318 *     Read the flag that indicates whether to test the driver routines.
00319 *
00320       READ( NIN, FMT = * )TSTDRV
00321 *
00322 *     Read the flag that indicates whether to test the error exits.
00323 *
00324       READ( NIN, FMT = * )TSTERR
00325 *
00326       IF( FATAL ) THEN
00327          WRITE( NOUT, FMT = 9999 )
00328          STOP
00329       END IF
00330 *
00331 *     Calculate and print the machine dependent constants.
00332 *
00333       EPS = DLAMCH( 'Underflow threshold' )
00334       WRITE( NOUT, FMT = 9991 )'underflow', EPS
00335       EPS = DLAMCH( 'Overflow threshold' )
00336       WRITE( NOUT, FMT = 9991 )'overflow ', EPS
00337       EPS = DLAMCH( 'Epsilon' )
00338       WRITE( NOUT, FMT = 9991 )'precision', EPS
00339       WRITE( NOUT, FMT = * )
00340       NRHS = NSVAL( 1 )
00341 *
00342    80 CONTINUE
00343 *
00344 *     Read a test path and the number of matrix types to use.
00345 *
00346       READ( NIN, FMT = '(A72)', END = 140 )ALINE
00347       PATH = ALINE( 1: 3 )
00348       NMATS = MATMAX
00349       I = 3
00350    90 CONTINUE
00351       I = I + 1
00352       IF( I.GT.72 )
00353      $   GO TO 130
00354       IF( ALINE( I: I ).EQ.' ' )
00355      $   GO TO 90
00356       NMATS = 0
00357   100 CONTINUE
00358       C1 = ALINE( I: I )
00359       DO 110 K = 1, 10
00360          IF( C1.EQ.INTSTR( K: K ) ) THEN
00361             IC = K - 1
00362             GO TO 120
00363          END IF
00364   110 CONTINUE
00365       GO TO 130
00366   120 CONTINUE
00367       NMATS = NMATS*10 + IC
00368       I = I + 1
00369       IF( I.GT.72 )
00370      $   GO TO 130
00371       GO TO 100
00372   130 CONTINUE
00373       C1 = PATH( 1: 1 )
00374       C2 = PATH( 2: 3 )
00375 *
00376 *     Check first character for correct precision.
00377 *
00378       IF( .NOT.LSAME( C1, 'Zomplex precision' ) ) THEN
00379          WRITE( NOUT, FMT = 9990 )PATH
00380 *
00381       ELSE IF( NMATS.LE.0 ) THEN
00382 *
00383 *        Check for a positive number of tests requested.
00384 *
00385          WRITE( NOUT, FMT = 9989 )PATH
00386 *
00387       ELSE IF( LSAMEN( 2, C2, 'GE' ) ) THEN
00388 *
00389 *        GE:  general matrices
00390 *
00391          NTYPES = 11
00392          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00393 *
00394          IF( TSTCHK ) THEN
00395             CALL ZCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB2, NBVAL2, NNS,
00396      $                   NSVAL, THRESH, TSTERR, LDA, A( 1, 1 ),
00397      $                   A( 1, 2 ), A( 1, 3 ), B( 1, 1 ), B( 1, 2 ),
00398      $                   B( 1, 3 ), WORK, RWORK, IWORK, NOUT )
00399          ELSE
00400             WRITE( NOUT, FMT = 9989 )PATH
00401          END IF
00402 *
00403          IF( TSTDRV ) THEN
00404             CALL ZDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00405      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00406      $                   B( 1, 2 ), B( 1, 3 ), B( 1, 4 ), S, WORK,
00407      $                   RWORK, IWORK, NOUT )
00408          ELSE
00409             WRITE( NOUT, FMT = 9988 )PATH
00410          END IF
00411 *
00412       ELSE IF( LSAMEN( 2, C2, 'GB' ) ) THEN
00413 *
00414 *        GB:  general banded matrices
00415 *
00416          LA = ( 2*KDMAX+1 )*NMAX
00417          LAFAC = ( 3*KDMAX+1 )*NMAX
00418          NTYPES = 8
00419          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00420 *
00421          IF( TSTCHK ) THEN
00422             CALL ZCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB2, NBVAL2, NNS,
00423      $                   NSVAL, THRESH, TSTERR, A( 1, 1 ), LA,
00424      $                   A( 1, 3 ), LAFAC, B( 1, 1 ), B( 1, 2 ),
00425      $                   B( 1, 3 ), WORK, RWORK, IWORK, NOUT )
00426          ELSE
00427             WRITE( NOUT, FMT = 9989 )PATH
00428          END IF
00429 *
00430          IF( TSTDRV ) THEN
00431             CALL ZDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
00432      $                   A( 1, 1 ), LA, A( 1, 3 ), LAFAC, A( 1, 6 ),
00433      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), B( 1, 4 ), S,
00434      $                   WORK, RWORK, IWORK, NOUT )
00435          ELSE
00436             WRITE( NOUT, FMT = 9988 )PATH
00437          END IF
00438 *
00439       ELSE IF( LSAMEN( 2, C2, 'GT' ) ) THEN
00440 *
00441 *        GT:  general tridiagonal matrices
00442 *
00443          NTYPES = 12
00444          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00445 *
00446          IF( TSTCHK ) THEN
00447             CALL ZCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00448      $                   A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ),
00449      $                   B( 1, 3 ), WORK, RWORK, IWORK, NOUT )
00450          ELSE
00451             WRITE( NOUT, FMT = 9989 )PATH
00452          END IF
00453 *
00454          IF( TSTDRV ) THEN
00455             CALL ZDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
00456      $                   A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ),
00457      $                   B( 1, 3 ), WORK, RWORK, IWORK, NOUT )
00458          ELSE
00459             WRITE( NOUT, FMT = 9988 )PATH
00460          END IF
00461 *
00462       ELSE IF( LSAMEN( 2, C2, 'PO' ) ) THEN
00463 *
00464 *        PO:  positive definite matrices
00465 *
00466          NTYPES = 9
00467          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00468 *
00469          IF( TSTCHK ) THEN
00470             CALL ZCHKPO( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS, NSVAL,
00471      $                   THRESH, TSTERR, LDA, A( 1, 1 ), A( 1, 2 ),
00472      $                   A( 1, 3 ), B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
00473      $                   WORK, RWORK, NOUT )
00474          ELSE
00475             WRITE( NOUT, FMT = 9989 )PATH
00476          END IF
00477 *
00478          IF( TSTDRV ) THEN
00479             CALL ZDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00480      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00481      $                   B( 1, 2 ), B( 1, 3 ), B( 1, 4 ), S, WORK,
00482      $                   RWORK, NOUT )
00483          ELSE
00484             WRITE( NOUT, FMT = 9988 )PATH
00485          END IF
00486 *
00487       ELSE IF( LSAMEN( 2, C2, 'PS' ) ) THEN
00488 *
00489 *        PS:  positive semi-definite matrices
00490 *
00491          NTYPES = 9
00492 *
00493          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00494 *
00495          IF( TSTCHK ) THEN
00496             CALL ZCHKPS( DOTYPE, NN, NVAL, NNB2, NBVAL2, NRANK,
00497      $                   RANKVAL, THRESH, TSTERR, LDA, A( 1, 1 ),
00498      $                   A( 1, 2 ), A( 1, 3 ), PIV, WORK, RWORK,
00499      $                   NOUT )
00500          ELSE
00501             WRITE( NOUT, FMT = 9989 )PATH
00502          END IF
00503 *
00504       ELSE IF( LSAMEN( 2, C2, 'PP' ) ) THEN
00505 *
00506 *        PP:  positive definite packed matrices
00507 *
00508          NTYPES = 9
00509          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00510 *
00511          IF( TSTCHK ) THEN
00512             CALL ZCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00513      $                   LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
00514      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), WORK, RWORK,
00515      $                   NOUT )
00516          ELSE
00517             WRITE( NOUT, FMT = 9989 )PATH
00518          END IF
00519 *
00520          IF( TSTDRV ) THEN
00521             CALL ZDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00522      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00523      $                   B( 1, 2 ), B( 1, 3 ), B( 1, 4 ), S, WORK,
00524      $                   RWORK, NOUT )
00525          ELSE
00526             WRITE( NOUT, FMT = 9988 )PATH
00527          END IF
00528 *
00529       ELSE IF( LSAMEN( 2, C2, 'PB' ) ) THEN
00530 *
00531 *        PB:  positive definite banded matrices
00532 *
00533          NTYPES = 8
00534          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00535 *
00536          IF( TSTCHK ) THEN
00537             CALL ZCHKPB( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS, NSVAL,
00538      $                   THRESH, TSTERR, LDA, A( 1, 1 ), A( 1, 2 ),
00539      $                   A( 1, 3 ), B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
00540      $                   WORK, RWORK, NOUT )
00541          ELSE
00542             WRITE( NOUT, FMT = 9989 )PATH
00543          END IF
00544 *
00545          IF( TSTDRV ) THEN
00546             CALL ZDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00547      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00548      $                   B( 1, 2 ), B( 1, 3 ), B( 1, 4 ), S, WORK,
00549      $                   RWORK, NOUT )
00550          ELSE
00551             WRITE( NOUT, FMT = 9988 )PATH
00552          END IF
00553 *
00554       ELSE IF( LSAMEN( 2, C2, 'PT' ) ) THEN
00555 *
00556 *        PT:  positive definite tridiagonal matrices
00557 *
00558          NTYPES = 12
00559          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00560 *
00561          IF( TSTCHK ) THEN
00562             CALL ZCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00563      $                   A( 1, 1 ), S, A( 1, 2 ), B( 1, 1 ), B( 1, 2 ),
00564      $                   B( 1, 3 ), WORK, RWORK, NOUT )
00565          ELSE
00566             WRITE( NOUT, FMT = 9989 )PATH
00567          END IF
00568 *
00569          IF( TSTDRV ) THEN
00570             CALL ZDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
00571      $                   A( 1, 1 ), S, A( 1, 2 ), B( 1, 1 ), B( 1, 2 ),
00572      $                   B( 1, 3 ), WORK, RWORK, NOUT )
00573          ELSE
00574             WRITE( NOUT, FMT = 9988 )PATH
00575          END IF
00576 *
00577       ELSE IF( LSAMEN( 2, C2, 'HE' ) ) THEN
00578 *
00579 *        HE:  Hermitian indefinite matrices
00580 *
00581          NTYPES = 10
00582          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00583 *
00584          IF( TSTCHK ) THEN
00585             CALL ZCHKHE( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS, NSVAL,
00586      $                   THRESH, TSTERR, LDA, A( 1, 1 ), A( 1, 2 ),
00587      $                   A( 1, 3 ), B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
00588      $                   WORK, RWORK, IWORK, NOUT )
00589          ELSE
00590             WRITE( NOUT, FMT = 9989 )PATH
00591          END IF
00592 *
00593          IF( TSTDRV ) THEN
00594             CALL ZDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00595      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00596      $                   B( 1, 2 ), B( 1, 3 ), WORK, RWORK, IWORK,
00597      $                   NOUT )
00598          ELSE
00599             WRITE( NOUT, FMT = 9988 )PATH
00600          END IF
00601 *
00602       ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
00603 *
00604 *        HP:  Hermitian indefinite packed matrices
00605 *
00606          NTYPES = 10
00607          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00608 *
00609          IF( TSTCHK ) THEN
00610             CALL ZCHKHP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00611      $                   LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
00612      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), WORK, RWORK,
00613      $                   IWORK, NOUT )
00614          ELSE
00615             WRITE( NOUT, FMT = 9989 )PATH
00616          END IF
00617 *
00618          IF( TSTDRV ) THEN
00619             CALL ZDRVHP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00620      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00621      $                   B( 1, 2 ), B( 1, 3 ), WORK, RWORK, IWORK,
00622      $                   NOUT )
00623          ELSE
00624             WRITE( NOUT, FMT = 9988 )PATH
00625          END IF
00626 *
00627       ELSE IF( LSAMEN( 2, C2, 'SY' ) ) THEN
00628 *
00629 *        SY:  symmetric indefinite matrices
00630 *
00631          NTYPES = 11
00632          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00633 *
00634          IF( TSTCHK ) THEN
00635             CALL ZCHKSY( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS, NSVAL,
00636      $                   THRESH, TSTERR, LDA, A( 1, 1 ), A( 1, 2 ),
00637      $                   A( 1, 3 ), B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
00638      $                   WORK, RWORK, IWORK, NOUT )
00639          ELSE
00640             WRITE( NOUT, FMT = 9989 )PATH
00641          END IF
00642 *
00643          IF( TSTDRV ) THEN
00644             CALL ZDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00645      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00646      $                   B( 1, 2 ), B( 1, 3 ), WORK, RWORK, IWORK,
00647      $                   NOUT )
00648          ELSE
00649             WRITE( NOUT, FMT = 9988 )PATH
00650          END IF
00651 *
00652       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
00653 *
00654 *        SP:  symmetric indefinite packed matrices
00655 *
00656          NTYPES = 11
00657          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00658 *
00659          IF( TSTCHK ) THEN
00660             CALL ZCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00661      $                   LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
00662      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), WORK, RWORK,
00663      $                   IWORK, NOUT )
00664          ELSE
00665             WRITE( NOUT, FMT = 9989 )PATH
00666          END IF
00667 *
00668          IF( TSTDRV ) THEN
00669             CALL ZDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, LDA,
00670      $                   A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), B( 1, 1 ),
00671      $                   B( 1, 2 ), B( 1, 3 ), WORK, RWORK, IWORK,
00672      $                   NOUT )
00673          ELSE
00674             WRITE( NOUT, FMT = 9988 )PATH
00675          END IF
00676 *
00677       ELSE IF( LSAMEN( 2, C2, 'TR' ) ) THEN
00678 *
00679 *        TR:  triangular matrices
00680 *
00681          NTYPES = 18
00682          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00683 *
00684          IF( TSTCHK ) THEN
00685             CALL ZCHKTR( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS, NSVAL,
00686      $                   THRESH, TSTERR, LDA, A( 1, 1 ), A( 1, 2 ),
00687      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), WORK, RWORK,
00688      $                   NOUT )
00689          ELSE
00690             WRITE( NOUT, FMT = 9989 )PATH
00691          END IF
00692 *
00693       ELSE IF( LSAMEN( 2, C2, 'TP' ) ) THEN
00694 *
00695 *        TP:  triangular packed matrices
00696 *
00697          NTYPES = 18
00698          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00699 *
00700          IF( TSTCHK ) THEN
00701             CALL ZCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00702      $                   LDA, A( 1, 1 ), A( 1, 2 ), B( 1, 1 ),
00703      $                   B( 1, 2 ), B( 1, 3 ), WORK, RWORK, NOUT )
00704          ELSE
00705             WRITE( NOUT, FMT = 9989 )PATH
00706          END IF
00707 *
00708       ELSE IF( LSAMEN( 2, C2, 'TB' ) ) THEN
00709 *
00710 *        TB:  triangular banded matrices
00711 *
00712          NTYPES = 17
00713          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00714 *
00715          IF( TSTCHK ) THEN
00716             CALL ZCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
00717      $                   LDA, A( 1, 1 ), A( 1, 2 ), B( 1, 1 ),
00718      $                   B( 1, 2 ), B( 1, 3 ), WORK, RWORK, NOUT )
00719          ELSE
00720             WRITE( NOUT, FMT = 9989 )PATH
00721          END IF
00722 *
00723       ELSE IF( LSAMEN( 2, C2, 'QR' ) ) THEN
00724 *
00725 *        QR:  QR factorization
00726 *
00727          NTYPES = 8
00728          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00729 *
00730          IF( TSTCHK ) THEN
00731             CALL ZCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
00732      $                   NRHS, THRESH, TSTERR, NMAX, A( 1, 1 ),
00733      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
00734      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), B( 1, 4 ),
00735      $                   WORK, RWORK, IWORK, NOUT )
00736          ELSE
00737             WRITE( NOUT, FMT = 9989 )PATH
00738          END IF
00739 *
00740       ELSE IF( LSAMEN( 2, C2, 'LQ' ) ) THEN
00741 *
00742 *        LQ:  LQ factorization
00743 *
00744          NTYPES = 8
00745          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00746 *
00747          IF( TSTCHK ) THEN
00748             CALL ZCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
00749      $                   NRHS, THRESH, TSTERR, NMAX, A( 1, 1 ),
00750      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
00751      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), B( 1, 4 ),
00752      $                   WORK, RWORK, IWORK, NOUT )
00753          ELSE
00754             WRITE( NOUT, FMT = 9989 )PATH
00755          END IF
00756 *
00757       ELSE IF( LSAMEN( 2, C2, 'QL' ) ) THEN
00758 *
00759 *        QL:  QL factorization
00760 *
00761          NTYPES = 8
00762          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00763 *
00764          IF( TSTCHK ) THEN
00765             CALL ZCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
00766      $                   NRHS, THRESH, TSTERR, NMAX, A( 1, 1 ),
00767      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
00768      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), B( 1, 4 ),
00769      $                   WORK, RWORK, IWORK, NOUT )
00770          ELSE
00771             WRITE( NOUT, FMT = 9989 )PATH
00772          END IF
00773 *
00774       ELSE IF( LSAMEN( 2, C2, 'RQ' ) ) THEN
00775 *
00776 *        RQ:  RQ factorization
00777 *
00778          NTYPES = 8
00779          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00780 *
00781          IF( TSTCHK ) THEN
00782             CALL ZCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
00783      $                   NRHS, THRESH, TSTERR, NMAX, A( 1, 1 ),
00784      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
00785      $                   B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), B( 1, 4 ),
00786      $                   WORK, RWORK, IWORK, NOUT )
00787          ELSE
00788             WRITE( NOUT, FMT = 9989 )PATH
00789          END IF
00790 *
00791       ELSE IF( LSAMEN( 2, C2, 'EQ' ) ) THEN
00792 *
00793 *        EQ:  Equilibration routines for general and positive definite
00794 *             matrices (THREQ should be between 2 and 10)
00795 *
00796          IF( TSTCHK ) THEN
00797             CALL ZCHKEQ( THREQ, NOUT )
00798          ELSE
00799             WRITE( NOUT, FMT = 9989 )PATH
00800          END IF
00801 *
00802       ELSE IF( LSAMEN( 2, C2, 'TZ' ) ) THEN
00803 *
00804 *        TZ:  Trapezoidal matrix
00805 *
00806          NTYPES = 3
00807          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00808 *
00809          IF( TSTCHK ) THEN
00810             CALL ZCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR,
00811      $                   A( 1, 1 ), A( 1, 2 ), S( 1 ), S( NMAX+1 ),
00812      $                   B( 1, 1 ), WORK, RWORK, NOUT )
00813          ELSE
00814             WRITE( NOUT, FMT = 9989 )PATH
00815          END IF
00816 *
00817       ELSE IF( LSAMEN( 2, C2, 'QP' ) ) THEN
00818 *
00819 *        QP:  QR factorization with pivoting
00820 *
00821          NTYPES = 6
00822          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00823 *
00824          IF( TSTCHK ) THEN
00825             CALL ZCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR,
00826      $                   A( 1, 1 ), A( 1, 2 ), S( 1 ), S( NMAX+1 ),
00827      $                   B( 1, 1 ), WORK, RWORK, IWORK, NOUT )
00828             CALL ZCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
00829      $                   THRESH, A( 1, 1 ), A( 1, 2 ), S( 1 ),
00830      $                   S( NMAX+1 ), B( 1, 1 ), WORK, RWORK, IWORK,
00831      $                   NOUT )
00832          ELSE
00833             WRITE( NOUT, FMT = 9989 )PATH
00834          END IF
00835 *
00836       ELSE IF( LSAMEN( 2, C2, 'LS' ) ) THEN
00837 *
00838 *        LS:  Least squares drivers
00839 *
00840          NTYPES = 6
00841          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00842 *
00843          IF( TSTDRV ) THEN
00844             CALL ZDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
00845      $                   NBVAL, NXVAL, THRESH, TSTERR, A( 1, 1 ),
00846      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
00847      $                   S( 1 ), S( NMAX+1 ), WORK, RWORK, IWORK,
00848      $                   NOUT )
00849          ELSE
00850             WRITE( NOUT, FMT = 9989 )PATH
00851          END IF
00852 *
00853       ELSE
00854 *
00855          WRITE( NOUT, FMT = 9990 )PATH
00856       END IF
00857 *
00858 *     Go back to get another input line.
00859 *
00860       GO TO 80
00861 *
00862 *     Branch to this line when the last record is read.
00863 *
00864   140 CONTINUE
00865       CLOSE ( NIN )
00866       S2 = DSECND( )
00867       WRITE( NOUT, FMT = 9998 )
00868       WRITE( NOUT, FMT = 9997 )S2 - S1
00869 *
00870  9999 FORMAT( / ' Execution not attempted due to input errors' )
00871  9998 FORMAT( / ' End of tests' )
00872  9997 FORMAT( ' Total time used = ', F12.2, ' seconds', / )
00873  9996 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be >=',
00874      $      I6 )
00875  9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
00876      $      I6 )
00877  9994 FORMAT( ' Tests of the COMPLEX*16 LAPACK routines ',
00878      $      / ' LAPACK VERSION ', I1, '.', I1, '.', I1,
00879      $      / / ' The following parameter values will be used:' )
00880  9993 FORMAT( 4X, A4, ':  ', 10I6, / 11X, 10I6 )
00881  9992 FORMAT( / ' Routines pass computational tests if test ratio is ',
00882      $      'less than', F8.2, / )
00883  9991 FORMAT( ' Relative machine ', A, ' is taken to be', D16.6 )
00884  9990 FORMAT( / 1X, A3, ':  Unrecognized path name' )
00885  9989 FORMAT( / 1X, A3, ' routines were not tested' )
00886  9988 FORMAT( / 1X, A3, ' driver routines were not tested' )
00887 *
00888 *     End of ZCHKAA
00889 *
00890       END
 All Files Functions