OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
serrec.f
Go to the documentation of this file.
1*> \brief \b SERREC
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 SERREC( PATH, NUNIT )
12*
13* .. Scalar Arguments ..
14* CHARACTER*3 PATH
15* INTEGER NUNIT
16* ..
17*
18*
19*> \par Purpose:
20* =============
21*>
22*> \verbatim
23*>
24*> SERREC tests the error exits for the routines for eigen- condition
25*> estimation for REAL matrices:
26*> STRSYL, STREXC, STRSNA and STRSEN.
27*> \endverbatim
28*
29* Arguments:
30* ==========
31*
32*> \param[in] PATH
33*> \verbatim
34*> PATH is CHARACTER*3
35*> The LAPACK path name for the routines to be tested.
36*> \endverbatim
37*>
38*> \param[in] NUNIT
39*> \verbatim
40*> NUNIT is INTEGER
41*> The unit number for output.
42*> \endverbatim
43*
44* Authors:
45* ========
46*
47*> \author Univ. of Tennessee
48*> \author Univ. of California Berkeley
49*> \author Univ. of Colorado Denver
50*> \author NAG Ltd.
51*
52*> \ingroup single_eig
53*
54* =====================================================================
55 SUBROUTINE serrec( PATH, NUNIT )
56*
57* -- LAPACK test routine --
58* -- LAPACK is a software package provided by Univ. of Tennessee, --
59* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
60*
61* .. Scalar Arguments ..
62 CHARACTER*3 PATH
63 INTEGER NUNIT
64* ..
65*
66* =====================================================================
67*
68* .. Parameters ..
69 INTEGER NMAX
70 REAL ONE, ZERO
71 parameter( nmax = 4, one = 1.0e0, zero = 0.0e0 )
72* ..
73* .. Local Scalars ..
74 INTEGER I, IFST, ILST, INFO, J, M, NT
75 REAL SCALE
76* ..
77* .. Local Arrays ..
78 LOGICAL SEL( NMAX )
79 INTEGER IWORK( NMAX )
80 REAL A( NMAX, NMAX ), B( NMAX, NMAX ),
81 $ C( NMAX, NMAX ), S( NMAX ), SEP( NMAX ),
82 $ WI( NMAX ), WORK( NMAX ), WR( NMAX )
83* ..
84* .. External Subroutines ..
85 EXTERNAL chkxer, strexc, strsen, strsna, strsyl
86* ..
87* .. Scalars in Common ..
88 LOGICAL LERR, OK
89 CHARACTER*32 SRNAMT
90 INTEGER INFOT, NOUT
91* ..
92* .. Common blocks ..
93 COMMON / infoc / infot, nout, ok, lerr
94 COMMON / srnamc / srnamt
95* ..
96* .. Executable Statements ..
97*
98 nout = nunit
99 ok = .true.
100 nt = 0
101*
102* Initialize A, B and SEL
103*
104 DO 20 j = 1, nmax
105 DO 10 i = 1, nmax
106 a( i, j ) = zero
107 b( i, j ) = zero
108 10 CONTINUE
109 20 CONTINUE
110 DO 30 i = 1, nmax
111 a( i, i ) = one
112 sel( i ) = .true.
113 30 CONTINUE
114*
115* Test STRSYL
116*
117 srnamt = 'STRSYL'
118 infot = 1
119 CALL strsyl( 'X', 'N', 1, 0, 0, a, 1, b, 1, c, 1, scale, info )
120 CALL chkxer( 'STRSYL', infot, nout, lerr, ok )
121 infot = 2
122 CALL strsyl( 'N', 'X', 1, 0, 0, a, 1, b, 1, c, 1, scale, info )
123 CALL chkxer( 'STRSYL', infot, nout, lerr, ok )
124 infot = 3
125 CALL strsyl( 'N', 'N', 0, 0, 0, a, 1, b, 1, c, 1, scale, info )
126 CALL chkxer( 'STRSYL', infot, nout, lerr, ok )
127 infot = 4
128 CALL strsyl( 'N', 'N', 1, -1, 0, a, 1, b, 1, c, 1, scale, info )
129 CALL chkxer( 'STRSYL', infot, nout, lerr, ok )
130 infot = 5
131 CALL strsyl( 'n', 'n', 1, 0, -1, A, 1, B, 1, C, 1, SCALE, INFO )
132 CALL CHKXER( 'strsyl', INFOT, NOUT, LERR, OK )
133 INFOT = 7
134 CALL STRSYL( 'n', 'n', 1, 2, 0, A, 1, B, 1, C, 2, SCALE, INFO )
135 CALL CHKXER( 'strsyl', INFOT, NOUT, LERR, OK )
136 INFOT = 9
137 CALL STRSYL( 'n', 'n', 1, 0, 2, A, 1, B, 1, C, 1, SCALE, INFO )
138 CALL CHKXER( 'strsyl', INFOT, NOUT, LERR, OK )
139 INFOT = 11
140 CALL STRSYL( 'n', 'n', 1, 2, 0, A, 2, B, 1, C, 1, SCALE, INFO )
141 CALL CHKXER( 'strsyl', infot, nout, lerr, ok )
142 nt = nt + 8
143*
144* Test STREXC
145*
146 srnamt = 'STREXC'
147 ifst = 1
148 ilst = 1
149 infot = 1
150 CALL strexc( 'X', 1, a, 1, b, 1, ifst, ilst, work, info )
151 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
152 infot = 2
153 CALL strexc( 'N', -1, a, 1, b, 1, ifst, ilst, work, info )
154 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
155 infot = 4
156 ilst = 2
157 CALL strexc( 'N', 2, a, 1, b, 1, ifst, ilst, work, info )
158 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
159 infot = 6
160 CALL strexc( 'V', 2, a, 2, b, 1, ifst, ilst, work, info )
161 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
162 infot = 7
163 ifst = 0
164 ilst = 1
165 CALL strexc( 'V', 1, a, 1, b, 1, ifst, ilst, work, info )
166 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
167 infot = 7
168 ifst = 2
169 CALL strexc( 'V', 1, a, 1, b, 1, ifst, ilst, work, info )
170 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
171 infot = 8
172 ifst = 1
173 ilst = 0
174 CALL strexc( 'V', 1, a, 1, b, 1, ifst, ilst, work, info )
175 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
176 infot = 8
177 ilst = 2
178 CALL strexc( 'V', 1, a, 1, b, 1, ifst, ilst, work, info )
179 CALL chkxer( 'STREXC', infot, nout, lerr, ok )
180 nt = nt + 8
181*
182* Test STRSNA
183*
184 srnamt = 'STRSNA'
185 infot = 1
186 CALL strsna( 'X', 'A', sel, 0, a, 1, b, 1, c, 1, s, sep, 1, m,
187 $ work, 1, iwork, info )
188 CALL chkxer( 'STRSNA', infot, nout, lerr, ok )
189 infot = 2
190 CALL strsna( 'b', 'x', SEL, 0, A, 1, B, 1, C, 1, S, SEP, 1, M,
191 $ WORK, 1, IWORK, INFO )
192 CALL CHKXER( 'strsna', INFOT, NOUT, LERR, OK )
193 INFOT = 4
194 CALL STRSNA( 'b', 'a', SEL, -1, A, 1, B, 1, C, 1, S, SEP, 1, M,
195 $ WORK, 1, IWORK, INFO )
196 CALL CHKXER( 'strsna', INFOT, NOUT, LERR, OK )
197 INFOT = 6
198 CALL STRSNA( 'v', 'a', SEL, 2, A, 1, B, 1, C, 1, S, SEP, 2, M,
199 $ WORK, 2, IWORK, INFO )
200 CALL CHKXER( 'strsna', INFOT, NOUT, LERR, OK )
201 INFOT = 8
202 CALL STRSNA( 'b', 'a', SEL, 2, A, 2, B, 1, C, 2, S, SEP, 2, M,
203 $ WORK, 2, IWORK, INFO )
204 CALL CHKXER( 'strsna', INFOT, NOUT, LERR, OK )
205 INFOT = 10
206 CALL STRSNA( 'b', 'a', SEL, 2, A, 2, B, 2, C, 1, S, SEP, 2, M,
207 $ WORK, 2, IWORK, INFO )
208 CALL CHKXER( 'strsna', INFOT, NOUT, LERR, OK )
209 INFOT = 13
210 CALL STRSNA( 'b', 'a', SEL, 1, A, 1, B, 1, C, 1, S, SEP, 0, M,
211 $ WORK, 1, IWORK, INFO )
212 CALL CHKXER( 'strsna', INFOT, NOUT, LERR, OK )
213 INFOT = 13
214 CALL STRSNA( 'b', 's', sel, 2, a, 2, b, 2, c, 2, s, sep, 1, m,
215 $ work, 2, iwork, info )
216 CALL chkxer( 'STRSNA', infot, nout, lerr, ok )
217 infot = 16
218 CALL strsna( 'B', 'A', sel, 2, a, 2, b, 2, c, 2, s, sep, 2, m,
219 $ work, 1, iwork, info )
220 CALL chkxer( 'STRSNA', infot, nout, lerr, ok )
221 nt = nt + 9
222*
223* Test STRSEN
224*
225 sel( 1 ) = .false.
226 srnamt = 'STRSEN'
227 infot = 1
228 CALL strsen( 'X', 'N', sel, 0, a, 1, b, 1, wr, wi, m, s( 1 ),
229 $ sep( 1 ), work, 1, iwork, 1, info )
230 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
231 infot = 2
232 CALL strsen( 'N', 'X', sel, 0, a, 1, b, 1, wr, wi, m, s( 1 ),
233 $ sep( 1 ), work, 1, iwork, 1, info )
234 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
235 infot = 4
236 CALL strsen( 'N', 'N', sel, -1, a, 1, b, 1, wr, wi, m, s( 1 ),
237 $ sep( 1 ), work, 1, iwork, 1, info )
238 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
239 infot = 6
240 CALL strsen( 'N', 'N', sel, 2, a, 1, b, 1, wr, wi, m, s( 1 ),
241 $ sep( 1 ), work, 2, iwork, 1, info )
242 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
243 infot = 8
244 CALL strsen( 'N', 'V', sel, 2, a, 2, b, 1, wr, wi, m, s( 1 ),
245 $ sep( 1 ), work, 1, iwork, 1, info )
246 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
247 infot = 15
248 CALL strsen( 'N', 'V', sel, 2, a, 2, b, 2, wr, wi, m, s( 1 ),
249 $ sep( 1 ), work, 0, iwork, 1, info )
250 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
251 infot = 15
252 CALL strsen( 'E', 'V', sel, 3, a, 3, b, 3, wr, wi, m, s( 1 ),
253 $ sep( 1 ), work, 1, iwork, 1, info )
254 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
255 infot = 15
256 CALL strsen( 'V', 'V', sel, 3, a, 3, b, 3, wr, wi, m, s( 1 ),
257 $ sep( 1 ), work, 3, iwork, 2, info )
258 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
259 infot = 17
260 CALL strsen( 'E', 'V', sel, 2, a, 2, b, 2, wr, wi, m, s( 1 ),
261 $ sep( 1 ), work, 1, iwork, 0, info )
262 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
263 infot = 17
264 CALL strsen( 'V', 'V', sel, 3, a, 3, b, 3, wr, wi, m, s( 1 ),
265 $ sep( 1 ), work, 4, iwork, 1, info )
266 CALL chkxer( 'STRSEN', infot, nout, lerr, ok )
267 nt = nt + 10
268*
269* Print a summary line.
270*
271 IF( ok ) THEN
272 WRITE( nout, fmt = 9999 )path, nt
273 ELSE
274 WRITE( nout, fmt = 9998 )path
275 END IF
276*
277 RETURN
278 9999 FORMAT( 1x, a3, ' routines passed the tests of the error exits (',
279 $ i3, ' tests done)' )
280 9998 FORMAT( ' *** ', a3, ' routines failed the tests of the error ex',
281 $ 'its ***' )
282*
283* End of SERREC
284*
285 END
subroutine chkxer(srnamt, infot, nout, lerr, ok)
Definition cblat2.f:3196
subroutine strsen(job, compq, select, n, t, ldt, q, ldq, wr, wi, m, s, sep, work, lwork, iwork, liwork, info)
STRSEN
Definition strsen.f:314
subroutine strsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, iwork, info)
STRSNA
Definition strsna.f:265
subroutine strexc(compq, n, t, ldt, q, ldq, ifst, ilst, work, info)
STREXC
Definition strexc.f:148
subroutine strsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
STRSYL
Definition strsyl.f:164
subroutine serrec(path, nunit)
SERREC
Definition serrec.f:56