LAPACK 3.3.1
Linear Algebra PACKage

zdrvhex.f

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