69 parameter( nmax = 3, lw = ( nmax+2 )*( nmax+2 )+nmax )
73 INTEGER I, IHI, ILO, INFO, J, M, NT
77 INTEGER IFAILL( NMAX ), IFAILR( NMAX )
78 DOUBLE PRECISION A( NMAX, NMAX ), C( NMAX, NMAX ), S( NMAX ),
79 $ TAU( NMAX ), VL( NMAX, NMAX ),
80 $ VR( NMAX, NMAX ), W( LW ), WI( NMAX ),
100 COMMON / infoc / infot, nout, ok, lerr
101 COMMON / srnamc / srnamt
106 WRITE( nout, fmt = * )
113 a( i, j ) = 1.d0 / dble( i+j )
123 IF(
lsamen( 2, c2,
'HS' ) )
THEN
129 CALL dgebal(
'/', 0, a, 1, ilo, ihi, s, info )
130 CALL chkxer(
'DGEBAL', infot, nout, lerr, ok )
132 CALL dgebal(
'N', -1, a, 1, ilo, ihi, s, info )
133 CALL chkxer(
'DGEBAL', infot, nout, lerr, ok )
135 CALL dgebal(
'N', 2, a, 1, ilo, ihi, s, info )
136 CALL chkxer(
'DGEBAL', infot, nout, lerr, ok )
143 CALL dgebak(
'/',
'R', 0, 1, 0, s, 0, a, 1, info )
144 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
146 CALL dgebak(
'N',
'/', 0, 1, 0, s, 0, a, 1, info )
147 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
149 CALL dgebak(
'N',
'R', -1, 1, 0, s, 0, a, 1, info )
150 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
152 CALL dgebak(
'N',
'R', 0, 0, 0, s, 0, a, 1, info )
153 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
155 CALL dgebak(
'N',
'R', 0, 2, 0, s, 0, a, 1, info )
156 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
158 CALL dgebak(
'N',
'R', 2, 2, 1, s, 0, a, 2, info )
159 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
161 CALL dgebak(
'N',
'R', 0, 1, 1, s, 0, a, 1, info )
162 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
164 CALL dgebak(
'N',
'R', 0, 1, 0, s, -1, a, 1, info )
165 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
167 CALL dgebak(
'N',
'R', 2, 1, 2, s, 0, a, 1, info )
168 CALL chkxer(
'DGEBAK', infot, nout, lerr, ok )
175 CALL dgehrd( -1, 1, 1, a, 1, tau, w, 1, info )
176 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
178 CALL dgehrd( 0, 0, 0, a, 1, tau, w, 1, info )
179 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
181 CALL dgehrd( 0, 2, 0, a, 1, tau, w, 1, info )
182 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
184 CALL dgehrd( 1, 1, 0, a, 1, tau, w, 1, info )
185 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
187 CALL dgehrd( 0, 1, 1, a, 1, tau, w, 1, info )
188 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
190 CALL dgehrd( 2, 1, 1, a, 1, tau, w, 2, info )
191 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
193 CALL dgehrd( 2, 1, 2, a, 2, tau, w, 1, info )
194 CALL chkxer(
'DGEHRD', infot, nout, lerr, ok )
201 CALL dorghr( -1, 1, 1, a, 1, tau, w, 1, info )
202 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
204 CALL dorghr( 0, 0, 0, a, 1, tau, w, 1, info )
205 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
207 CALL dorghr( 0, 2, 0, a, 1, tau, w, 1, info )
208 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
210 CALL dorghr( 1, 1, 0, a, 1, tau, w, 1, info )
211 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
213 CALL dorghr( 0, 1, 1, a, 1, tau, w, 1, info )
214 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
216 CALL dorghr( 2, 1, 1, a, 1, tau, w, 1, info )
217 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
219 CALL dorghr( 3, 1, 3, a, 3, tau, w, 1, info )
220 CALL chkxer(
'DORGHR', infot, nout, lerr, ok )
227 CALL dormhr(
'/',
'N', 0, 0, 1, 0, a, 1, tau, c, 1, w, 1,
229 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
231 CALL dormhr(
'L',
'/', 0, 0, 1, 0, a, 1, tau, c, 1, w, 1,
233 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
235 CALL dormhr(
'L',
'N', -1, 0, 1, 0, a, 1, tau, c, 1, w, 1,
237 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
239 CALL dormhr(
'L',
'N', 0, -1, 1, 0, a, 1, tau, c, 1, w, 1,
241 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
243 CALL dormhr(
'L',
'N', 0, 0, 0, 0, a, 1, tau, c, 1, w, 1,
245 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
247 CALL dormhr(
'L',
'N', 0, 0, 2, 0, a, 1, tau, c, 1, w, 1,
249 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
251 CALL dormhr(
'L',
'N', 1, 2, 2, 1, a, 1, tau, c, 1, w, 2,
253 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
255 CALL dormhr(
'R',
'N', 2, 1, 2, 1, a, 1, tau, c, 2, w, 2,
257 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
259 CALL dormhr(
'L',
'N', 1, 1, 1, 0, a, 1, tau, c, 1, w, 1,
261 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
263 CALL dormhr(
'L',
'N', 0, 1, 1, 1, a, 1, tau, c, 1, w, 1,
265 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
267 CALL dormhr(
'R',
'N', 1, 0, 1, 1, a, 1, tau, c, 1, w, 1,
269 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
271 CALL dormhr(
'L',
'N', 2, 1, 1, 1, a, 1, tau, c, 2, w, 1,
273 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
275 CALL dormhr(
'R',
'N', 1, 2, 1, 1, a, 1, tau, c, 1, w, 1,
277 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
279 CALL dormhr(
'L',
'N', 2, 1, 1, 1, a, 2, tau, c, 1, w, 1,
281 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
283 CALL dormhr(
'L',
'N', 1, 2, 1, 1, a, 1, tau, c, 1, w, 1,
285 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
287 CALL dormhr(
'R',
'N', 2, 1, 1, 1, a, 1, tau, c, 2, w, 1,
289 CALL chkxer(
'DORMHR', infot, nout, lerr, ok )
296 CALL dhseqr(
'/',
'N', 0, 1, 0, a, 1, wr, wi, c, 1, w, 1,
298 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
300 CALL dhseqr(
'E',
'/', 0, 1, 0, a, 1, wr, wi, c, 1, w, 1,
302 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
304 CALL dhseqr(
'E',
'N', -1, 1, 0, a, 1, wr, wi, c, 1, w, 1,
306 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
308 CALL dhseqr(
'E',
'N', 0, 0, 0, a, 1, wr, wi, c, 1, w, 1,
310 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
312 CALL dhseqr(
'E',
'N', 0, 2, 0, a, 1, wr, wi, c, 1, w, 1,
314 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
316 CALL dhseqr(
'E',
'N', 1, 1, 0, a, 1, wr, wi, c, 1, w, 1,
318 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
320 CALL dhseqr(
'E',
'N', 1, 1, 2, a, 1, wr, wi, c, 1, w, 1,
322 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
324 CALL dhseqr(
'E',
'N', 2, 1, 2, a, 1, wr, wi, c, 2, w, 1,
326 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
328 CALL dhseqr(
'E',
'V', 2, 1, 2, a, 2, wr, wi, c, 1, w, 1,
330 CALL chkxer(
'DHSEQR', infot, nout, lerr, ok )
337 CALL dhsein(
'/',
'N',
'N', sel, 0, a, 1, wr, wi, vl, 1, vr, 1,
338 $ 0, m, w, ifaill, ifailr, info )
339 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
341 CALL dhsein(
'R',
'/',
'N', sel, 0, a, 1, wr, wi, vl, 1, vr, 1,
342 $ 0, m, w, ifaill, ifailr, info )
343 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
345 CALL dhsein(
'R',
'N',
'/', sel, 0, a, 1, wr, wi, vl, 1, vr, 1,
346 $ 0, m, w, ifaill, ifailr, info )
347 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
349 CALL dhsein(
'R',
'N',
'N', sel, -1, a, 1, wr, wi, vl, 1, vr,
350 $ 1, 0, m, w, ifaill, ifailr, info )
351 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
353 CALL dhsein(
'R',
'N',
'N', sel, 2, a, 1, wr, wi, vl, 1, vr, 2,
354 $ 4, m, w, ifaill, ifailr, info )
355 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
357 CALL dhsein(
'L',
'N',
'N', sel, 2, a, 2, wr, wi, vl, 1, vr, 1,
358 $ 4, m, w, ifaill, ifailr, info )
359 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
361 CALL dhsein(
'R',
'N',
'N', sel, 2, a, 2, wr, wi, vl, 1, vr, 1,
362 $ 4, m, w, ifaill, ifailr, info )
363 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
365 CALL dhsein(
'R',
'N',
'N', sel, 2, a, 2, wr, wi, vl, 1, vr, 2,
366 $ 1, m, w, ifaill, ifailr, info )
367 CALL chkxer(
'DHSEIN', infot, nout, lerr, ok )
374 CALL dtrevc(
'/',
'A', sel, 0, a, 1, vl, 1, vr, 1, 0, m, w,
376 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
378 CALL dtrevc(
'L',
'/', sel, 0, a, 1, vl, 1, vr, 1, 0, m, w,
380 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
382 CALL dtrevc(
'L',
'A', sel, -1, a, 1, vl, 1, vr, 1, 0, m, w,
384 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
386 CALL dtrevc(
'L',
'A', sel, 2, a, 1, vl, 2, vr, 1, 4, m, w,
388 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
390 CALL dtrevc(
'L',
'A', sel, 2, a, 2, vl, 1, vr, 1, 4, m, w,
392 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
394 CALL dtrevc(
'R',
'A', sel, 2, a, 2, vl, 1, vr, 1, 4, m, w,
396 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
398 CALL dtrevc(
'L',
'A', sel, 2, a, 2, vl, 2, vr, 1, 1, m, w,
400 CALL chkxer(
'DTREVC', infot, nout, lerr, ok )
407 WRITE( nout, fmt = 9999 )path, nt
409 WRITE( nout, fmt = 9998 )path
412 9999
FORMAT( 1x, a3,
' routines passed the tests of the error exits',
413 $
' (', i3,
' tests done)' )
414 9998
FORMAT(
' *** ', a3,
' routines failed the tests of the error ',
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
logical function lsamen(N, CA, CB)
LSAMEN
subroutine dgehrd(N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO)
DGEHRD
subroutine dgebal(JOB, N, A, LDA, ILO, IHI, SCALE, INFO)
DGEBAL
subroutine dgebak(JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV, INFO)
DGEBAK
subroutine dhsein(SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI, VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL, IFAILR, INFO)
DHSEIN
subroutine dtrevc(SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, MM, M, WORK, INFO)
DTREVC
subroutine dhseqr(JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z, LDZ, WORK, LWORK, INFO)
DHSEQR
subroutine dormhr(SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
DORMHR
subroutine dorghr(N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO)
DORGHR