LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ cchkec()

subroutine cchkec ( real  THRESH,
logical  TSTERR,
integer  NIN,
integer  NOUT 
)

CCHKEC

Purpose:
 CCHKEC tests eigen- condition estimation routines
        CTRSYL, CTREXC, CTRSNA, CTRSEN

 In all cases, the routine runs through a fixed set of numerical
 examples, subjects them to various tests, and compares the test
 results to a threshold THRESH. In addition, CTRSNA and CTRSEN are
 tested by reading in precomputed examples from a file (on input unit
 NIN).  Output is written to output unit NOUT.
Parameters
[in]THRESH
          THRESH is REAL
          Threshold for residual tests.  A computed test ratio passes
          the threshold if it is less than THRESH.
[in]TSTERR
          TSTERR is LOGICAL
          Flag that indicates whether error exits are to be tested.
[in]NIN
          NIN is INTEGER
          The logical unit number for input.
[in]NOUT
          NOUT is INTEGER
          The logical unit number for output.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 74 of file cchkec.f.

75 *
76 * -- LAPACK test routine --
77 * -- LAPACK is a software package provided by Univ. of Tennessee, --
78 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
79 *
80 * .. Scalar Arguments ..
81  LOGICAL TSTERR
82  INTEGER NIN, NOUT
83  REAL THRESH
84 * ..
85 *
86 * =====================================================================
87 *
88 * .. Local Scalars ..
89  LOGICAL OK
90  CHARACTER*3 PATH
91  INTEGER KTREXC, KTRSEN, KTRSNA, KTRSYL, LTREXC, LTRSYL,
92  $ NTESTS, NTREXC, NTRSYL
93  REAL EPS, RTREXC, RTRSYL, SFMIN
94 * ..
95 * .. Local Arrays ..
96  INTEGER LTRSEN( 3 ), LTRSNA( 3 ), NTRSEN( 3 ),
97  $ NTRSNA( 3 )
98  REAL RTRSEN( 3 ), RTRSNA( 3 )
99 * ..
100 * .. External Subroutines ..
101  EXTERNAL cerrec, cget35, cget36, cget37, cget38
102 * ..
103 * .. External Functions ..
104  REAL SLAMCH
105  EXTERNAL slamch
106 * ..
107 * .. Executable Statements ..
108 *
109  path( 1: 1 ) = 'Complex precision'
110  path( 2: 3 ) = 'EC'
111  eps = slamch( 'P' )
112  sfmin = slamch( 'S' )
113  WRITE( nout, fmt = 9994 )
114  WRITE( nout, fmt = 9993 )eps, sfmin
115  WRITE( nout, fmt = 9992 )thresh
116 *
117 * Test error exits if TSTERR is .TRUE.
118 *
119  IF( tsterr )
120  $ CALL cerrec( path, nout )
121 *
122  ok = .true.
123  CALL cget35( rtrsyl, ltrsyl, ntrsyl, ktrsyl, nin )
124  IF( rtrsyl.GT.thresh ) THEN
125  ok = .false.
126  WRITE( nout, fmt = 9999 )rtrsyl, ltrsyl, ntrsyl, ktrsyl
127  END IF
128 *
129  CALL cget36( rtrexc, ltrexc, ntrexc, ktrexc, nin )
130  IF( rtrexc.GT.thresh .OR. ntrexc.GT.0 ) THEN
131  ok = .false.
132  WRITE( nout, fmt = 9998 )rtrexc, ltrexc, ntrexc, ktrexc
133  END IF
134 *
135  CALL cget37( rtrsna, ltrsna, ntrsna, ktrsna, nin )
136  IF( rtrsna( 1 ).GT.thresh .OR. rtrsna( 2 ).GT.thresh .OR.
137  $ ntrsna( 1 ).NE.0 .OR. ntrsna( 2 ).NE.0 .OR. ntrsna( 3 ).NE.0 )
138  $ THEN
139  ok = .false.
140  WRITE( nout, fmt = 9997 )rtrsna, ltrsna, ntrsna, ktrsna
141  END IF
142 *
143  CALL cget38( rtrsen, ltrsen, ntrsen, ktrsen, nin )
144  IF( rtrsen( 1 ).GT.thresh .OR. rtrsen( 2 ).GT.thresh .OR.
145  $ ntrsen( 1 ).NE.0 .OR. ntrsen( 2 ).NE.0 .OR. ntrsen( 3 ).NE.0 )
146  $ THEN
147  ok = .false.
148  WRITE( nout, fmt = 9996 )rtrsen, ltrsen, ntrsen, ktrsen
149  END IF
150 *
151  ntests = ktrsyl + ktrexc + ktrsna + ktrsen
152  IF( ok )
153  $ WRITE( nout, fmt = 9995 )path, ntests
154 *
155  9999 FORMAT( ' Error in CTRSYL: RMAX =', e12.3, / ' LMAX = ', i8,
156  $ ' NINFO=', i8, ' KNT=', i8 )
157  9998 FORMAT( ' Error in CTREXC: RMAX =', e12.3, / ' LMAX = ', i8,
158  $ ' NINFO=', i8, ' KNT=', i8 )
159  9997 FORMAT( ' Error in CTRSNA: RMAX =', 3e12.3, / ' LMAX = ',
160  $ 3i8, ' NINFO=', 3i8, ' KNT=', i8 )
161  9996 FORMAT( ' Error in CTRSEN: RMAX =', 3e12.3, / ' LMAX = ',
162  $ 3i8, ' NINFO=', 3i8, ' KNT=', i8 )
163  9995 FORMAT( / 1x, 'All tests for ', a3,
164  $ ' routines passed the threshold ( ', i6, ' tests run)' )
165  9994 FORMAT( ' Tests of the Nonsymmetric eigenproblem condition',
166  $ ' estimation routines', / ' CTRSYL, CTREXC, CTRSNA, CTRSEN',
167  $ / )
168  9993 FORMAT( ' Relative machine precision (EPS) = ', e16.6,
169  $ / ' Safe minimum (SFMIN) = ', e16.6, / )
170  9992 FORMAT( ' Routines pass computational tests if test ratio is ',
171  $ 'less than', f8.2, / / )
172  RETURN
173 *
174 * End of CCHKEC
175 *
subroutine cget38(RMAX, LMAX, NINFO, KNT, NIN)
CGET38
Definition: cget38.f:91
subroutine cerrec(PATH, NUNIT)
CERREC
Definition: cerrec.f:56
subroutine cget37(RMAX, LMAX, NINFO, KNT, NIN)
CGET37
Definition: cget37.f:90
subroutine cget35(RMAX, LMAX, NINFO, KNT, NIN)
CGET35
Definition: cget35.f:84
subroutine cget36(RMAX, LMAX, NINFO, KNT, NIN)
CGET36
Definition: cget36.f:85
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:68
Here is the call graph for this function:
Here is the caller graph for this function: