55
56
57
58
59
60
61 CHARACTER*3 PATH
62 INTEGER NUNIT
63
64
65
66
67
68 INTEGER NMAX
69 parameter( nmax = 4 )
70
71
72 CHARACTER*2 C2
73 INTEGER I, INFO, J
74 DOUBLE PRECISION ANRM, RCOND
75
76
77 DOUBLE PRECISION R( NMAX ), R1( NMAX ), R2( NMAX )
78 COMPLEX*16 A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
79 $ W( 2*NMAX ), X( NMAX )
80
81
82 LOGICAL LSAMEN
84
85
90
91
92 LOGICAL LERR, OK
93 CHARACTER*32 SRNAMT
94 INTEGER INFOT, NOUT
95
96
97 COMMON / infoc / infot, nout, ok, lerr
98 COMMON / srnamc / srnamt
99
100
101 INTRINSIC dble, dcmplx
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 ) = dcmplx( 1.d0 / dble( i+j ),
114 $ -1.d0 / dble( i+j ) )
115 af( i, j ) = dcmplx( 1.d0 / dble( i+j ),
116 $ -1.d0 / dble( i+j ) )
117 10 CONTINUE
118 b( j ) = 0.d0
119 r1( j ) = 0.d0
120 r2( j ) = 0.d0
121 w( j ) = 0.d0
122 x( j ) = 0.d0
123 20 CONTINUE
124 anrm = 1.d0
125 ok = .true.
126
127
128
129
130 IF(
lsamen( 2, c2,
'PO' ) )
THEN
131
132
133
134 srnamt = 'ZPOTRF'
135 infot = 1
136 CALL zpotrf(
'/', 0, a, 1, info )
137 CALL chkxer(
'ZPOTRF', infot, nout, lerr, ok )
138 infot = 2
139 CALL zpotrf(
'U', -1, a, 1, info )
140 CALL chkxer(
'ZPOTRF', infot, nout, lerr, ok )
141 infot = 4
142 CALL zpotrf(
'U', 2, a, 1, info )
143 CALL chkxer(
'ZPOTRF', infot, nout, lerr, ok )
144
145
146
147 srnamt = 'ZPOTF2'
148 infot = 1
149 CALL zpotf2(
'/', 0, a, 1, info )
150 CALL chkxer(
'ZPOTF2', infot, nout, lerr, ok )
151 infot = 2
152 CALL zpotf2(
'U', -1, a, 1, info )
153 CALL chkxer(
'ZPOTF2', infot, nout, lerr, ok )
154 infot = 4
155 CALL zpotf2(
'U', 2, a, 1, info )
156 CALL chkxer(
'ZPOTF2', infot, nout, lerr, ok )
157
158
159
160 srnamt = 'ZPOTRI'
161 infot = 1
162 CALL zpotri(
'/', 0, a, 1, info )
163 CALL chkxer(
'ZPOTRI', infot, nout, lerr, ok )
164 infot = 2
165 CALL zpotri(
'U', -1, a, 1, info )
166 CALL chkxer(
'ZPOTRI', infot, nout, lerr, ok )
167 infot = 4
168 CALL zpotri(
'U', 2, a, 1, info )
169 CALL chkxer(
'ZPOTRI', infot, nout, lerr, ok )
170
171
172
173 srnamt = 'ZPOTRS'
174 infot = 1
175 CALL zpotrs(
'/', 0, 0, a, 1, b, 1, info )
176 CALL chkxer(
'ZPOTRS', infot, nout, lerr, ok )
177 infot = 2
178 CALL zpotrs(
'U', -1, 0, a, 1, b, 1, info )
179 CALL chkxer(
'ZPOTRS', infot, nout, lerr, ok )
180 infot = 3
181 CALL zpotrs(
'U', 0, -1, a, 1, b, 1, info )
182 CALL chkxer(
'ZPOTRS', infot, nout, lerr, ok )
183 infot = 5
184 CALL zpotrs(
'U', 2, 1, a, 1, b, 2, info )
185 CALL chkxer(
'ZPOTRS', infot, nout, lerr, ok )
186 infot = 7
187 CALL zpotrs(
'U', 2, 1, a, 2, b, 1, info )
188 CALL chkxer(
'ZPOTRS', infot, nout, lerr, ok )
189
190
191
192 srnamt = 'ZPORFS'
193 infot = 1
194 CALL zporfs(
'/', 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w, r,
195 $ info )
196 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
197 infot = 2
198 CALL zporfs(
'U', -1, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w, r,
199 $ info )
200 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
201 infot = 3
202 CALL zporfs(
'U', 0, -1, a, 1, af, 1, b, 1, x, 1, r1, r2, w, r,
203 $ info )
204 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
205 infot = 5
206 CALL zporfs(
'U', 2, 1, a, 1, af, 2, b, 2, x, 2, r1, r2, w, r,
207 $ info )
208 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
209 infot = 7
210 CALL zporfs(
'U', 2, 1, a, 2, af, 1, b, 2, x, 2, r1, r2, w, r,
211 $ info )
212 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
213 infot = 9
214 CALL zporfs(
'U', 2, 1, a, 2, af, 2, b, 1, x, 2, r1, r2, w, r,
215 $ info )
216 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
217 infot = 11
218 CALL zporfs(
'U', 2, 1, a, 2, af, 2, b, 2, x, 1, r1, r2, w, r,
219 $ info )
220 CALL chkxer(
'ZPORFS', infot, nout, lerr, ok )
221
222
223
224 srnamt = 'ZPOCON'
225 infot = 1
226 CALL zpocon(
'/', 0, a, 1, anrm, rcond, w, r, info )
227 CALL chkxer(
'ZPOCON', infot, nout, lerr, ok )
228 infot = 2
229 CALL zpocon(
'U', -1, a, 1, anrm, rcond, w, r, info )
230 CALL chkxer(
'ZPOCON', infot, nout, lerr, ok )
231 infot = 4
232 CALL zpocon(
'U', 2, a, 1, anrm, rcond, w, r, info )
233 CALL chkxer(
'ZPOCON', infot, nout, lerr, ok )
234 infot = 5
235 CALL zpocon(
'U', 1, a, 1, -anrm, rcond, w, r, info )
236 CALL chkxer(
'ZPOCON', infot, nout, lerr, ok )
237
238
239
240 srnamt = 'ZPOEQU'
241 infot = 1
242 CALL zpoequ( -1, a, 1, r1, rcond, anrm, info )
243 CALL chkxer(
'ZPOEQU', infot, nout, lerr, ok )
244 infot = 3
245 CALL zpoequ( 2, a, 1, r1, rcond, anrm, info )
246 CALL chkxer(
'ZPOEQU', infot, nout, lerr, ok )
247
248
249
250
251 ELSE IF(
lsamen( 2, c2,
'PP' ) )
THEN
252
253
254
255 srnamt = 'ZPPTRF'
256 infot = 1
257 CALL zpptrf(
'/', 0, a, info )
258 CALL chkxer(
'ZPPTRF', infot, nout, lerr, ok )
259 infot = 2
260 CALL zpptrf(
'U', -1, a, info )
261 CALL chkxer(
'ZPPTRF', infot, nout, lerr, ok )
262
263
264
265 srnamt = 'ZPPTRI'
266 infot = 1
267 CALL zpptri(
'/', 0, a, info )
268 CALL chkxer(
'ZPPTRI', infot, nout, lerr, ok )
269 infot = 2
270 CALL zpptri(
'U', -1, a, info )
271 CALL chkxer(
'ZPPTRI', infot, nout, lerr, ok )
272
273
274
275 srnamt = 'ZPPTRS'
276 infot = 1
277 CALL zpptrs(
'/', 0, 0, a, b, 1, info )
278 CALL chkxer(
'ZPPTRS', infot, nout, lerr, ok )
279 infot = 2
280 CALL zpptrs(
'U', -1, 0, a, b, 1, info )
281 CALL chkxer(
'ZPPTRS', infot, nout, lerr, ok )
282 infot = 3
283 CALL zpptrs(
'U', 0, -1, a, b, 1, info )
284 CALL chkxer(
'ZPPTRS', infot, nout, lerr, ok )
285 infot = 6
286 CALL zpptrs(
'U', 2, 1, a, b, 1, info )
287 CALL chkxer(
'ZPPTRS', infot, nout, lerr, ok )
288
289
290
291 srnamt = 'ZPPRFS'
292 infot = 1
293 CALL zpprfs(
'/', 0, 0, a, af, b, 1, x, 1, r1, r2, w, r, info )
294 CALL chkxer(
'ZPPRFS', infot, nout, lerr, ok )
295 infot = 2
296 CALL zpprfs(
'U', -1, 0, a, af, b, 1, x, 1, r1, r2, w, r,
297 $ info )
298 CALL chkxer(
'ZPPRFS', infot, nout, lerr, ok )
299 infot = 3
300 CALL zpprfs(
'U', 0, -1, a, af, b, 1, x, 1, r1, r2, w, r,
301 $ info )
302 CALL chkxer(
'ZPPRFS', infot, nout, lerr, ok )
303 infot = 7
304 CALL zpprfs(
'U', 2, 1, a, af, b, 1, x, 2, r1, r2, w, r, info )
305 CALL chkxer(
'ZPPRFS', infot, nout, lerr, ok )
306 infot = 9
307 CALL zpprfs(
'U', 2, 1, a, af, b, 2, x, 1, r1, r2, w, r, info )
308 CALL chkxer(
'ZPPRFS', infot, nout, lerr, ok )
309
310
311
312 srnamt = 'ZPPCON'
313 infot = 1
314 CALL zppcon(
'/', 0, a, anrm, rcond, w, r, info )
315 CALL chkxer(
'ZPPCON', infot, nout, lerr, ok )
316 infot = 2
317 CALL zppcon(
'U', -1, a, anrm, rcond, w, r, info )
318 CALL chkxer(
'ZPPCON', infot, nout, lerr, ok )
319 infot = 4
320 CALL zppcon(
'U', 1, a, -anrm, rcond, w, r, info )
321 CALL chkxer(
'ZPPCON', infot, nout, lerr, ok )
322
323
324
325 srnamt = 'ZPPEQU'
326 infot = 1
327 CALL zppequ(
'/', 0, a, r1, rcond, anrm, info )
328 CALL chkxer(
'ZPPEQU', infot, nout, lerr, ok )
329 infot = 2
330 CALL zppequ(
'U', -1, a, r1, rcond, anrm, info )
331 CALL chkxer(
'ZPPEQU', infot, nout, lerr, ok )
332
333
334
335
336 ELSE IF(
lsamen( 2, c2,
'PB' ) )
THEN
337
338
339
340 srnamt = 'ZPBTRF'
341 infot = 1
342 CALL zpbtrf(
'/', 0, 0, a, 1, info )
343 CALL chkxer(
'ZPBTRF', infot, nout, lerr, ok )
344 infot = 2
345 CALL zpbtrf(
'U', -1, 0, a, 1, info )
346 CALL chkxer(
'ZPBTRF', infot, nout, lerr, ok )
347 infot = 3
348 CALL zpbtrf(
'U', 1, -1, a, 1, info )
349 CALL chkxer(
'ZPBTRF', infot, nout, lerr, ok )
350 infot = 5
351 CALL zpbtrf(
'U', 2, 1, a, 1, info )
352 CALL chkxer(
'ZPBTRF', infot, nout, lerr, ok )
353
354
355
356 srnamt = 'ZPBTF2'
357 infot = 1
358 CALL zpbtf2(
'/', 0, 0, a, 1, info )
359 CALL chkxer(
'ZPBTF2', infot, nout, lerr, ok )
360 infot = 2
361 CALL zpbtf2(
'U', -1, 0, a, 1, info )
362 CALL chkxer(
'ZPBTF2', infot, nout, lerr, ok )
363 infot = 3
364 CALL zpbtf2(
'U', 1, -1, a, 1, info )
365 CALL chkxer(
'ZPBTF2', infot, nout, lerr, ok )
366 infot = 5
367 CALL zpbtf2(
'U', 2, 1, a, 1, info )
368 CALL chkxer(
'ZPBTF2', infot, nout, lerr, ok )
369
370
371
372 srnamt = 'ZPBTRS'
373 infot = 1
374 CALL zpbtrs(
'/', 0, 0, 0, a, 1, b, 1, info )
375 CALL chkxer(
'ZPBTRS', infot, nout, lerr, ok )
376 infot = 2
377 CALL zpbtrs(
'U', -1, 0, 0, a, 1, b, 1, info )
378 CALL chkxer(
'ZPBTRS', infot, nout, lerr, ok )
379 infot = 3
380 CALL zpbtrs(
'U', 1, -1, 0, a, 1, b, 1, info )
381 CALL chkxer(
'ZPBTRS', infot, nout, lerr, ok )
382 infot = 4
383 CALL zpbtrs(
'U', 0, 0, -1, a, 1, b, 1, info )
384 CALL chkxer(
'ZPBTRS', infot, nout, lerr, ok )
385 infot = 6
386 CALL zpbtrs(
'U', 2, 1, 1, a, 1, b, 1, info )
387 CALL chkxer(
'ZPBTRS', infot, nout, lerr, ok )
388 infot = 8
389 CALL zpbtrs(
'U', 2, 0, 1, a, 1, b, 1, info )
390 CALL chkxer(
'ZPBTRS', infot, nout, lerr, ok )
391
392
393
394 srnamt = 'ZPBRFS'
395 infot = 1
396 CALL zpbrfs(
'/', 0, 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
397 $ r, info )
398 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
399 infot = 2
400 CALL zpbrfs(
'U', -1, 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
401 $ r, info )
402 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
403 infot = 3
404 CALL zpbrfs(
'U', 1, -1, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
405 $ r, info )
406 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
407 infot = 4
408 CALL zpbrfs(
'U', 0, 0, -1, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
409 $ r, info )
410 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
411 infot = 6
412 CALL zpbrfs(
'U', 2, 1, 1, a, 1, af, 2, b, 2, x, 2, r1, r2, w,
413 $ r, info )
414 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
415 infot = 8
416 CALL zpbrfs(
'U', 2, 1, 1, a, 2, af, 1, b, 2, x, 2, r1, r2, w,
417 $ r, info )
418 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
419 infot = 10
420 CALL zpbrfs(
'U', 2, 0, 1, a, 1, af, 1, b, 1, x, 2, r1, r2, w,
421 $ r, info )
422 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
423 infot = 12
424 CALL zpbrfs(
'U', 2, 0, 1, a, 1, af, 1, b, 2, x, 1, r1, r2, w,
425 $ r, info )
426 CALL chkxer(
'ZPBRFS', infot, nout, lerr, ok )
427
428
429
430 srnamt = 'ZPBCON'
431 infot = 1
432 CALL zpbcon(
'/', 0, 0, a, 1, anrm, rcond, w, r, info )
433 CALL chkxer(
'ZPBCON', infot, nout, lerr, ok )
434 infot = 2
435 CALL zpbcon(
'U', -1, 0, a, 1, anrm, rcond, w, r, info )
436 CALL chkxer(
'ZPBCON', infot, nout, lerr, ok )
437 infot = 3
438 CALL zpbcon(
'U', 1, -1, a, 1, anrm, rcond, w, r, info )
439 CALL chkxer(
'ZPBCON', infot, nout, lerr, ok )
440 infot = 5
441 CALL zpbcon(
'U', 2, 1, a, 1, anrm, rcond, w, r, info )
442 CALL chkxer(
'ZPBCON', infot, nout, lerr, ok )
443 infot = 6
444 CALL zpbcon(
'U', 1, 0, a, 1, -anrm, rcond, w, r, info )
445 CALL chkxer(
'ZPBCON', infot, nout, lerr, ok )
446
447
448
449 srnamt = 'ZPBEQU'
450 infot = 1
451 CALL zpbequ(
'/', 0, 0, a, 1, r1, rcond, anrm, info )
452 CALL chkxer(
'ZPBEQU', infot, nout, lerr, ok )
453 infot = 2
454 CALL zpbequ(
'U', -1, 0, a, 1, r1, rcond, anrm, info )
455 CALL chkxer(
'ZPBEQU', infot, nout, lerr, ok )
456 infot = 3
457 CALL zpbequ(
'U', 1, -1, a, 1, r1, rcond, anrm, info )
458 CALL chkxer(
'ZPBEQU', infot, nout, lerr, ok )
459 infot = 5
460 CALL zpbequ(
'U', 2, 1, a, 1, r1, rcond, anrm, info )
461 CALL chkxer(
'ZPBEQU', infot, nout, lerr, ok )
462 END IF
463
464
465
466 CALL alaesm( path, ok, nout )
467
468 RETURN
469
470
471
subroutine alaesm(path, ok, nout)
ALAESM
subroutine chkxer(srnamt, infot, nout, lerr, ok)
logical function lsamen(n, ca, cb)
LSAMEN
subroutine zpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, rwork, info)
ZPBCON
subroutine zpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
ZPBEQU
subroutine zpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZPBRFS
subroutine zpbtf2(uplo, n, kd, ab, ldab, info)
ZPBTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite band matrix (un...
subroutine zpbtrf(uplo, n, kd, ab, ldab, info)
ZPBTRF
subroutine zpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
ZPBTRS
subroutine zpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
ZPOCON
subroutine zpoequ(n, a, lda, s, scond, amax, info)
ZPOEQU
subroutine zporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZPORFS
subroutine zpotf2(uplo, n, a, lda, info)
ZPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblock...
subroutine zpotrf(uplo, n, a, lda, info)
ZPOTRF
subroutine zpotri(uplo, n, a, lda, info)
ZPOTRI
subroutine zpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
ZPOTRS
subroutine zppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
ZPPCON
subroutine zppequ(uplo, n, ap, s, scond, amax, info)
ZPPEQU
subroutine zpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZPPRFS
subroutine zpptrf(uplo, n, ap, info)
ZPPTRF
subroutine zpptri(uplo, n, ap, info)
ZPPTRI
subroutine zpptrs(uplo, n, nrhs, ap, b, ldb, info)
ZPPTRS