55
56
57
58
59
60
61 CHARACTER*3 PATH
62 INTEGER NUNIT
63
64
65
66
67
68 INTEGER NMAX, LW
69 parameter( nmax = 3, lw = nmax*nmax )
70
71
72 CHARACTER*2 C2
73 INTEGER I, IHI, ILO, INFO, J, M, NT
74
75
76 LOGICAL SEL( NMAX )
77 INTEGER IFAILL( NMAX ), IFAILR( NMAX )
78 DOUBLE PRECISION RW( NMAX ), S( NMAX )
79 COMPLEX*16 A( NMAX, NMAX ), C( NMAX, NMAX ), TAU( NMAX ),
80 $ VL( NMAX, NMAX ), VR( NMAX, NMAX ), W( LW ),
81 $ X( NMAX )
82
83
84 LOGICAL LSAMEN
86
87
90
91
92 INTRINSIC dble
93
94
95 LOGICAL LERR, OK
96 CHARACTER*32 SRNAMT
97 INTEGER INFOT, NOUT
98
99
100 COMMON / infoc / infot, nout, ok, lerr
101 COMMON / srnamc / srnamt
102
103
104
105 nout = nunit
106 WRITE( nout, fmt = * )
107 c2 = path( 2: 3 )
108
109
110
111 DO 20 j = 1, nmax
112 DO 10 i = 1, nmax
113 a( i, j ) = 1.d0 / dble( i+j )
114 10 CONTINUE
115 sel( j ) = .true.
116 20 CONTINUE
117 ok = .true.
118 nt = 0
119
120
121
122 IF(
lsamen( 2, c2,
'HS' ) )
THEN
123
124
125
126 srnamt = 'ZGEBAL'
127 infot = 1
128 CALL zgebal(
'/', 0, a, 1, ilo, ihi, s, info )
129 CALL chkxer(
'ZGEBAL', infot, nout, lerr, ok )
130 infot = 2
131 CALL zgebal(
'N', -1, a, 1, ilo, ihi, s, info )
132 CALL chkxer(
'ZGEBAL', infot, nout, lerr, ok )
133 infot = 4
134 CALL zgebal(
'N', 2, a, 1, ilo, ihi, s, info )
135 CALL chkxer(
'ZGEBAL', infot, nout, lerr, ok )
136 nt = nt + 3
137
138
139
140 srnamt = 'ZGEBAK'
141 infot = 1
142 CALL zgebak(
'/',
'R', 0, 1, 0, s, 0, a, 1, info )
143 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
144 infot = 2
145 CALL zgebak(
'N',
'/', 0, 1, 0, s, 0, a, 1, info )
146 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
147 infot = 3
148 CALL zgebak(
'N',
'R', -1, 1, 0, s, 0, a, 1, info )
149 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
150 infot = 4
151 CALL zgebak(
'N',
'R', 0, 0, 0, s, 0, a, 1, info )
152 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
153 infot = 4
154 CALL zgebak(
'N',
'R', 0, 2, 0, s, 0, a, 1, info )
155 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
156 infot = 5
157 CALL zgebak(
'N',
'R', 2, 2, 1, s, 0, a, 2, info )
158 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
159 infot = 5
160 CALL zgebak(
'N',
'R', 0, 1, 1, s, 0, a, 1, info )
161 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
162 infot = 7
163 CALL zgebak(
'N',
'R', 0, 1, 0, s, -1, a, 1, info )
164 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
165 infot = 9
166 CALL zgebak(
'N',
'R', 2, 1, 2, s, 0, a, 1, info )
167 CALL chkxer(
'ZGEBAK', infot, nout, lerr, ok )
168 nt = nt + 9
169
170
171
172 srnamt = 'ZGEHRD'
173 infot = 1
174 CALL zgehrd( -1, 1, 1, a, 1, tau, w, 1, info )
175 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
176 infot = 2
177 CALL zgehrd( 0, 0, 0, a, 1, tau, w, 1, info )
178 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
179 infot = 2
180 CALL zgehrd( 0, 2, 0, a, 1, tau, w, 1, info )
181 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
182 infot = 3
183 CALL zgehrd( 1, 1, 0, a, 1, tau, w, 1, info )
184 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
185 infot = 3
186 CALL zgehrd( 0, 1, 1, a, 1, tau, w, 1, info )
187 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
188 infot = 5
189 CALL zgehrd( 2, 1, 1, a, 1, tau, w, 2, info )
190 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
191 infot = 8
192 CALL zgehrd( 2, 1, 2, a, 2, tau, w, 1, info )
193 CALL chkxer(
'ZGEHRD', infot, nout, lerr, ok )
194 nt = nt + 7
195
196
197
198 srnamt = 'ZGEHD2'
199 infot = 1
200 CALL zgehd2( -1, 1, 1, a, 1, tau, w, info )
201 CALL chkxer(
'ZGEHD2', infot, nout, lerr, ok )
202 infot = 2
203 CALL zgehd2( 0, 0, 0, a, 1, tau, w, info )
204 CALL chkxer(
'ZGEHD2', infot, nout, lerr, ok )
205 infot = 2
206 CALL zgehd2( 0, 2, 0, a, 1, tau, w, info )
207 CALL chkxer(
'ZGEHD2', infot, nout, lerr, ok )
208 infot = 3
209 CALL zgehd2( 1, 1, 0, a, 1, tau, w, info )
210 CALL chkxer(
'ZGEHD2', infot, nout, lerr, ok )
211 infot = 3
212 CALL zgehd2( 0, 1, 1, a, 1, tau, w, info )
213 CALL chkxer(
'ZGEHD2', infot, nout, lerr, ok )
214 infot = 5
215 CALL zgehd2( 2, 1, 1, a, 1, tau, w, info )
216 CALL chkxer(
'ZGEHD2', infot, nout, lerr, ok )
217 nt = nt + 6
218
219
220
221 srnamt = 'ZUNGHR'
222 infot = 1
223 CALL zunghr( -1, 1, 1, a, 1, tau, w, 1, info )
224 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
225 infot = 2
226 CALL zunghr( 0, 0, 0, a, 1, tau, w, 1, info )
227 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
228 infot = 2
229 CALL zunghr( 0, 2, 0, a, 1, tau, w, 1, info )
230 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
231 infot = 3
232 CALL zunghr( 1, 1, 0, a, 1, tau, w, 1, info )
233 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
234 infot = 3
235 CALL zunghr( 0, 1, 1, a, 1, tau, w, 1, info )
236 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
237 infot = 5
238 CALL zunghr( 2, 1, 1, a, 1, tau, w, 1, info )
239 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
240 infot = 8
241 CALL zunghr( 3, 1, 3, a, 3, tau, w, 1, info )
242 CALL chkxer(
'ZUNGHR', infot, nout, lerr, ok )
243 nt = nt + 7
244
245
246
247 srnamt = 'ZUNMHR'
248 infot = 1
249 CALL zunmhr(
'/',
'N', 0, 0, 1, 0, a, 1, tau, c, 1, w, 1,
250 $ info )
251 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
252 infot = 2
253 CALL zunmhr(
'L',
'/', 0, 0, 1, 0, a, 1, tau, c, 1, w, 1,
254 $ info )
255 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
256 infot = 3
257 CALL zunmhr(
'L',
'N', -1, 0, 1, 0, a, 1, tau, c, 1, w, 1,
258 $ info )
259 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
260 infot = 4
261 CALL zunmhr(
'L',
'N', 0, -1, 1, 0, a, 1, tau, c, 1, w, 1,
262 $ info )
263 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
264 infot = 5
265 CALL zunmhr(
'L',
'N', 0, 0, 0, 0, a, 1, tau, c, 1, w, 1,
266 $ info )
267 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
268 infot = 5
269 CALL zunmhr(
'L',
'N', 0, 0, 2, 0, a, 1, tau, c, 1, w, 1,
270 $ info )
271 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
272 infot = 5
273 CALL zunmhr(
'L',
'N', 1, 2, 2, 1, a, 1, tau, c, 1, w, 2,
274 $ info )
275 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
276 infot = 5
277 CALL zunmhr(
'R',
'N', 2, 1, 2, 1, a, 1, tau, c, 2, w, 2,
278 $ info )
279 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
280 infot = 6
281 CALL zunmhr(
'L',
'N', 1, 1, 1, 0, a, 1, tau, c, 1, w, 1,
282 $ info )
283 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
284 infot = 6
285 CALL zunmhr(
'L',
'N', 0, 1, 1, 1, a, 1, tau, c, 1, w, 1,
286 $ info )
287 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
288 infot = 6
289 CALL zunmhr(
'R',
'N', 1, 0, 1, 1, a, 1, tau, c, 1, w, 1,
290 $ info )
291 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
292 infot = 8
293 CALL zunmhr(
'L',
'N', 2, 1, 1, 1, a, 1, tau, c, 2, w, 1,
294 $ info )
295 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
296 infot = 8
297 CALL zunmhr(
'R',
'N', 1, 2, 1, 1, a, 1, tau, c, 1, w, 1,
298 $ info )
299 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
300 infot = 11
301 CALL zunmhr(
'L',
'N', 2, 1, 1, 1, a, 2, tau, c, 1, w, 1,
302 $ info )
303 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
304 infot = 13
305 CALL zunmhr(
'L',
'N', 1, 2, 1, 1, a, 1, tau, c, 1, w, 1,
306 $ info )
307 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
308 infot = 13
309 CALL zunmhr(
'R',
'N', 2, 1, 1, 1, a, 1, tau, c, 2, w, 1,
310 $ info )
311 CALL chkxer(
'ZUNMHR', infot, nout, lerr, ok )
312 nt = nt + 16
313
314
315
316 srnamt = 'ZHSEQR'
317 infot = 1
318 CALL zhseqr(
'/',
'N', 0, 1, 0, a, 1, x, c, 1, w, 1, info )
319 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
320 infot = 2
321 CALL zhseqr(
'E',
'/', 0, 1, 0, a, 1, x, c, 1, w, 1, info )
322 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
323 infot = 3
324 CALL zhseqr(
'E',
'N', -1, 1, 0, a, 1, x, c, 1, w, 1, info )
325 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
326 infot = 4
327 CALL zhseqr(
'E',
'N', 0, 0, 0, a, 1, x, c, 1, w, 1, info )
328 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
329 infot = 4
330 CALL zhseqr(
'E',
'N', 0, 2, 0, a, 1, x, c, 1, w, 1, info )
331 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
332 infot = 5
333 CALL zhseqr(
'E',
'N', 1, 1, 0, a, 1, x, c, 1, w, 1, info )
334 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
335 infot = 5
336 CALL zhseqr(
'E',
'N', 1, 1, 2, a, 1, x, c, 1, w, 1, info )
337 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
338 infot = 7
339 CALL zhseqr(
'E',
'N', 2, 1, 2, a, 1, x, c, 2, w, 1, info )
340 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
341 infot = 10
342 CALL zhseqr(
'E',
'V', 2, 1, 2, a, 2, x, c, 1, w, 1, info )
343 CALL chkxer(
'ZHSEQR', infot, nout, lerr, ok )
344 nt = nt + 9
345
346
347
348 srnamt = 'ZHSEIN'
349 infot = 1
350 CALL zhsein(
'/',
'N',
'N', sel, 0, a, 1, x, vl, 1, vr, 1, 0,
351 $ m, w, rw, ifaill, ifailr, info )
352 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
353 infot = 2
354 CALL zhsein(
'R',
'/',
'N', sel, 0, a, 1, x, vl, 1, vr, 1, 0,
355 $ m, w, rw, ifaill, ifailr, info )
356 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
357 infot = 3
358 CALL zhsein(
'R',
'N',
'/', sel, 0, a, 1, x, vl, 1, vr, 1, 0,
359 $ m, w, rw, ifaill, ifailr, info )
360 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
361 infot = 5
362 CALL zhsein(
'R',
'N',
'N', sel, -1, a, 1, x, vl, 1, vr, 1, 0,
363 $ m, w, rw, ifaill, ifailr, info )
364 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
365 infot = 7
366 CALL zhsein(
'R',
'N',
'N', sel, 2, a, 1, x, vl, 1, vr, 2, 4,
367 $ m, w, rw, ifaill, ifailr, info )
368 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
369 infot = 10
370 CALL zhsein(
'L',
'N',
'N', sel, 2, a, 2, x, vl, 1, vr, 1, 4,
371 $ m, w, rw, ifaill, ifailr, info )
372 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
373 infot = 12
374 CALL zhsein(
'R',
'N',
'N', sel, 2, a, 2, x, vl, 1, vr, 1, 4,
375 $ m, w, rw, ifaill, ifailr, info )
376 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
377 infot = 13
378 CALL zhsein(
'R',
'N',
'N', sel, 2, a, 2, x, vl, 1, vr, 2, 1,
379 $ m, w, rw, ifaill, ifailr, info )
380 CALL chkxer(
'ZHSEIN', infot, nout, lerr, ok )
381 nt = nt + 8
382
383
384
385 srnamt = 'ZTREVC'
386 infot = 1
387 CALL ztrevc(
'/',
'A', sel, 0, a, 1, vl, 1, vr, 1, 0, m, w, rw,
388 $ info )
389 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
390 infot = 2
391 CALL ztrevc(
'L',
'/', sel, 0, a, 1, vl, 1, vr, 1, 0, m, w, rw,
392 $ info )
393 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
394 infot = 4
395 CALL ztrevc(
'L',
'A', sel, -1, a, 1, vl, 1, vr, 1, 0, m, w,
396 $ rw, info )
397 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
398 infot = 6
399 CALL ztrevc(
'L',
'A', sel, 2, a, 1, vl, 2, vr, 1, 4, m, w, rw,
400 $ info )
401 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
402 infot = 8
403 CALL ztrevc(
'L',
'A', sel, 2, a, 2, vl, 1, vr, 1, 4, m, w, rw,
404 $ info )
405 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
406 infot = 10
407 CALL ztrevc(
'R',
'A', sel, 2, a, 2, vl, 1, vr, 1, 4, m, w, rw,
408 $ info )
409 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
410 infot = 11
411 CALL ztrevc(
'L',
'A', sel, 2, a, 2, vl, 2, vr, 1, 1, m, w, rw,
412 $ info )
413 CALL chkxer(
'ZTREVC', infot, nout, lerr, ok )
414 nt = nt + 7
415
416
417
418 srnamt = 'ZTREVC3'
419 infot = 1
420 CALL ztrevc3(
'/',
'A', sel, 0, a, 1, vl, 1, vr, 1, 0, m, w,
421 $ lw, rw, 1, info )
422 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
423 infot = 2
424 CALL ztrevc3(
'L',
'/', sel, 0, a, 1, vl, 1, vr, 1, 0, m, w,
425 $ lw, rw, 1, info )
426 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
427 infot = 4
428 CALL ztrevc3(
'L',
'A', sel, -1, a, 1, vl, 1, vr, 1, 0, m, w,
429 $ lw, rw, 1, info )
430 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
431 infot = 6
432 CALL ztrevc3(
'L',
'A', sel, 2, a, 1, vl, 2, vr, 1, 4, m, w,
433 $ lw, rw, 2, info )
434 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
435 infot = 8
436 CALL ztrevc3(
'L',
'A', sel, 2, a, 2, vl, 1, vr, 1, 4, m, w,
437 $ lw, rw, 2, info )
438 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
439 infot = 10
440 CALL ztrevc3(
'R',
'A', sel, 2, a, 2, vl, 1, vr, 1, 4, m, w,
441 $ lw, rw, 2, info )
442 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
443 infot = 11
444 CALL ztrevc3(
'L',
'A', sel, 2, a, 2, vl, 2, vr, 1, 1, m, w,
445 $ lw, rw, 2, info )
446 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
447 infot = 14
448 CALL ztrevc3(
'L',
'A', sel, 2, a, 2, vl, 2, vr, 1, 2, m, w,
449 $ 2, rw, 2, info )
450 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
451 infot = 16
452 CALL ztrevc3(
'L',
'A', sel, 2, a, 2, vl, 2, vr, 1, 2, m, w,
453 $ lw, rw, 1, info )
454 CALL chkxer(
'ZTREVC3', infot, nout, lerr, ok )
455 nt = nt + 9
456 END IF
457
458
459
460 IF( ok ) THEN
461 WRITE( nout, fmt = 9999 )path, nt
462 ELSE
463 WRITE( nout, fmt = 9998 )path
464 END IF
465
466 9999 FORMAT( 1x, a3, ' routines passed the tests of the error exits',
467 $ ' (', i3, ' tests done)' )
468 9998 FORMAT( ' *** ', a3, ' routines failed the tests of the error ',
469 $ 'exits ***' )
470
471 RETURN
472
473
474
subroutine chkxer(srnamt, infot, nout, lerr, ok)
subroutine zgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info)
ZGEBAK
subroutine zgebal(job, n, a, lda, ilo, ihi, scale, info)
ZGEBAL
subroutine zgehd2(n, ilo, ihi, a, lda, tau, work, info)
ZGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm.
subroutine zgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
ZGEHRD
subroutine zhsein(side, eigsrc, initv, select, n, h, ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork, ifaill, ifailr, info)
ZHSEIN
subroutine zhseqr(job, compz, n, ilo, ihi, h, ldh, w, z, ldz, work, lwork, info)
ZHSEQR
logical function lsamen(n, ca, cb)
LSAMEN
subroutine ztrevc3(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, lwork, rwork, lrwork, info)
ZTREVC3
subroutine ztrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, rwork, info)
ZTREVC
subroutine zunghr(n, ilo, ihi, a, lda, tau, work, lwork, info)
ZUNGHR
subroutine zunmhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info)
ZUNMHR