LAPACK 3.3.0

cdrvge.f

Go to the documentation of this file.
00001       SUBROUTINE CDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
00002      $                   A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
00003      $                   RWORK, IWORK, NOUT )
00004 *
00005 *  -- LAPACK test routine (version 3.1) --
00006 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
00007 *     November 2006
00008 *
00009 *     .. Scalar Arguments ..
00010       LOGICAL            TSTERR
00011       INTEGER            NMAX, NN, NOUT, NRHS
00012       REAL               THRESH
00013 *     ..
00014 *     .. Array Arguments ..
00015       LOGICAL            DOTYPE( * )
00016       INTEGER            IWORK( * ), NVAL( * )
00017       REAL               RWORK( * ), S( * )
00018       COMPLEX            A( * ), AFAC( * ), ASAV( * ), B( * ),
00019      $                   BSAV( * ), WORK( * ), X( * ), XACT( * )
00020 *     ..
00021 *
00022 *  Purpose
00023 *  =======
00024 *
00025 *  CDRVGE tests the driver routines CGESV and -SVX.
00026 *
00027 *  Arguments
00028 *  =========
00029 *
00030 *  DOTYPE  (input) LOGICAL array, dimension (NTYPES)
00031 *          The matrix types to be used for testing.  Matrices of type j
00032 *          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
00033 *          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
00034 *
00035 *  NN      (input) INTEGER
00036 *          The number of values of N contained in the vector NVAL.
00037 *
00038 *  NVAL    (input) INTEGER array, dimension (NN)
00039 *          The values of the matrix column dimension N.
00040 *
00041 *  NRHS    (input) INTEGER
00042 *          The number of right hand side vectors to be generated for
00043 *          each linear system.
00044 *
00045 *  THRESH  (input) REAL
00046 *          The threshold value for the test ratios.  A result is
00047 *          included in the output file if RESULT >= THRESH.  To have
00048 *          every test ratio printed, use THRESH = 0.
00049 *
00050 *  TSTERR  (input) LOGICAL
00051 *          Flag that indicates whether error exits are to be tested.
00052 *
00053 *  NMAX    (input) INTEGER
00054 *          The maximum value permitted for N, used in dimensioning the
00055 *          work arrays.
00056 *
00057 *  A       (workspace) COMPLEX array, dimension (NMAX*NMAX)
00058 *
00059 *  AFAC    (workspace) COMPLEX array, dimension (NMAX*NMAX)
00060 *
00061 *  ASAV    (workspace) COMPLEX array, dimension (NMAX*NMAX)
00062 *
00063 *  B       (workspace) COMPLEX array, dimension (NMAX*NRHS)
00064 *
00065 *  BSAV    (workspace) COMPLEX array, dimension (NMAX*NRHS)
00066 *
00067 *  X       (workspace) COMPLEX array, dimension (NMAX*NRHS)
00068 *
00069 *  XACT    (workspace) COMPLEX array, dimension (NMAX*NRHS)
00070 *
00071 *  S       (workspace) REAL array, dimension (2*NMAX)
00072 *
00073 *  WORK    (workspace) COMPLEX array, dimension
00074 *                      (NMAX*max(3,NRHS))
00075 *
00076 *  RWORK   (workspace) REAL array, dimension (2*NRHS+NMAX)
00077 *
00078 *  IWORK   (workspace) INTEGER array, dimension (NMAX)
00079 *
00080 *  NOUT    (input) INTEGER
00081 *          The unit number for output.
00082 *
00083 *  =====================================================================
00084 *
00085 *     .. Parameters ..
00086       REAL               ONE, ZERO
00087       PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )
00088       INTEGER            NTYPES
00089       PARAMETER          ( NTYPES = 11 )
00090       INTEGER            NTESTS
00091       PARAMETER          ( NTESTS = 7 )
00092       INTEGER            NTRAN
00093       PARAMETER          ( NTRAN = 3 )
00094 *     ..
00095 *     .. Local Scalars ..
00096       LOGICAL            EQUIL, NOFACT, PREFAC, TRFCON, ZEROT
00097       CHARACTER          DIST, EQUED, FACT, TRANS, TYPE, XTYPE
00098       CHARACTER*3        PATH
00099       INTEGER            I, IEQUED, IFACT, IMAT, IN, INFO, IOFF, ITRAN,
00100      $                   IZERO, K, K1, KL, KU, LDA, LWORK, MODE, N, NB,
00101      $                   NBMIN, NERRS, NFACT, NFAIL, NIMAT, NRUN, NT
00102       REAL               AINVNM, AMAX, ANORM, ANORMI, ANORMO, CNDNUM,
00103      $                   COLCND, RCOND, RCONDC, RCONDI, RCONDO, ROLDC,
00104      $                   ROLDI, ROLDO, ROWCND, RPVGRW
00105 *     ..
00106 *     .. Local Arrays ..
00107       CHARACTER          EQUEDS( 4 ), FACTS( 3 ), TRANSS( NTRAN )
00108       INTEGER            ISEED( 4 ), ISEEDY( 4 )
00109       REAL               RDUM( 1 ), RESULT( NTESTS )
00110 *     ..
00111 *     .. External Functions ..
00112       LOGICAL            LSAME
00113       REAL               CLANGE, CLANTR, SGET06, SLAMCH
00114       EXTERNAL           LSAME, CLANGE, CLANTR, SGET06, SLAMCH
00115 *     ..
00116 *     .. External Subroutines ..
00117       EXTERNAL           ALADHD, ALAERH, ALASVM, CERRVX, CGEEQU, CGESV,
00118      $                   CGESVX, CGET01, CGET02, CGET04, CGET07, CGETRF,
00119      $                   CGETRI, CLACPY, CLAQGE, CLARHS, CLASET, CLATB4,
00120      $                   CLATMS, XLAENV
00121 *     ..
00122 *     .. Intrinsic Functions ..
00123       INTRINSIC          ABS, CMPLX, MAX
00124 *     ..
00125 *     .. Scalars in Common ..
00126       LOGICAL            LERR, OK
00127       CHARACTER*32       SRNAMT
00128       INTEGER            INFOT, NUNIT
00129 *     ..
00130 *     .. Common blocks ..
00131       COMMON             / INFOC / INFOT, NUNIT, OK, LERR
00132       COMMON             / SRNAMC / SRNAMT
00133 *     ..
00134 *     .. Data statements ..
00135       DATA               ISEEDY / 1988, 1989, 1990, 1991 /
00136       DATA               TRANSS / 'N', 'T', 'C' /
00137       DATA               FACTS / 'F', 'N', 'E' /
00138       DATA               EQUEDS / 'N', 'R', 'C', 'B' /
00139 *     ..
00140 *     .. Executable Statements ..
00141 *
00142 *     Initialize constants and the random number seed.
00143 *
00144       PATH( 1: 1 ) = 'Complex precision'
00145       PATH( 2: 3 ) = 'GE'
00146       NRUN = 0
00147       NFAIL = 0
00148       NERRS = 0
00149       DO 10 I = 1, 4
00150          ISEED( I ) = ISEEDY( I )
00151    10 CONTINUE
00152 *
00153 *     Test the error exits
00154 *
00155       IF( TSTERR )
00156      $   CALL CERRVX( PATH, NOUT )
00157       INFOT = 0
00158 *
00159 *     Set the block size and minimum block size for testing.
00160 *
00161       NB = 1
00162       NBMIN = 2
00163       CALL XLAENV( 1, NB )
00164       CALL XLAENV( 2, NBMIN )
00165 *
00166 *     Do for each value of N in NVAL
00167 *
00168       DO 90 IN = 1, NN
00169          N = NVAL( IN )
00170          LDA = MAX( N, 1 )
00171          XTYPE = 'N'
00172          NIMAT = NTYPES
00173          IF( N.LE.0 )
00174      $      NIMAT = 1
00175 *
00176          DO 80 IMAT = 1, NIMAT
00177 *
00178 *           Do the tests only if DOTYPE( IMAT ) is true.
00179 *
00180             IF( .NOT.DOTYPE( IMAT ) )
00181      $         GO TO 80
00182 *
00183 *           Skip types 5, 6, or 7 if the matrix size is too small.
00184 *
00185             ZEROT = IMAT.GE.5 .AND. IMAT.LE.7
00186             IF( ZEROT .AND. N.LT.IMAT-4 )
00187      $         GO TO 80
00188 *
00189 *           Set up parameters with CLATB4 and generate a test matrix
00190 *           with CLATMS.
00191 *
00192             CALL CLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM, MODE,
00193      $                   CNDNUM, DIST )
00194             RCONDC = ONE / CNDNUM
00195 *
00196             SRNAMT = 'CLATMS'
00197             CALL CLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE, CNDNUM,
00198      $                   ANORM, KL, KU, 'No packing', A, LDA, WORK,
00199      $                   INFO )
00200 *
00201 *           Check error code from CLATMS.
00202 *
00203             IF( INFO.NE.0 ) THEN
00204                CALL ALAERH( PATH, 'CLATMS', INFO, 0, ' ', N, N, -1, -1,
00205      $                      -1, IMAT, NFAIL, NERRS, NOUT )
00206                GO TO 80
00207             END IF
00208 *
00209 *           For types 5-7, zero one or more columns of the matrix to
00210 *           test that INFO is returned correctly.
00211 *
00212             IF( ZEROT ) THEN
00213                IF( IMAT.EQ.5 ) THEN
00214                   IZERO = 1
00215                ELSE IF( IMAT.EQ.6 ) THEN
00216                   IZERO = N
00217                ELSE
00218                   IZERO = N / 2 + 1
00219                END IF
00220                IOFF = ( IZERO-1 )*LDA
00221                IF( IMAT.LT.7 ) THEN
00222                   DO 20 I = 1, N
00223                      A( IOFF+I ) = ZERO
00224    20             CONTINUE
00225                ELSE
00226                   CALL CLASET( 'Full', N, N-IZERO+1, CMPLX( ZERO ),
00227      $                         CMPLX( ZERO ), A( IOFF+1 ), LDA )
00228                END IF
00229             ELSE
00230                IZERO = 0
00231             END IF
00232 *
00233 *           Save a copy of the matrix A in ASAV.
00234 *
00235             CALL CLACPY( 'Full', N, N, A, LDA, ASAV, LDA )
00236 *
00237             DO 70 IEQUED = 1, 4
00238                EQUED = EQUEDS( IEQUED )
00239                IF( IEQUED.EQ.1 ) THEN
00240                   NFACT = 3
00241                ELSE
00242                   NFACT = 1
00243                END IF
00244 *
00245                DO 60 IFACT = 1, NFACT
00246                   FACT = FACTS( IFACT )
00247                   PREFAC = LSAME( FACT, 'F' )
00248                   NOFACT = LSAME( FACT, 'N' )
00249                   EQUIL = LSAME( FACT, 'E' )
00250 *
00251                   IF( ZEROT ) THEN
00252                      IF( PREFAC )
00253      $                  GO TO 60
00254                      RCONDO = ZERO
00255                      RCONDI = ZERO
00256 *
00257                   ELSE IF( .NOT.NOFACT ) THEN
00258 *
00259 *                    Compute the condition number for comparison with
00260 *                    the value returned by CGESVX (FACT = 'N' reuses
00261 *                    the condition number from the previous iteration
00262 *                    with FACT = 'F').
00263 *
00264                      CALL CLACPY( 'Full', N, N, ASAV, LDA, AFAC, LDA )
00265                      IF( EQUIL .OR. IEQUED.GT.1 ) THEN
00266 *
00267 *                       Compute row and column scale factors to
00268 *                       equilibrate the matrix A.
00269 *
00270                         CALL CGEEQU( N, N, AFAC, LDA, S, S( N+1 ),
00271      $                               ROWCND, COLCND, AMAX, INFO )
00272                         IF( INFO.EQ.0 .AND. N.GT.0 ) THEN
00273                            IF( LSAME( EQUED, 'R' ) ) THEN
00274                               ROWCND = ZERO
00275                               COLCND = ONE
00276                            ELSE IF( LSAME( EQUED, 'C' ) ) THEN
00277                               ROWCND = ONE
00278                               COLCND = ZERO
00279                            ELSE IF( LSAME( EQUED, 'B' ) ) THEN
00280                               ROWCND = ZERO
00281                               COLCND = ZERO
00282                            END IF
00283 *
00284 *                          Equilibrate the matrix.
00285 *
00286                            CALL CLAQGE( N, N, AFAC, LDA, S, S( N+1 ),
00287      $                                  ROWCND, COLCND, AMAX, EQUED )
00288                         END IF
00289                      END IF
00290 *
00291 *                    Save the condition number of the non-equilibrated
00292 *                    system for use in CGET04.
00293 *
00294                      IF( EQUIL ) THEN
00295                         ROLDO = RCONDO
00296                         ROLDI = RCONDI
00297                      END IF
00298 *
00299 *                    Compute the 1-norm and infinity-norm of A.
00300 *
00301                      ANORMO = CLANGE( '1', N, N, AFAC, LDA, RWORK )
00302                      ANORMI = CLANGE( 'I', N, N, AFAC, LDA, RWORK )
00303 *
00304 *                    Factor the matrix A.
00305 *
00306                      CALL CGETRF( N, N, AFAC, LDA, IWORK, INFO )
00307 *
00308 *                    Form the inverse of A.
00309 *
00310                      CALL CLACPY( 'Full', N, N, AFAC, LDA, A, LDA )
00311                      LWORK = NMAX*MAX( 3, NRHS )
00312                      CALL CGETRI( N, A, LDA, IWORK, WORK, LWORK, INFO )
00313 *
00314 *                    Compute the 1-norm condition number of A.
00315 *
00316                      AINVNM = CLANGE( '1', N, N, A, LDA, RWORK )
00317                      IF( ANORMO.LE.ZERO .OR. AINVNM.LE.ZERO ) THEN
00318                         RCONDO = ONE
00319                      ELSE
00320                         RCONDO = ( ONE / ANORMO ) / AINVNM
00321                      END IF
00322 *
00323 *                    Compute the infinity-norm condition number of A.
00324 *
00325                      AINVNM = CLANGE( 'I', N, N, A, LDA, RWORK )
00326                      IF( ANORMI.LE.ZERO .OR. AINVNM.LE.ZERO ) THEN
00327                         RCONDI = ONE
00328                      ELSE
00329                         RCONDI = ( ONE / ANORMI ) / AINVNM
00330                      END IF
00331                   END IF
00332 *
00333                   DO 50 ITRAN = 1, NTRAN
00334 *
00335 *                    Do for each value of TRANS.
00336 *
00337                      TRANS = TRANSS( ITRAN )
00338                      IF( ITRAN.EQ.1 ) THEN
00339                         RCONDC = RCONDO
00340                      ELSE
00341                         RCONDC = RCONDI
00342                      END IF
00343 *
00344 *                    Restore the matrix A.
00345 *
00346                      CALL CLACPY( 'Full', N, N, ASAV, LDA, A, LDA )
00347 *
00348 *                    Form an exact solution and set the right hand side.
00349 *
00350                      SRNAMT = 'CLARHS'
00351                      CALL CLARHS( PATH, XTYPE, 'Full', TRANS, N, N, KL,
00352      $                            KU, NRHS, A, LDA, XACT, LDA, B, LDA,
00353      $                            ISEED, INFO )
00354                      XTYPE = 'C'
00355                      CALL CLACPY( 'Full', N, NRHS, B, LDA, BSAV, LDA )
00356 *
00357                      IF( NOFACT .AND. ITRAN.EQ.1 ) THEN
00358 *
00359 *                       --- Test CGESV  ---
00360 *
00361 *                       Compute the LU factorization of the matrix and
00362 *                       solve the system.
00363 *
00364                         CALL CLACPY( 'Full', N, N, A, LDA, AFAC, LDA )
00365                         CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
00366 *
00367                         SRNAMT = 'CGESV '
00368                         CALL CGESV( N, NRHS, AFAC, LDA, IWORK, X, LDA,
00369      $                              INFO )
00370 *
00371 *                       Check error code from CGESV .
00372 *
00373                         IF( INFO.NE.IZERO )
00374      $                     CALL ALAERH( PATH, 'CGESV ', INFO, IZERO,
00375      $                                  ' ', N, N, -1, -1, NRHS, IMAT,
00376      $                                  NFAIL, NERRS, NOUT )
00377 *
00378 *                       Reconstruct matrix from factors and compute
00379 *                       residual.
00380 *
00381                         CALL CGET01( N, N, A, LDA, AFAC, LDA, IWORK,
00382      $                               RWORK, RESULT( 1 ) )
00383                         NT = 1
00384                         IF( IZERO.EQ.0 ) THEN
00385 *
00386 *                          Compute residual of the computed solution.
00387 *
00388                            CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK,
00389      $                                  LDA )
00390                            CALL CGET02( 'No transpose', N, N, NRHS, A,
00391      $                                  LDA, X, LDA, WORK, LDA, RWORK,
00392      $                                  RESULT( 2 ) )
00393 *
00394 *                          Check solution from generated exact solution.
00395 *
00396                            CALL CGET04( N, NRHS, X, LDA, XACT, LDA,
00397      $                                  RCONDC, RESULT( 3 ) )
00398                            NT = 3
00399                         END IF
00400 *
00401 *                       Print information about the tests that did not
00402 *                       pass the threshold.
00403 *
00404                         DO 30 K = 1, NT
00405                            IF( RESULT( K ).GE.THRESH ) THEN
00406                               IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00407      $                           CALL ALADHD( NOUT, PATH )
00408                               WRITE( NOUT, FMT = 9999 )'CGESV ', N,
00409      $                           IMAT, K, RESULT( K )
00410                               NFAIL = NFAIL + 1
00411                            END IF
00412    30                   CONTINUE
00413                         NRUN = NRUN + NT
00414                      END IF
00415 *
00416 *                    --- Test CGESVX ---
00417 *
00418                      IF( .NOT.PREFAC )
00419      $                  CALL CLASET( 'Full', N, N, CMPLX( ZERO ),
00420      $                               CMPLX( ZERO ), AFAC, LDA )
00421                      CALL CLASET( 'Full', N, NRHS, CMPLX( ZERO ),
00422      $                            CMPLX( ZERO ), X, LDA )
00423                      IF( IEQUED.GT.1 .AND. N.GT.0 ) THEN
00424 *
00425 *                       Equilibrate the matrix if FACT = 'F' and
00426 *                       EQUED = 'R', 'C', or 'B'.
00427 *
00428                         CALL CLAQGE( N, N, A, LDA, S, S( N+1 ), ROWCND,
00429      $                               COLCND, AMAX, EQUED )
00430                      END IF
00431 *
00432 *                    Solve the system and compute the condition number
00433 *                    and error bounds using CGESVX.
00434 *
00435                      SRNAMT = 'CGESVX'
00436                      CALL CGESVX( FACT, TRANS, N, NRHS, A, LDA, AFAC,
00437      $                            LDA, IWORK, EQUED, S, S( N+1 ), B,
00438      $                            LDA, X, LDA, RCOND, RWORK,
00439      $                            RWORK( NRHS+1 ), WORK,
00440      $                            RWORK( 2*NRHS+1 ), INFO )
00441 *
00442 *                    Check the error code from CGESVX.
00443 *
00444                      IF( INFO.NE.IZERO )
00445      $                  CALL ALAERH( PATH, 'CGESVX', INFO, IZERO,
00446      $                               FACT // TRANS, N, N, -1, -1, NRHS,
00447      $                               IMAT, NFAIL, NERRS, NOUT )
00448 *
00449 *                    Compare RWORK(2*NRHS+1) from CGESVX with the
00450 *                    computed reciprocal pivot growth factor RPVGRW
00451 *
00452                      IF( INFO.NE.0 ) THEN
00453                         RPVGRW = CLANTR( 'M', 'U', 'N', INFO, INFO,
00454      $                           AFAC, LDA, RDUM )
00455                         IF( RPVGRW.EQ.ZERO ) THEN
00456                            RPVGRW = ONE
00457                         ELSE
00458                            RPVGRW = CLANGE( 'M', N, INFO, A, LDA,
00459      $                              RDUM ) / RPVGRW
00460                         END IF
00461                      ELSE
00462                         RPVGRW = CLANTR( 'M', 'U', 'N', N, N, AFAC, LDA,
00463      $                           RDUM )
00464                         IF( RPVGRW.EQ.ZERO ) THEN
00465                            RPVGRW = ONE
00466                         ELSE
00467                            RPVGRW = CLANGE( 'M', N, N, A, LDA, RDUM ) /
00468      $                              RPVGRW
00469                         END IF
00470                      END IF
00471                      RESULT( 7 ) = ABS( RPVGRW-RWORK( 2*NRHS+1 ) ) /
00472      $                             MAX( RWORK( 2*NRHS+1 ), RPVGRW ) /
00473      $                             SLAMCH( 'E' )
00474 *
00475                      IF( .NOT.PREFAC ) THEN
00476 *
00477 *                       Reconstruct matrix from factors and compute
00478 *                       residual.
00479 *
00480                         CALL CGET01( N, N, A, LDA, AFAC, LDA, IWORK,
00481      $                               RWORK( 2*NRHS+1 ), RESULT( 1 ) )
00482                         K1 = 1
00483                      ELSE
00484                         K1 = 2
00485                      END IF
00486 *
00487                      IF( INFO.EQ.0 ) THEN
00488                         TRFCON = .FALSE.
00489 *
00490 *                       Compute residual of the computed solution.
00491 *
00492                         CALL CLACPY( 'Full', N, NRHS, BSAV, LDA, WORK,
00493      $                               LDA )
00494                         CALL CGET02( TRANS, N, N, NRHS, ASAV, LDA, X,
00495      $                               LDA, WORK, LDA, RWORK( 2*NRHS+1 ),
00496      $                               RESULT( 2 ) )
00497 *
00498 *                       Check solution from generated exact solution.
00499 *
00500                         IF( NOFACT .OR. ( PREFAC .AND. LSAME( EQUED,
00501      $                      'N' ) ) ) THEN
00502                            CALL CGET04( N, NRHS, X, LDA, XACT, LDA,
00503      $                                  RCONDC, RESULT( 3 ) )
00504                         ELSE
00505                            IF( ITRAN.EQ.1 ) THEN
00506                               ROLDC = ROLDO
00507                            ELSE
00508                               ROLDC = ROLDI
00509                            END IF
00510                            CALL CGET04( N, NRHS, X, LDA, XACT, LDA,
00511      $                                  ROLDC, RESULT( 3 ) )
00512                         END IF
00513 *
00514 *                       Check the error bounds from iterative
00515 *                       refinement.
00516 *
00517                         CALL CGET07( TRANS, N, NRHS, ASAV, LDA, B, LDA,
00518      $                               X, LDA, XACT, LDA, RWORK, .TRUE.,
00519      $                               RWORK( NRHS+1 ), RESULT( 4 ) )
00520                      ELSE
00521                         TRFCON = .TRUE.
00522                      END IF
00523 *
00524 *                    Compare RCOND from CGESVX with the computed value
00525 *                    in RCONDC.
00526 *
00527                      RESULT( 6 ) = SGET06( RCOND, RCONDC )
00528 *
00529 *                    Print information about the tests that did not pass
00530 *                    the threshold.
00531 *
00532                      IF( .NOT.TRFCON ) THEN
00533                         DO 40 K = K1, NTESTS
00534                            IF( RESULT( K ).GE.THRESH ) THEN
00535                               IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00536      $                           CALL ALADHD( NOUT, PATH )
00537                               IF( PREFAC ) THEN
00538                                  WRITE( NOUT, FMT = 9997 )'CGESVX',
00539      $                              FACT, TRANS, N, EQUED, IMAT, K,
00540      $                              RESULT( K )
00541                               ELSE
00542                                  WRITE( NOUT, FMT = 9998 )'CGESVX',
00543      $                              FACT, TRANS, N, IMAT, K, RESULT( K )
00544                               END IF
00545                               NFAIL = NFAIL + 1
00546                            END IF
00547    40                   CONTINUE
00548                         NRUN = NRUN + 7 - K1
00549                      ELSE
00550                         IF( RESULT( 1 ).GE.THRESH .AND. .NOT.PREFAC )
00551      $                       THEN
00552                            IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00553      $                        CALL ALADHD( NOUT, PATH )
00554                            IF( PREFAC ) THEN
00555                               WRITE( NOUT, FMT = 9997 )'CGESVX', FACT,
00556      $                           TRANS, N, EQUED, IMAT, 1, RESULT( 1 )
00557                            ELSE
00558                               WRITE( NOUT, FMT = 9998 )'CGESVX', FACT,
00559      $                           TRANS, N, IMAT, 1, RESULT( 1 )
00560                            END IF
00561                            NFAIL = NFAIL + 1
00562                            NRUN = NRUN + 1
00563                         END IF
00564                         IF( RESULT( 6 ).GE.THRESH ) THEN
00565                            IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00566      $                        CALL ALADHD( NOUT, PATH )
00567                            IF( PREFAC ) THEN
00568                               WRITE( NOUT, FMT = 9997 )'CGESVX', FACT,
00569      $                           TRANS, N, EQUED, IMAT, 6, RESULT( 6 )
00570                            ELSE
00571                               WRITE( NOUT, FMT = 9998 )'CGESVX', FACT,
00572      $                           TRANS, N, IMAT, 6, RESULT( 6 )
00573                            END IF
00574                            NFAIL = NFAIL + 1
00575                            NRUN = NRUN + 1
00576                         END IF
00577                         IF( RESULT( 7 ).GE.THRESH ) THEN
00578                            IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00579      $                        CALL ALADHD( NOUT, PATH )
00580                            IF( PREFAC ) THEN
00581                               WRITE( NOUT, FMT = 9997 )'CGESVX', FACT,
00582      $                           TRANS, N, EQUED, IMAT, 7, RESULT( 7 )
00583                            ELSE
00584                               WRITE( NOUT, FMT = 9998 )'CGESVX', FACT,
00585      $                           TRANS, N, IMAT, 7, RESULT( 7 )
00586                            END IF
00587                            NFAIL = NFAIL + 1
00588                            NRUN = NRUN + 1
00589                         END IF
00590 *
00591                      END IF
00592 *
00593    50             CONTINUE
00594    60          CONTINUE
00595    70       CONTINUE
00596    80    CONTINUE
00597    90 CONTINUE
00598 *
00599 *     Print a summary of the results.
00600 *
00601       CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
00602 *
00603  9999 FORMAT( 1X, A, ', N =', I5, ', type ', I2, ', test(', I2, ') =',
00604      $      G12.5 )
00605  9998 FORMAT( 1X, A, ', FACT=''', A1, ''', TRANS=''', A1, ''', N=', I5,
00606      $      ', type ', I2, ', test(', I1, ')=', G12.5 )
00607  9997 FORMAT( 1X, A, ', FACT=''', A1, ''', TRANS=''', A1, ''', N=', I5,
00608      $      ', EQUED=''', A1, ''', type ', I2, ', test(', I1, ')=',
00609      $      G12.5 )
00610       RETURN
00611 *
00612 *     End of CDRVGE
00613 *
00614       END
 All Files Functions