LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ schkec()

subroutine schkec ( real  thresh,
logical  tsterr,
integer  nin,
integer  nout 
)

SCHKEC

Purpose:
 SCHKEC tests eigen- condition estimation routines
        SLALN2, SLASY2, SLANV2, SLAQTR, SLAEXC,
        STRSYL, STREXC, STRSNA, STRSEN, STGEXC

 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, STREXC, STRSNA and STRSEN
 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 75 of file schkec.f.

76*
77* -- LAPACK test routine --
78* -- LAPACK is a software package provided by Univ. of Tennessee, --
79* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
80*
81* .. Scalar Arguments ..
82 LOGICAL TSTERR
83 INTEGER NIN, NOUT
84 REAL THRESH
85* ..
86*
87* =====================================================================
88*
89* .. Local Scalars ..
90 LOGICAL OK
91 CHARACTER*3 PATH
92 INTEGER KLAEXC, KLALN2, KLANV2, KLAQTR, KLASY2, KTREXC,
93 $ KTRSEN, KTRSNA, KTRSYL, KTRSYL3, LLAEXC,
94 $ LLALN2, LLANV2, LLAQTR, LLASY2, LTREXC, LTRSYL,
95 $ NLANV2, NLAQTR, NLASY2, NTESTS, NTRSYL, KTGEXC,
96 $ LTGEXC
97 REAL EPS, RLAEXC, RLALN2, RLANV2, RLAQTR, RLASY2,
98 $ RTREXC, SFMIN, RTGEXC
99* ..
100* .. Local Arrays ..
101 INTEGER FTRSYL( 3 ), ITRSYL( 2 ), LTRSEN( 3 ),
102 $ LTRSNA( 3 ), NLAEXC( 2 ), NLALN2( 2 ),
103 $ NTGEXC( 2 ), NTREXC( 3 ), NTRSEN( 3 ),
104 $ NTRSNA( 3 )
105 REAL RTRSEN( 3 ), RTRSNA( 3 ), RTRSYL( 2 )
106* ..
107* .. External Subroutines ..
108 EXTERNAL serrec, sget31, sget32, sget33, sget34, sget35,
110* ..
111* .. External Functions ..
112 REAL SLAMCH
113 EXTERNAL slamch
114* ..
115* .. Executable Statements ..
116*
117 path( 1: 1 ) = 'Single precision'
118 path( 2: 3 ) = 'EC'
119 eps = slamch( 'P' )
120 sfmin = slamch( 'S' )
121*
122* Print header information
123*
124 WRITE( nout, fmt = 9989 )
125 WRITE( nout, fmt = 9988 )eps, sfmin
126 WRITE( nout, fmt = 9987 )thresh
127*
128* Test error exits if TSTERR is .TRUE.
129*
130 IF( tsterr )
131 $ CALL serrec( path, nout )
132*
133 ok = .true.
134 CALL sget31( rlaln2, llaln2, nlaln2, klaln2 )
135 IF( rlaln2.GT.thresh .OR. nlaln2( 1 ).NE.0 ) THEN
136 ok = .false.
137 WRITE( nout, fmt = 9999 )rlaln2, llaln2, nlaln2, klaln2
138 END IF
139*
140 CALL sget32( rlasy2, llasy2, nlasy2, klasy2 )
141 IF( rlasy2.GT.thresh ) THEN
142 ok = .false.
143 WRITE( nout, fmt = 9998 )rlasy2, llasy2, nlasy2, klasy2
144 END IF
145*
146 CALL sget33( rlanv2, llanv2, nlanv2, klanv2 )
147 IF( rlanv2.GT.thresh .OR. nlanv2.NE.0 ) THEN
148 ok = .false.
149 WRITE( nout, fmt = 9997 )rlanv2, llanv2, nlanv2, klanv2
150 END IF
151*
152 CALL sget34( rlaexc, llaexc, nlaexc, klaexc )
153 IF( rlaexc.GT.thresh .OR. nlaexc( 2 ).NE.0 ) THEN
154 ok = .false.
155 WRITE( nout, fmt = 9996 )rlaexc, llaexc, nlaexc, klaexc
156 END IF
157*
158 CALL sget35( rtrsyl( 1 ), ltrsyl, ntrsyl, ktrsyl )
159 IF( rtrsyl( 1 ).GT.thresh ) THEN
160 ok = .false.
161 WRITE( nout, fmt = 9995 )rtrsyl( 1 ), ltrsyl, ntrsyl, ktrsyl
162 END IF
163*
164 CALL ssyl01( thresh, ftrsyl, rtrsyl, itrsyl, ktrsyl3 )
165 IF( ftrsyl( 1 ).GT.0 ) THEN
166 ok = .false.
167 WRITE( nout, fmt = 9970 )ftrsyl( 1 ), rtrsyl( 1 ), thresh
168 END IF
169 IF( ftrsyl( 2 ).GT.0 ) THEN
170 ok = .false.
171 WRITE( nout, fmt = 9971 )ftrsyl( 2 ), rtrsyl( 2 ), thresh
172 END IF
173 IF( ftrsyl( 3 ).GT.0 ) THEN
174 ok = .false.
175 WRITE( nout, fmt = 9972 )ftrsyl( 3 )
176 END IF
177*
178 CALL sget36( rtrexc, ltrexc, ntrexc, ktrexc, nin )
179 IF( rtrexc.GT.thresh .OR. ntrexc( 3 ).GT.0 ) THEN
180 ok = .false.
181 WRITE( nout, fmt = 9994 )rtrexc, ltrexc, ntrexc, ktrexc
182 END IF
183*
184 CALL sget37( rtrsna, ltrsna, ntrsna, ktrsna, nin )
185 IF( rtrsna( 1 ).GT.thresh .OR. rtrsna( 2 ).GT.thresh .OR.
186 $ ntrsna( 1 ).NE.0 .OR. ntrsna( 2 ).NE.0 .OR. ntrsna( 3 ).NE.0 )
187 $ THEN
188 ok = .false.
189 WRITE( nout, fmt = 9993 )rtrsna, ltrsna, ntrsna, ktrsna
190 END IF
191*
192 CALL sget38( rtrsen, ltrsen, ntrsen, ktrsen, nin )
193 IF( rtrsen( 1 ).GT.thresh .OR. rtrsen( 2 ).GT.thresh .OR.
194 $ ntrsen( 1 ).NE.0 .OR. ntrsen( 2 ).NE.0 .OR. ntrsen( 3 ).NE.0 )
195 $ THEN
196 ok = .false.
197 WRITE( nout, fmt = 9992 )rtrsen, ltrsen, ntrsen, ktrsen
198 END IF
199*
200 CALL sget39( rlaqtr, llaqtr, nlaqtr, klaqtr )
201 IF( rlaqtr.GT.thresh ) THEN
202 ok = .false.
203 WRITE( nout, fmt = 9991 )rlaqtr, llaqtr, nlaqtr, klaqtr
204 END IF
205*
206 CALL sget40( rtgexc, ltgexc, ntgexc, ktgexc, nin )
207 IF( rtgexc.GT.thresh ) THEN
208 ok = .false.
209 WRITE( nout, fmt = 9986 )rtgexc, ltgexc, ntgexc, ktgexc
210 END IF
211*
212 ntests = klaln2 + klasy2 + klanv2 + klaexc + ktrsyl + ktrexc +
213 $ ktrsna + ktrsen + klaqtr
214 IF( ok )
215 $ WRITE( nout, fmt = 9990 )path, ntests
216*
217 RETURN
218 9999 FORMAT( ' Error in SLALN2: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
219 $ 'INFO=', 2i8, ' KNT=', i8 )
220 9998 FORMAT( ' Error in SLASY2: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
221 $ 'INFO=', i8, ' KNT=', i8 )
222 9997 FORMAT( ' Error in SLANV2: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
223 $ 'INFO=', i8, ' KNT=', i8 )
224 9996 FORMAT( ' Error in SLAEXC: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
225 $ 'INFO=', 2i8, ' KNT=', i8 )
226 9995 FORMAT( ' Error in STRSYL: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
227 $ 'INFO=', i8, ' KNT=', i8 )
228 9994 FORMAT( ' Error in STREXC: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
229 $ 'INFO=', 3i8, ' KNT=', i8 )
230 9993 FORMAT( ' Error in STRSNA: RMAX =', 3e12.3, / ' LMAX = ', 3i8,
231 $ ' NINFO=', 3i8, ' KNT=', i8 )
232 9992 FORMAT( ' Error in STRSEN: RMAX =', 3e12.3, / ' LMAX = ', 3i8,
233 $ ' NINFO=', 3i8, ' KNT=', i8 )
234 9991 FORMAT( ' Error in SLAQTR: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
235 $ 'INFO=', i8, ' KNT=', i8 )
236 9990 FORMAT( / 1x, 'All tests for ', a3, ' routines passed the thresh',
237 $ 'old ( ', i6, ' tests run)' )
238 9989 FORMAT( ' Tests of the Nonsymmetric eigenproblem condition estim',
239 $ 'ation routines', / ' SLALN2, SLASY2, SLANV2, SLAEXC, STRS',
240 $ 'YL, STREXC, STRSNA, STRSEN, SLAQTR', / )
241 9988 FORMAT( ' Relative machine precision (EPS) = ', e16.6, / ' Safe ',
242 $ 'minimum (SFMIN) = ', e16.6, / )
243 9987 FORMAT( ' Routines pass computational tests if test ratio is les',
244 $ 's than', f8.2, / / )
245 9986 FORMAT( ' Error in STGEXC: RMAX =', e12.3, / ' LMAX = ', i8, ' N',
246 $ 'INFO=', 2i8, ' KNT=', i8 )
247 9972 FORMAT( 'STRSYL and STRSYL3 compute an inconsistent result ',
248 $ 'factor in ', i8, ' tests.')
249 9971 FORMAT( 'Error in STRSYL3: ', i8, ' tests fail the threshold.', /
250 $ 'Maximum test ratio =', d12.3, ' threshold =', d12.3 )
251 9970 FORMAT( 'Error in STRSYL: ', i8, ' tests fail the threshold.', /
252 $ 'Maximum test ratio =', d12.3, ' threshold =', d12.3 )
253*
254* End of SCHKEC
255*
real function slamch(cmach)
SLAMCH
Definition slamch.f:68
subroutine serrec(path, nunit)
SERREC
Definition serrec.f:56
subroutine sget31(rmax, lmax, ninfo, knt)
SGET31
Definition sget31.f:91
subroutine sget32(rmax, lmax, ninfo, knt)
SGET32
Definition sget32.f:82
subroutine sget33(rmax, lmax, ninfo, knt)
SGET33
Definition sget33.f:76
subroutine sget34(rmax, lmax, ninfo, knt)
SGET34
Definition sget34.f:82
subroutine sget35(rmax, lmax, ninfo, knt)
SGET35
Definition sget35.f:78
subroutine sget36(rmax, lmax, ninfo, knt, nin)
SGET36
Definition sget36.f:88
subroutine sget37(rmax, lmax, ninfo, knt, nin)
SGET37
Definition sget37.f:90
subroutine sget38(rmax, lmax, ninfo, knt, nin)
SGET38
Definition sget38.f:91
subroutine sget39(rmax, lmax, ninfo, knt)
SGET39
Definition sget39.f:103
subroutine sget40(rmax, lmax, ninfo, knt, nin)
SGET40
Definition sget40.f:85
subroutine ssyl01(thresh, nfail, rmax, ninfo, knt)
SSYL01
Definition ssyl01.f:89
Here is the call graph for this function:
Here is the caller graph for this function: