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