1*> \brief \b CCHKEC 2* 3* =========== DOCUMENTATION =========== 4* 5* Online html documentation available at 6* http://www.netlib.org/lapack/explore-html/ 7* 8* Definition: 9* =========== 10* 11* SUBROUTINE CCHKEC( THRESH, TSTERR, NIN, NOUT ) 12* 13* .. Scalar Arguments .. 14* LOGICAL TSTERR 15* INTEGER NIN, NOUT 16* REAL THRESH 17* .. 18* 19* 20*> \par Purpose: 21* ============= 22*> 23*> \verbatim 24*> 25*> CCHKEC tests eigen- condition estimation routines 26*> CTRSYL, CTREXC, CTRSNA, CTRSEN 27*> 28*> In all cases, the routine runs through a fixed set of numerical 29*> examples, subjects them to various tests, and compares the test 30*> results to a threshold THRESH. In addition, CTRSNA and CTRSEN are 31*> tested by reading in precomputed examples from a file (on input unit 32*> NIN). Output is written to output unit NOUT. 33*> \endverbatim 34* 35* Arguments: 36* ========== 37* 38*> \param[in] THRESH 39*> \verbatim 40*> THRESH is REAL 41*> Threshold for residual tests. A computed test ratio passes 42*> the threshold if it is less than THRESH. 43*> \endverbatim 44*> 45*> \param[in] TSTERR 46*> \verbatim 47*> TSTERR is LOGICAL 48*> Flag that indicates whether error exits are to be tested. 49*> \endverbatim 50*> 51*> \param[in] NIN 52*> \verbatim 53*> NIN is INTEGER 54*> The logical unit number for input. 55*> \endverbatim 56*> 57*> \param[in] NOUT 58*> \verbatim 59*> NOUT is INTEGER 60*> The logical unit number for output. 61*> \endverbatim 62* 63* Authors: 64* ======== 65* 66*> \author Univ. of Tennessee 67*> \author Univ. of California Berkeley 68*> \author Univ. of Colorado Denver 69*> \author NAG Ltd. 70* 71*> \date November 2011 72* 73*> \ingroup complex_eig 74* 75* ===================================================================== 76 SUBROUTINE CCHKEC( THRESH, TSTERR, NIN, NOUT ) 77* 78* -- LAPACK test routine (version 3.4.0) -- 79* -- LAPACK is a software package provided by Univ. of Tennessee, -- 80* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 81* November 2011 82* 83* .. Scalar Arguments .. 84 LOGICAL TSTERR 85 INTEGER NIN, NOUT 86 REAL THRESH 87* .. 88* 89* ===================================================================== 90* 91* .. Local Scalars .. 92 LOGICAL OK 93 CHARACTER*3 PATH 94 INTEGER KTREXC, KTRSEN, KTRSNA, KTRSYL, LTREXC, LTRSYL, 95 $ NTESTS, NTREXC, NTRSYL 96 REAL EPS, RTREXC, RTRSYL, SFMIN 97* .. 98* .. Local Arrays .. 99 INTEGER LTRSEN( 3 ), LTRSNA( 3 ), NTRSEN( 3 ), 100 $ NTRSNA( 3 ) 101 REAL RTRSEN( 3 ), RTRSNA( 3 ) 102* .. 103* .. External Subroutines .. 104 EXTERNAL CERREC, CGET35, CGET36, CGET37, CGET38 105* .. 106* .. External Functions .. 107 REAL SLAMCH 108 EXTERNAL SLAMCH 109* .. 110* .. Executable Statements .. 111* 112 PATH( 1: 1 ) = 'Complex precision' 113 PATH( 2: 3 ) = 'EC' 114 EPS = SLAMCH( 'P' ) 115 SFMIN = SLAMCH( 'S' ) 116 WRITE( NOUT, FMT = 9994 ) 117 WRITE( NOUT, FMT = 9993 )EPS, SFMIN 118 WRITE( NOUT, FMT = 9992 )THRESH 119* 120* Test error exits if TSTERR is .TRUE. 121* 122 IF( TSTERR ) 123 $ CALL CERREC( PATH, NOUT ) 124* 125 OK = .TRUE. 126 CALL CGET35( RTRSYL, LTRSYL, NTRSYL, KTRSYL, NIN ) 127 IF( RTRSYL.GT.THRESH ) THEN 128 OK = .FALSE. 129 WRITE( NOUT, FMT = 9999 )RTRSYL, LTRSYL, NTRSYL, KTRSYL 130 END IF 131* 132 CALL CGET36( RTREXC, LTREXC, NTREXC, KTREXC, NIN ) 133 IF( RTREXC.GT.THRESH .OR. NTREXC.GT.0 ) THEN 134 OK = .FALSE. 135 WRITE( NOUT, FMT = 9998 )RTREXC, LTREXC, NTREXC, KTREXC 136 END IF 137* 138 CALL CGET37( RTRSNA, LTRSNA, NTRSNA, KTRSNA, NIN ) 139 IF( RTRSNA( 1 ).GT.THRESH .OR. RTRSNA( 2 ).GT.THRESH .OR. 140 $ NTRSNA( 1 ).NE.0 .OR. NTRSNA( 2 ).NE.0 .OR. NTRSNA( 3 ).NE.0 ) 141 $ THEN 142 OK = .FALSE. 143 WRITE( NOUT, FMT = 9997 )RTRSNA, LTRSNA, NTRSNA, KTRSNA 144 END IF 145* 146 CALL CGET38( RTRSEN, LTRSEN, NTRSEN, KTRSEN, NIN ) 147 IF( RTRSEN( 1 ).GT.THRESH .OR. RTRSEN( 2 ).GT.THRESH .OR. 148 $ NTRSEN( 1 ).NE.0 .OR. NTRSEN( 2 ).NE.0 .OR. NTRSEN( 3 ).NE.0 ) 149 $ THEN 150 OK = .FALSE. 151 WRITE( NOUT, FMT = 9996 )RTRSEN, LTRSEN, NTRSEN, KTRSEN 152 END IF 153* 154 NTESTS = KTRSYL + KTREXC + KTRSNA + KTRSEN 155 IF( OK ) 156 $ WRITE( NOUT, FMT = 9995 )PATH, NTESTS 157* 158 9999 FORMAT( ' Error in CTRSYL: RMAX =', E12.3, / ' LMAX = ', I8, 159 $ ' NINFO=', I8, ' KNT=', I8 ) 160 9998 FORMAT( ' Error in CTREXC: RMAX =', E12.3, / ' LMAX = ', I8, 161 $ ' NINFO=', I8, ' KNT=', I8 ) 162 9997 FORMAT( ' Error in CTRSNA: RMAX =', 3E12.3, / ' LMAX = ', 163 $ 3I8, ' NINFO=', 3I8, ' KNT=', I8 ) 164 9996 FORMAT( ' Error in CTRSEN: RMAX =', 3E12.3, / ' LMAX = ', 165 $ 3I8, ' NINFO=', 3I8, ' KNT=', I8 ) 166 9995 FORMAT( / 1X, 'All tests for ', A3, 167 $ ' routines passed the threshold ( ', I6, ' tests run)' ) 168 9994 FORMAT( ' Tests of the Nonsymmetric eigenproblem condition', 169 $ ' estimation routines', / ' CTRSYL, CTREXC, CTRSNA, CTRSEN', 170 $ / ) 171 9993 FORMAT( ' Relative machine precision (EPS) = ', E16.6, 172 $ / ' Safe minimum (SFMIN) = ', E16.6, / ) 173 9992 FORMAT( ' Routines pass computational tests if test ratio is ', 174 $ 'less than', F8.2, / / ) 175 RETURN 176* 177* End of CCHKEC 178* 179 END 180