LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
schksy.f
Go to the documentation of this file.
00001 *> \brief \b SCHKSY
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *  Definition:
00009 *  ===========
00010 *
00011 *       SUBROUTINE SCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
00012 *                          THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
00013 *                          XACT, WORK, RWORK, IWORK, NOUT )
00014 * 
00015 *       .. Scalar Arguments ..
00016 *       LOGICAL            TSTERR
00017 *       INTEGER            NMAX, NN, NNB, NNS, NOUT
00018 *       REAL               THRESH
00019 *       ..
00020 *       .. Array Arguments ..
00021 *       LOGICAL            DOTYPE( * )
00022 *       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
00023 *       REAL               A( * ), AFAC( * ), AINV( * ), B( * ),
00024 *      $                   RWORK( * ), WORK( * ), X( * ), XACT( * )
00025 *       ..
00026 *  
00027 *
00028 *> \par Purpose:
00029 *  =============
00030 *>
00031 *> \verbatim
00032 *>
00033 *> SCHKSY tests SSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
00034 *> \endverbatim
00035 *
00036 *  Arguments:
00037 *  ==========
00038 *
00039 *> \param[in] DOTYPE
00040 *> \verbatim
00041 *>          DOTYPE is LOGICAL array, dimension (NTYPES)
00042 *>          The matrix types to be used for testing.  Matrices of type j
00043 *>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
00044 *>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
00045 *> \endverbatim
00046 *>
00047 *> \param[in] NN
00048 *> \verbatim
00049 *>          NN is INTEGER
00050 *>          The number of values of N contained in the vector NVAL.
00051 *> \endverbatim
00052 *>
00053 *> \param[in] NVAL
00054 *> \verbatim
00055 *>          NVAL is INTEGER array, dimension (NN)
00056 *>          The values of the matrix dimension N.
00057 *> \endverbatim
00058 *>
00059 *> \param[in] NNB
00060 *> \verbatim
00061 *>          NNB is INTEGER
00062 *>          The number of values of NB contained in the vector NBVAL.
00063 *> \endverbatim
00064 *>
00065 *> \param[in] NBVAL
00066 *> \verbatim
00067 *>          NBVAL is INTEGER array, dimension (NBVAL)
00068 *>          The values of the blocksize NB.
00069 *> \endverbatim
00070 *>
00071 *> \param[in] NNS
00072 *> \verbatim
00073 *>          NNS is INTEGER
00074 *>          The number of values of NRHS contained in the vector NSVAL.
00075 *> \endverbatim
00076 *>
00077 *> \param[in] NSVAL
00078 *> \verbatim
00079 *>          NSVAL is INTEGER array, dimension (NNS)
00080 *>          The values of the number of right hand sides NRHS.
00081 *> \endverbatim
00082 *>
00083 *> \param[in] THRESH
00084 *> \verbatim
00085 *>          THRESH is REAL
00086 *>          The threshold value for the test ratios.  A result is
00087 *>          included in the output file if RESULT >= THRESH.  To have
00088 *>          every test ratio printed, use THRESH = 0.
00089 *> \endverbatim
00090 *>
00091 *> \param[in] TSTERR
00092 *> \verbatim
00093 *>          TSTERR is LOGICAL
00094 *>          Flag that indicates whether error exits are to be tested.
00095 *> \endverbatim
00096 *>
00097 *> \param[in] NMAX
00098 *> \verbatim
00099 *>          NMAX is INTEGER
00100 *>          The maximum value permitted for N, used in dimensioning the
00101 *>          work arrays.
00102 *> \endverbatim
00103 *>
00104 *> \param[out] A
00105 *> \verbatim
00106 *>          A is REAL array, dimension (NMAX*NMAX)
00107 *> \endverbatim
00108 *>
00109 *> \param[out] AFAC
00110 *> \verbatim
00111 *>          AFAC is REAL array, dimension (NMAX*NMAX)
00112 *> \endverbatim
00113 *>
00114 *> \param[out] AINV
00115 *> \verbatim
00116 *>          AINV is REAL array, dimension (NMAX*NMAX)
00117 *> \endverbatim
00118 *>
00119 *> \param[out] B
00120 *> \verbatim
00121 *>          B is REAL array, dimension (NMAX*NSMAX)
00122 *>          where NSMAX is the largest entry in NSVAL.
00123 *> \endverbatim
00124 *>
00125 *> \param[out] X
00126 *> \verbatim
00127 *>          X is REAL array, dimension (NMAX*NSMAX)
00128 *> \endverbatim
00129 *>
00130 *> \param[out] XACT
00131 *> \verbatim
00132 *>          XACT is REAL array, dimension (NMAX*NSMAX)
00133 *> \endverbatim
00134 *>
00135 *> \param[out] WORK
00136 *> \verbatim
00137 *>          WORK is REAL array, dimension
00138 *>                      (NMAX*max(3,NSMAX))
00139 *> \endverbatim
00140 *>
00141 *> \param[out] RWORK
00142 *> \verbatim
00143 *>          RWORK is REAL array, dimension
00144 *>                      (max(NMAX,2*NSMAX))
00145 *> \endverbatim
00146 *>
00147 *> \param[out] IWORK
00148 *> \verbatim
00149 *>          IWORK is INTEGER array, dimension (2*NMAX)
00150 *> \endverbatim
00151 *>
00152 *> \param[in] NOUT
00153 *> \verbatim
00154 *>          NOUT is INTEGER
00155 *>          The unit number for output.
00156 *> \endverbatim
00157 *
00158 *  Authors:
00159 *  ========
00160 *
00161 *> \author Univ. of Tennessee 
00162 *> \author Univ. of California Berkeley 
00163 *> \author Univ. of Colorado Denver 
00164 *> \author NAG Ltd. 
00165 *
00166 *> \date April 2012
00167 *
00168 *> \ingroup single_lin
00169 *
00170 *  =====================================================================
00171       SUBROUTINE SCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
00172      $                   THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
00173      $                   XACT, WORK, RWORK, IWORK, NOUT )
00174 *
00175 *  -- LAPACK test routine (version 3.4.1) --
00176 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00177 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00178 *     April 2012
00179 *
00180 *     .. Scalar Arguments ..
00181       LOGICAL            TSTERR
00182       INTEGER            NMAX, NN, NNB, NNS, NOUT
00183       REAL               THRESH
00184 *     ..
00185 *     .. Array Arguments ..
00186       LOGICAL            DOTYPE( * )
00187       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
00188       REAL               A( * ), AFAC( * ), AINV( * ), B( * ),
00189      $                   RWORK( * ), WORK( * ), X( * ), XACT( * )
00190 *     ..
00191 *
00192 *  =====================================================================
00193 *
00194 *     .. Parameters ..
00195       REAL               ZERO
00196       PARAMETER          ( ZERO = 0.0E+0 )
00197       INTEGER            NTYPES
00198       PARAMETER          ( NTYPES = 10 )
00199       INTEGER            NTESTS
00200       PARAMETER          ( NTESTS = 9 )
00201 *     ..
00202 *     .. Local Scalars ..
00203       LOGICAL            TRFCON, ZEROT
00204       CHARACTER          DIST, TYPE, UPLO, XTYPE
00205       CHARACTER*3        PATH
00206       INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
00207      $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
00208      $                   N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
00209       REAL               ANORM, CNDNUM, RCOND, RCONDC
00210 *     ..
00211 *     .. Local Arrays ..
00212       CHARACTER          UPLOS( 2 )
00213       INTEGER            ISEED( 4 ), ISEEDY( 4 )
00214       REAL               RESULT( NTESTS )
00215 *     ..
00216 *     .. External Functions ..
00217       REAL               SGET06, SLANSY
00218       EXTERNAL           SGET06, SLANSY
00219 *     ..
00220 *     .. External Subroutines ..
00221       EXTERNAL           ALAERH, ALAHD, ALASUM, SERRSY, SGET04, SLACPY,
00222      $                   SLARHS, SLATB4, SLATMS, SPOT02, SPOT03, SPOT05,
00223      $                   SSYCON, SSYCONV, SSYRFS, SSYT01, SSYTRF,
00224      $                   SSYTRI2, SSYTRS, SSYTRS2, XLAENV
00225 *     ..
00226 *     .. Intrinsic Functions ..
00227       INTRINSIC          MAX, MIN
00228 *     ..
00229 *     .. Scalars in Common ..
00230       LOGICAL            LERR, OK
00231       CHARACTER*32       SRNAMT
00232       INTEGER            INFOT, NUNIT
00233 *     ..
00234 *     .. Common blocks ..
00235       COMMON             / INFOC / INFOT, NUNIT, OK, LERR
00236       COMMON             / SRNAMC / SRNAMT
00237 *     ..
00238 *     .. Data statements ..
00239       DATA               ISEEDY / 1988, 1989, 1990, 1991 /
00240       DATA               UPLOS / 'U', 'L' /
00241 *     ..
00242 *     .. Executable Statements ..
00243 *
00244 *     Initialize constants and the random number seed.
00245 *
00246       PATH( 1: 1 ) = 'Single precision'
00247       PATH( 2: 3 ) = 'SY'
00248       NRUN = 0
00249       NFAIL = 0
00250       NERRS = 0
00251       DO 10 I = 1, 4
00252          ISEED( I ) = ISEEDY( I )
00253    10 CONTINUE
00254 *
00255 *     Test the error exits
00256 *
00257       IF( TSTERR )
00258      $   CALL SERRSY( PATH, NOUT )
00259       INFOT = 0
00260 *
00261 *     Set the minimum block size for which the block routine should
00262 *     be used, which will be later returned by ILAENV
00263 *
00264       CALL XLAENV( 2, 2 )
00265 *
00266 *     Do for each value of N in NVAL
00267 *
00268       DO 180 IN = 1, NN
00269          N = NVAL( IN )
00270          LDA = MAX( N, 1 )
00271          XTYPE = 'N'
00272          NIMAT = NTYPES
00273          IF( N.LE.0 )
00274      $      NIMAT = 1
00275 *
00276          IZERO = 0
00277 *
00278 *        Do for each value of matrix type IMAT
00279 *
00280          DO 170 IMAT = 1, NIMAT
00281 *
00282 *           Do the tests only if DOTYPE( IMAT ) is true.
00283 *
00284             IF( .NOT.DOTYPE( IMAT ) )
00285      $         GO TO 170
00286 *
00287 *           Skip types 3, 4, 5, or 6 if the matrix size is too small.
00288 *
00289             ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
00290             IF( ZEROT .AND. N.LT.IMAT-2 )
00291      $         GO TO 170
00292 *
00293 *           Do first for UPLO = 'U', then for UPLO = 'L'
00294 *
00295             DO 160 IUPLO = 1, 2
00296                UPLO = UPLOS( IUPLO )
00297 *
00298 *              Begin generate the test matrix A.
00299 *
00300 *              Set up parameters with SLATB4 for the matrix generator
00301 *              based on the type of matrix to be generated.
00302 *
00303                CALL SLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM, MODE,
00304      $                      CNDNUM, DIST )
00305 *
00306 *              Generate a matrix with SLATMS.
00307 *
00308                SRNAMT = 'SLATMS'
00309                CALL SLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
00310      $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
00311      $                      INFO )
00312 *
00313 *              Check error code from SLATMS and handle error.
00314 *
00315                IF( INFO.NE.0 ) THEN
00316                   CALL ALAERH( PATH, 'SLATMS', INFO, 0, UPLO, N, N, -1,
00317      $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
00318                   GO TO 160
00319                END IF
00320 *
00321 *              For matrix types 3-6, zero one or more rows and
00322 *              columns of the matrix to test that INFO is returned
00323 *              correctly.
00324 *
00325                IF( ZEROT ) THEN
00326                   IF( IMAT.EQ.3 ) THEN
00327                      IZERO = 1
00328                   ELSE IF( IMAT.EQ.4 ) THEN
00329                      IZERO = N
00330                   ELSE
00331                      IZERO = N / 2 + 1
00332                   END IF
00333 *
00334                   IF( IMAT.LT.6 ) THEN
00335 *
00336 *                    Set row and column IZERO to zero.
00337 *
00338                      IF( IUPLO.EQ.1 ) THEN
00339                         IOFF = ( IZERO-1 )*LDA
00340                         DO 20 I = 1, IZERO - 1
00341                            A( IOFF+I ) = ZERO
00342    20                   CONTINUE
00343                         IOFF = IOFF + IZERO
00344                         DO 30 I = IZERO, N
00345                            A( IOFF ) = ZERO
00346                            IOFF = IOFF + LDA
00347    30                   CONTINUE
00348                      ELSE
00349                         IOFF = IZERO
00350                         DO 40 I = 1, IZERO - 1
00351                            A( IOFF ) = ZERO
00352                            IOFF = IOFF + LDA
00353    40                   CONTINUE
00354                         IOFF = IOFF - IZERO
00355                         DO 50 I = IZERO, N
00356                            A( IOFF+I ) = ZERO
00357    50                   CONTINUE
00358                      END IF
00359                   ELSE
00360                      IOFF = 0
00361                      IF( IUPLO.EQ.1 ) THEN
00362 *
00363 *                       Set the first IZERO rows and columns to zero.
00364 *
00365                         DO 70 J = 1, N
00366                            I2 = MIN( J, IZERO )
00367                            DO 60 I = 1, I2
00368                               A( IOFF+I ) = ZERO
00369    60                      CONTINUE
00370                            IOFF = IOFF + LDA
00371    70                   CONTINUE
00372                      ELSE
00373 *
00374 *                       Set the last IZERO rows and columns to zero.
00375 *
00376                         DO 90 J = 1, N
00377                            I1 = MAX( J, IZERO )
00378                            DO 80 I = I1, N
00379                               A( IOFF+I ) = ZERO
00380    80                      CONTINUE
00381                            IOFF = IOFF + LDA
00382    90                   CONTINUE
00383                      END IF
00384                   END IF
00385                ELSE
00386                   IZERO = 0
00387                END IF
00388 *
00389 *              End generate the test matrix A.
00390 *
00391 *              Do for each value of NB in NBVAL
00392 *
00393                DO 150 INB = 1, NNB
00394 *
00395 *                 Set the optimal blocksize, which will be later
00396 *                 returned by ILAENV.
00397 *
00398                   NB = NBVAL( INB )
00399                   CALL XLAENV( 1, NB )
00400 *
00401 *                 Copy the test matrix A into matrix AFAC which
00402 *                 will be factorized in place. This is needed to
00403 *                 preserve the test matrix A for subsequent tests.
00404 *
00405                   CALL SLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
00406 *
00407 *                 Compute the L*D*L**T or U*D*U**T factorization of the
00408 *                 matrix. IWORK stores details of the interchanges and
00409 *                 the block structure of D. AINV is a work array for
00410 *                 block factorization, LWORK is the length of AINV.
00411 *
00412                   LWORK = MAX( 2, NB )*LDA
00413                   SRNAMT = 'SSYTRF'
00414                   CALL SSYTRF( UPLO, N, AFAC, LDA, IWORK, AINV, LWORK,
00415      $                         INFO )
00416 *
00417 *                 Adjust the expected value of INFO to account for
00418 *                 pivoting.
00419 *
00420                   K = IZERO
00421                   IF( K.GT.0 ) THEN
00422   100                CONTINUE
00423                      IF( IWORK( K ).LT.0 ) THEN
00424                         IF( IWORK( K ).NE.-K ) THEN
00425                            K = -IWORK( K )
00426                            GO TO 100
00427                         END IF
00428                      ELSE IF( IWORK( K ).NE.K ) THEN
00429                         K = IWORK( K )
00430                         GO TO 100
00431                      END IF
00432                   END IF
00433 *
00434 *                 Check error code from SSYTRF and handle error.
00435 *
00436                   IF( INFO.NE.K )
00437      $               CALL ALAERH( PATH, 'SSYTRF', INFO, K, UPLO, N, N,
00438      $                            -1, -1, NB, IMAT, NFAIL, NERRS, NOUT )
00439 *
00440 *                 Set the condition estimate flag if the INFO is not 0.
00441 *
00442                   IF( INFO.NE.0 ) THEN
00443                      TRFCON = .TRUE.
00444                   ELSE
00445                      TRFCON = .FALSE.
00446                   END IF
00447 *
00448 *+    TEST 1
00449 *                 Reconstruct matrix from factors and compute residual.
00450 *
00451                   CALL SSYT01( UPLO, N, A, LDA, AFAC, LDA, IWORK, AINV,
00452      $                         LDA, RWORK, RESULT( 1 ) )
00453                   NT = 1
00454 *
00455 *+    TEST 2
00456 *                 Form the inverse and compute the residual,
00457 *                 if the factorization was competed without INFO > 0
00458 *                 (i.e. there is no zero rows and columns).
00459 *                 Do it only for the first block size.
00460 *
00461                   IF( INB.EQ.1 .AND. .NOT.TRFCON ) THEN
00462                      CALL SLACPY( UPLO, N, N, AFAC, LDA, AINV, LDA )
00463                      SRNAMT = 'SSYTRI2'
00464                      LWORK = (N+NB+1)*(NB+3)
00465                      CALL SSYTRI2( UPLO, N, AINV, LDA, IWORK, WORK,
00466      $                            LWORK, INFO )
00467 *
00468 *                    Check error code from SSYTRI2 and handle error.
00469 *
00470                      IF( INFO.NE.0 )
00471      $                  CALL ALAERH( PATH, 'SSYTRI2', INFO, -1, UPLO, N,
00472      $                               N, -1, -1, -1, IMAT, NFAIL, NERRS,
00473      $                               NOUT )
00474 *
00475 *                    Compute the residual for a symmetric matrix times
00476 *                    its inverse.
00477 *
00478                      CALL SPOT03( UPLO, N, A, LDA, AINV, LDA, WORK, LDA,
00479      $                            RWORK, RCONDC, RESULT( 2 ) )
00480                      NT = 2
00481                   END IF
00482 *
00483 *                 Print information about the tests that did not pass
00484 *                 the threshold.
00485 *
00486                   DO 110 K = 1, NT
00487                      IF( RESULT( K ).GE.THRESH ) THEN
00488                         IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00489      $                     CALL ALAHD( NOUT, PATH )
00490                         WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
00491      $                     RESULT( K )
00492                         NFAIL = NFAIL + 1
00493                      END IF
00494   110             CONTINUE
00495                   NRUN = NRUN + NT
00496 *
00497 *                 Skip the other tests if this is not the first block
00498 *                 size.
00499 *
00500                   IF( INB.GT.1 )
00501      $               GO TO 150
00502 *
00503 *                 Do only the condition estimate if INFO is not 0.
00504 *
00505                   IF( TRFCON ) THEN
00506                      RCONDC = ZERO
00507                      GO TO 140
00508                   END IF
00509 *
00510                   DO 130 IRHS = 1, NNS
00511                      NRHS = NSVAL( IRHS )
00512 *
00513 *+    TEST 3 (Using DSYTRS)
00514 *                 Solve and compute residual for  A * X = B.
00515 *
00516 *                    Choose a set of NRHS random solution vectors
00517 *                    stored in XACT and set up the right hand side B
00518 *
00519                      SRNAMT = 'SLARHS'
00520                      CALL SLARHS( PATH, XTYPE, UPLO, ' ', N, N, KL, KU,
00521      $                            NRHS, A, LDA, XACT, LDA, B, LDA,
00522      $                            ISEED, INFO )
00523                      CALL SLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
00524 *
00525                      SRNAMT = 'SSYTRS'
00526                      CALL SSYTRS( UPLO, N, NRHS, AFAC, LDA, IWORK, X,
00527      $                            LDA, INFO )
00528 *
00529 *                    Check error code from SSYTRS and handle error.
00530 *
00531                      IF( INFO.NE.0 )
00532      $                  CALL ALAERH( PATH, 'SSYTRS', INFO, 0, UPLO, N,
00533      $                               N, -1, -1, NRHS, IMAT, NFAIL,
00534      $                               NERRS, NOUT )
00535 *
00536                      CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
00537 *
00538 *                    Compute the residual for the solution
00539 *
00540                      CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
00541      $                            LDA, RWORK, RESULT( 3 ) )
00542 *
00543 *+    TEST 4 (Using DSYTRS2)
00544 *                 Solve and compute residual for  A * X = B.
00545 *
00546 *                    Choose a set of NRHS random solution vectors
00547 *                    stored in XACT and set up the right hand side B
00548 *
00549                      SRNAMT = 'SLARHS'
00550                      CALL SLARHS( PATH, XTYPE, UPLO, ' ', N, N, KL, KU,
00551      $                            NRHS, A, LDA, XACT, LDA, B, LDA,
00552      $                            ISEED, INFO )
00553                      CALL SLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
00554 *
00555                      SRNAMT = 'DSYTRS2'
00556                      CALL SSYTRS2( UPLO, N, NRHS, AFAC, LDA, IWORK, X,
00557      $                            LDA, WORK, INFO )
00558 *
00559 *                    Check error code from SSYTRS2 and handle error.
00560 *
00561                      IF( INFO.NE.0 )
00562      $                  CALL ALAERH( PATH, 'SSYTRS2', INFO, 0, UPLO, N,
00563      $                               N, -1, -1, NRHS, IMAT, NFAIL,
00564      $                               NERRS, NOUT )
00565 *
00566                      CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
00567 *
00568 *                    Compute the residual for the solution
00569 *
00570                      CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
00571      $                            LDA, RWORK, RESULT( 4 ) )
00572 *
00573 *+    TEST 5
00574 *                 Check solution from generated exact solution.
00575 *
00576                      CALL SGET04( N, NRHS, X, LDA, XACT, LDA, RCONDC,
00577      $                            RESULT( 5 ) )
00578 *
00579 *+    TESTS 6, 7, and 8
00580 *                 Use iterative refinement to improve the solution.
00581 *
00582                      SRNAMT = 'SSYRFS'
00583                      CALL SSYRFS( UPLO, N, NRHS, A, LDA, AFAC, LDA,
00584      $                            IWORK, B, LDA, X, LDA, RWORK,
00585      $                            RWORK( NRHS+1 ), WORK, IWORK( N+1 ),
00586      $                            INFO )
00587 *
00588 *                 Check error code from SSYRFS.
00589 *
00590                      IF( INFO.NE.0 )
00591      $                  CALL ALAERH( PATH, 'SSYRFS', INFO, 0, UPLO, N,
00592      $                               N, -1, -1, NRHS, IMAT, NFAIL,
00593      $                               NERRS, NOUT )
00594 *
00595                      CALL SGET04( N, NRHS, X, LDA, XACT, LDA, RCONDC,
00596      $                            RESULT( 6 ) )
00597                      CALL SPOT05( UPLO, N, NRHS, A, LDA, B, LDA, X, LDA,
00598      $                            XACT, LDA, RWORK, RWORK( NRHS+1 ),
00599      $                            RESULT( 7 ) )
00600 *
00601 *                    Print information about the tests that did not pass
00602 *                    the threshold.
00603 *
00604                      DO 120 K = 3, 8
00605                         IF( RESULT( K ).GE.THRESH ) THEN
00606                            IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00607      $                        CALL ALAHD( NOUT, PATH )
00608                            WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
00609      $                        IMAT, K, RESULT( K )
00610                            NFAIL = NFAIL + 1
00611                         END IF
00612   120                CONTINUE
00613                      NRUN = NRUN + 6
00614   130             CONTINUE
00615 *
00616 *+    TEST 9
00617 *                 Get an estimate of RCOND = 1/CNDNUM.
00618 *
00619   140             CONTINUE
00620                   ANORM = SLANSY( '1', UPLO, N, A, LDA, RWORK )
00621                   SRNAMT = 'SSYCON'
00622                   CALL SSYCON( UPLO, N, AFAC, LDA, IWORK, ANORM, RCOND,
00623      $                         WORK, IWORK( N+1 ), INFO )
00624 *
00625 *                 Check error code from SSYCON and handle error.
00626 *
00627                   IF( INFO.NE.0 )
00628      $               CALL ALAERH( PATH, 'SSYCON', INFO, 0, UPLO, N, N,
00629      $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
00630 *
00631 *                 Compute the test ratio to compare to values of RCOND
00632 *
00633                   RESULT( 9 ) = SGET06( RCOND, RCONDC )
00634 *
00635 *                 Print information about the tests that did not pass
00636 *                 the threshold.
00637 *
00638                   IF( RESULT( 9 ).GE.THRESH ) THEN
00639                      IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
00640      $                  CALL ALAHD( NOUT, PATH )
00641                      WRITE( NOUT, FMT = 9997 )UPLO, N, IMAT, 9,
00642      $                  RESULT( 9 )
00643                      NFAIL = NFAIL + 1
00644                   END IF
00645                   NRUN = NRUN + 1
00646   150          CONTINUE
00647 *
00648   160       CONTINUE
00649   170    CONTINUE
00650   180 CONTINUE
00651 *
00652 *     Print a summary of the results.
00653 *
00654       CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
00655 *
00656  9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
00657      $      I2, ', test ', I2, ', ratio =', G12.5 )
00658  9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
00659      $      I2, ', test(', I2, ') =', G12.5 )
00660  9997 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ',', 10X, ' type ', I2,
00661      $      ', test(', I2, ') =', G12.5 )
00662       RETURN
00663 *
00664 *     End of SCHKSY
00665 *
00666       END
 All Files Functions