![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b ZCHKEC 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 ZCHKEC( THRESH, TSTERR, NIN, NOUT ) 00012 * 00013 * .. Scalar Arguments .. 00014 * LOGICAL TSTERR 00015 * INTEGER NIN, NOUT 00016 * DOUBLE PRECISION THRESH 00017 * .. 00018 * 00019 * 00020 *> \par Purpose: 00021 * ============= 00022 *> 00023 *> \verbatim 00024 *> 00025 *> ZCHKEC tests eigen- condition estimation routines 00026 *> ZTRSYL, CTREXC, CTRSNA, CTRSEN 00027 *> 00028 *> In all cases, the routine runs through a fixed set of numerical 00029 *> examples, subjects them to various tests, and compares the test 00030 *> results to a threshold THRESH. In addition, ZTRSNA and CTRSEN are 00031 *> tested by reading in precomputed examples from a file (on input unit 00032 *> NIN). Output is written to output unit NOUT. 00033 *> \endverbatim 00034 * 00035 * Arguments: 00036 * ========== 00037 * 00038 *> \param[in] THRESH 00039 *> \verbatim 00040 *> THRESH is DOUBLE PRECISION 00041 *> Threshold for residual tests. A computed test ratio passes 00042 *> the threshold if it is less than THRESH. 00043 *> \endverbatim 00044 *> 00045 *> \param[in] TSTERR 00046 *> \verbatim 00047 *> TSTERR is LOGICAL 00048 *> Flag that indicates whether error exits are to be tested. 00049 *> \endverbatim 00050 *> 00051 *> \param[in] NIN 00052 *> \verbatim 00053 *> NIN is INTEGER 00054 *> The logical unit number for input. 00055 *> \endverbatim 00056 *> 00057 *> \param[in] NOUT 00058 *> \verbatim 00059 *> NOUT is INTEGER 00060 *> The logical unit number for output. 00061 *> \endverbatim 00062 * 00063 * Authors: 00064 * ======== 00065 * 00066 *> \author Univ. of Tennessee 00067 *> \author Univ. of California Berkeley 00068 *> \author Univ. of Colorado Denver 00069 *> \author NAG Ltd. 00070 * 00071 *> \date November 2011 00072 * 00073 *> \ingroup complex16_eig 00074 * 00075 * ===================================================================== 00076 SUBROUTINE ZCHKEC( THRESH, TSTERR, NIN, NOUT ) 00077 * 00078 * -- LAPACK test routine (version 3.4.0) -- 00079 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00080 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00081 * November 2011 00082 * 00083 * .. Scalar Arguments .. 00084 LOGICAL TSTERR 00085 INTEGER NIN, NOUT 00086 DOUBLE PRECISION THRESH 00087 * .. 00088 * 00089 * ===================================================================== 00090 * 00091 * .. Local Scalars .. 00092 LOGICAL OK 00093 CHARACTER*3 PATH 00094 INTEGER KTREXC, KTRSEN, KTRSNA, KTRSYL, LTREXC, LTRSYL, 00095 $ NTESTS, NTREXC, NTRSYL 00096 DOUBLE PRECISION EPS, RTREXC, RTRSYL, SFMIN 00097 * .. 00098 * .. Local Arrays .. 00099 INTEGER LTRSEN( 3 ), LTRSNA( 3 ), NTRSEN( 3 ), 00100 $ NTRSNA( 3 ) 00101 DOUBLE PRECISION RTRSEN( 3 ), RTRSNA( 3 ) 00102 * .. 00103 * .. External Subroutines .. 00104 EXTERNAL ZERREC, ZGET35, ZGET36, ZGET37, ZGET38 00105 * .. 00106 * .. External Functions .. 00107 DOUBLE PRECISION DLAMCH 00108 EXTERNAL DLAMCH 00109 * .. 00110 * .. Executable Statements .. 00111 * 00112 PATH( 1: 1 ) = 'Zomplex precision' 00113 PATH( 2: 3 ) = 'EC' 00114 EPS = DLAMCH( 'P' ) 00115 SFMIN = DLAMCH( 'S' ) 00116 WRITE( NOUT, FMT = 9994 ) 00117 WRITE( NOUT, FMT = 9993 )EPS, SFMIN 00118 WRITE( NOUT, FMT = 9992 )THRESH 00119 * 00120 * Test error exits if TSTERR is .TRUE. 00121 * 00122 IF( TSTERR ) 00123 $ CALL ZERREC( PATH, NOUT ) 00124 * 00125 OK = .TRUE. 00126 CALL ZGET35( RTRSYL, LTRSYL, NTRSYL, KTRSYL, NIN ) 00127 IF( RTRSYL.GT.THRESH ) THEN 00128 OK = .FALSE. 00129 WRITE( NOUT, FMT = 9999 )RTRSYL, LTRSYL, NTRSYL, KTRSYL 00130 END IF 00131 * 00132 CALL ZGET36( RTREXC, LTREXC, NTREXC, KTREXC, NIN ) 00133 IF( RTREXC.GT.THRESH .OR. NTREXC.GT.0 ) THEN 00134 OK = .FALSE. 00135 WRITE( NOUT, FMT = 9998 )RTREXC, LTREXC, NTREXC, KTREXC 00136 END IF 00137 * 00138 CALL ZGET37( RTRSNA, LTRSNA, NTRSNA, KTRSNA, NIN ) 00139 IF( RTRSNA( 1 ).GT.THRESH .OR. RTRSNA( 2 ).GT.THRESH .OR. 00140 $ NTRSNA( 1 ).NE.0 .OR. NTRSNA( 2 ).NE.0 .OR. NTRSNA( 3 ).NE.0 ) 00141 $ THEN 00142 OK = .FALSE. 00143 WRITE( NOUT, FMT = 9997 )RTRSNA, LTRSNA, NTRSNA, KTRSNA 00144 END IF 00145 * 00146 CALL ZGET38( RTRSEN, LTRSEN, NTRSEN, KTRSEN, NIN ) 00147 IF( RTRSEN( 1 ).GT.THRESH .OR. RTRSEN( 2 ).GT.THRESH .OR. 00148 $ NTRSEN( 1 ).NE.0 .OR. NTRSEN( 2 ).NE.0 .OR. NTRSEN( 3 ).NE.0 ) 00149 $ THEN 00150 OK = .FALSE. 00151 WRITE( NOUT, FMT = 9996 )RTRSEN, LTRSEN, NTRSEN, KTRSEN 00152 END IF 00153 * 00154 NTESTS = KTRSYL + KTREXC + KTRSNA + KTRSEN 00155 IF( OK ) 00156 $ WRITE( NOUT, FMT = 9995 )PATH, NTESTS 00157 * 00158 9999 FORMAT( ' Error in ZTRSYL: RMAX =', D12.3, / ' LMAX = ', I8, 00159 $ ' NINFO=', I8, ' KNT=', I8 ) 00160 9998 FORMAT( ' Error in ZTREXC: RMAX =', D12.3, / ' LMAX = ', I8, 00161 $ ' NINFO=', I8, ' KNT=', I8 ) 00162 9997 FORMAT( ' Error in ZTRSNA: RMAX =', 3D12.3, / ' LMAX = ', 3I8, 00163 $ ' NINFO=', 3I8, ' KNT=', I8 ) 00164 9996 FORMAT( ' Error in ZTRSEN: RMAX =', 3D12.3, / ' LMAX = ', 3I8, 00165 $ ' NINFO=', 3I8, ' KNT=', I8 ) 00166 9995 FORMAT( / 1X, 'All tests for ', A3, 00167 $ ' routines passed the threshold ( ', I6, ' tests run)' ) 00168 9994 FORMAT( ' Tests of the Nonsymmetric eigenproblem condition', 00169 $ ' estimation routines', / ' ZTRSYL, CTREXC, CTRSNA, CTRSEN', 00170 $ / ) 00171 9993 FORMAT( ' Relative machine precision (EPS) = ', D16.6, 00172 $ / ' Safe minimum (SFMIN) = ', D16.6, / ) 00173 9992 FORMAT( ' Routines pass computational tests if test ratio is ', 00174 $ 'less than', F8.2, / / ) 00175 RETURN 00176 * 00177 * End of ZCHKEC 00178 * 00179 END