1*> \brief \b ZCHKEC 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 ZCHKEC( THRESH, TSTERR, NIN, NOUT ) 12* 13* .. Scalar Arguments .. 14* LOGICAL TSTERR 15* INTEGER NIN, NOUT 16* DOUBLE PRECISION THRESH 17* .. 18* 19* 20*> \par Purpose: 21* ============= 22*> 23*> \verbatim 24*> 25*> ZCHKEC tests eigen- condition estimation routines 26*> ZTRSYL, 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, ZTRSNA 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 DOUBLE PRECISION 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 September 2012 72* 73*> \ingroup complex16_eig 74* 75* ===================================================================== 76 SUBROUTINE ZCHKEC( THRESH, TSTERR, NIN, NOUT ) 77* 78* -- LAPACK test routine (version 3.4.2) -- 79* -- LAPACK is a software package provided by Univ. of Tennessee, -- 80* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 81* September 2012 82* 83* .. Scalar Arguments .. 84 LOGICAL TSTERR 85 INTEGER NIN, NOUT 86 DOUBLE PRECISION 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 DOUBLE PRECISION EPS, RTREXC, RTRSYL, SFMIN 97* .. 98* .. Local Arrays .. 99 INTEGER LTRSEN( 3 ), LTRSNA( 3 ), NTRSEN( 3 ), 100 $ NTRSNA( 3 ) 101 DOUBLE PRECISION RTRSEN( 3 ), RTRSNA( 3 ) 102* .. 103* .. External Subroutines .. 104 EXTERNAL ZERREC, ZGET35, ZGET36, ZGET37, ZGET38 105* .. 106* .. External Functions .. 107 DOUBLE PRECISION DLAMCH 108 EXTERNAL DLAMCH 109* .. 110* .. Executable Statements .. 111* 112 PATH( 1: 1 ) = 'Zomplex precision' 113 PATH( 2: 3 ) = 'EC' 114 EPS = DLAMCH( 'P' ) 115 SFMIN = DLAMCH( '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 ZERREC( PATH, NOUT ) 124* 125 OK = .TRUE. 126 CALL ZGET35( 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 ZGET36( 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 ZGET37( 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 ZGET38( 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 ZTRSYL: RMAX =', D12.3, / ' LMAX = ', I8, 159 $ ' NINFO=', I8, ' KNT=', I8 ) 160 9998 FORMAT( ' Error in ZTREXC: RMAX =', D12.3, / ' LMAX = ', I8, 161 $ ' NINFO=', I8, ' KNT=', I8 ) 162 9997 FORMAT( ' Error in ZTRSNA: RMAX =', 3D12.3, / ' LMAX = ', 3I8, 163 $ ' NINFO=', 3I8, ' KNT=', I8 ) 164 9996 FORMAT( ' Error in ZTRSEN: RMAX =', 3D12.3, / ' LMAX = ', 3I8, 165 $ ' 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', / ' ZTRSYL, ZTREXC, ZTRSNA, ZTRSEN', 170 $ / ) 171 9993 FORMAT( ' Relative machine precision (EPS) = ', D16.6, 172 $ / ' Safe minimum (SFMIN) = ', D16.6, / ) 173 9992 FORMAT( ' Routines pass computational tests if test ratio is ', 174 $ 'less than', F8.2, / / ) 175 RETURN 176* 177* End of ZCHKEC 178* 179 END 180