3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * SUBROUTINE ZERRPO( PATH, NUNIT )
13 * .. Scalar Arguments ..
24 *> ZERRPO tests the error exits for the COMPLEX*16 routines
25 *> for Hermitian positive definite matrices.
27 *> Note that this file is used only when the XBLAS are available,
28 *> otherwise zerrpo.f defines this subroutine.
36 *> PATH is CHARACTER*3
37 *> The LAPACK path name for the routines to be tested.
43 *> The unit number for output.
49 *> \author Univ. of Tennessee
50 *> \author Univ. of California Berkeley
51 *> \author Univ. of Colorado Denver
54 *> \date November 2015
56 *> \ingroup complex16_lin
58 * =====================================================================
59 SUBROUTINE ZERRPO( PATH, NUNIT )
61 * -- LAPACK test routine (version 3.6.0) --
62 * -- LAPACK is a software package provided by Univ. of Tennessee, --
63 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
66 * .. Scalar Arguments ..
71 * =====================================================================
75 PARAMETER ( NMAX = 4 )
80 INTEGER I, INFO, J, N_ERR_BNDS, NPARAMS
81 DOUBLE PRECISION ANRM, RCOND, BERR
84 DOUBLE PRECISION S( NMAX ), R( NMAX ), R1( NMAX ), R2( NMAX ),
85 $ ERR_BNDS_N( NMAX, 3 ), ERR_BNDS_C( NMAX, 3 ),
87 COMPLEX*16 A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
88 $ W( 2*NMAX ), X( NMAX )
90 * .. External Functions ..
94 * .. External Subroutines ..
95 EXTERNAL ALAESM, CHKXER, ZPBCON, ZPBEQU, ZPBRFS, ZPBTF2,
96 $ ZPBTRF, ZPBTRS, ZPOCON, ZPOEQU, ZPORFS, ZPOTF2,
97 $ ZPOTRF, ZPOTRI, ZPOTRS, ZPPCON, ZPPEQU, ZPPRFS,
98 $ ZPPTRF, ZPPTRI, ZPPTRS, ZPOEQUB, ZPORFSX
100 * .. Scalars in Common ..
105 * .. Common blocks ..
106 COMMON / INFOC / INFOT, NOUT, OK, LERR
107 COMMON / SRNAMC / SRNAMT
109 * .. Intrinsic Functions ..
110 INTRINSIC DBLE, DCMPLX
112 * .. Executable Statements ..
115 WRITE( NOUT, FMT = * )
118 * Set the variables to innocuous values.
122 A( I, J ) = DCMPLX( 1.D0 / DBLE( I+J ),
123 $ -1.D0 / DBLE( I+J ) )
124 AF( I, J ) = DCMPLX( 1.D0 / DBLE( I+J ),
125 $ -1.D0 / DBLE( I+J ) )
137 * Test error exits of the routines that use the Cholesky
138 * decomposition of a Hermitian positive definite matrix.
140 IF( LSAMEN( 2, C2, 'PO' ) ) THEN
146 CALL ZPOTRF( '/', 0, A, 1, INFO )
147 CALL CHKXER( 'ZPOTRF', INFOT, NOUT, LERR, OK )
149 CALL ZPOTRF( 'U', -1, A, 1, INFO )
150 CALL CHKXER( 'ZPOTRF', INFOT, NOUT, LERR, OK )
152 CALL ZPOTRF( 'U', 2, A, 1, INFO )
153 CALL CHKXER( 'ZPOTRF', INFOT, NOUT, LERR, OK )
159 CALL ZPOTF2( '/', 0, A, 1, INFO )
160 CALL CHKXER( 'ZPOTF2', INFOT, NOUT, LERR, OK )
162 CALL ZPOTF2( 'U', -1, A, 1, INFO )
163 CALL CHKXER( 'ZPOTF2', INFOT, NOUT, LERR, OK )
165 CALL ZPOTF2( 'U', 2, A, 1, INFO )
166 CALL CHKXER( 'ZPOTF2', INFOT, NOUT, LERR, OK )
172 CALL ZPOTRI( '/', 0, A, 1, INFO )
173 CALL CHKXER( 'ZPOTRI', INFOT, NOUT, LERR, OK )
175 CALL ZPOTRI( 'U', -1, A, 1, INFO )
176 CALL CHKXER( 'ZPOTRI', INFOT, NOUT, LERR, OK )
178 CALL ZPOTRI( 'U', 2, A, 1, INFO )
179 CALL CHKXER( 'ZPOTRI', INFOT, NOUT, LERR, OK )
185 CALL ZPOTRS( '/', 0, 0, A, 1, B, 1, INFO )
186 CALL CHKXER( 'ZPOTRS', INFOT, NOUT, LERR, OK )
188 CALL ZPOTRS( 'U', -1, 0, A, 1, B, 1, INFO )
189 CALL CHKXER( 'ZPOTRS', INFOT, NOUT, LERR, OK )
191 CALL ZPOTRS( 'U', 0, -1, A, 1, B, 1, INFO )
192 CALL CHKXER( 'ZPOTRS', INFOT, NOUT, LERR, OK )
194 CALL ZPOTRS( 'U', 2, 1, A, 1, B, 2, INFO )
195 CALL CHKXER( 'ZPOTRS', INFOT, NOUT, LERR, OK )
197 CALL ZPOTRS( 'U', 2, 1, A, 2, B, 1, INFO )
198 CALL CHKXER( 'ZPOTRS', INFOT, NOUT, LERR, OK )
204 CALL ZPORFS( '/', 0, 0, A, 1, AF, 1, B, 1, X, 1, R1, R2, W, R,
206 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
208 CALL ZPORFS( 'U', -1, 0, A, 1, AF, 1, B, 1, X, 1, R1, R2, W, R,
210 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
212 CALL ZPORFS( 'U', 0, -1, A, 1, AF, 1, B, 1, X, 1, R1, R2, W, R,
214 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
216 CALL ZPORFS( 'U', 2, 1, A, 1, AF, 2, B, 2, X, 2, R1, R2, W, R,
218 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
220 CALL ZPORFS( 'U', 2, 1, A, 2, AF, 1, B, 2, X, 2, R1, R2, W, R,
222 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
224 CALL ZPORFS( 'U', 2, 1, A, 2, AF, 2, B, 1, X, 2, R1, R2, W, R,
226 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
228 CALL ZPORFS( 'U', 2, 1, A, 2, AF, 2, B, 2, X, 1, R1, R2, W, R,
230 CALL CHKXER( 'ZPORFS', INFOT, NOUT, LERR, OK )
238 CALL ZPORFSX( '/', EQ, 0, 0, A, 1, AF, 1, S, B, 1, X, 1,
239 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
240 $ PARAMS, W, R, INFO )
241 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
243 CALL ZPORFSX( 'U', "/", -1, 0, A, 1, AF, 1, S, B, 1, X, 1,
244 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
245 $ PARAMS, W, R, INFO )
246 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
249 CALL ZPORFSX( 'U', EQ, -1, 0, A, 1, AF, 1, S, B, 1, X, 1,
250 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
251 $ PARAMS, W, R, INFO )
252 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
254 CALL ZPORFSX( 'U', EQ, 0, -1, A, 1, AF, 1, S, B, 1, X, 1,
255 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
256 $ PARAMS, W, R, INFO )
257 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
259 CALL ZPORFSX( 'U', EQ, 2, 1, A, 1, AF, 2, S, B, 2, X, 2,
260 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
261 $ PARAMS, W, R, INFO )
262 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
264 CALL ZPORFSX( 'U', EQ, 2, 1, A, 2, AF, 1, S, B, 2, X, 2,
265 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
266 $ PARAMS, W, R, INFO )
267 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
269 CALL ZPORFSX( 'U', EQ, 2, 1, A, 2, AF, 2, S, B, 1, X, 2,
270 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
271 $ PARAMS, W, R, INFO )
272 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
274 CALL ZPORFSX( 'U', EQ, 2, 1, A, 2, AF, 2, S, B, 2, X, 1,
275 $ RCOND, BERR, N_ERR_BNDS, ERR_BNDS_N, ERR_BNDS_C, NPARAMS,
276 $ PARAMS, W, R, INFO )
277 CALL CHKXER( 'ZPORFSX', INFOT, NOUT, LERR, OK )
283 CALL ZPOCON( '/', 0, A, 1, ANRM, RCOND, W, R, INFO )
284 CALL CHKXER( 'ZPOCON', INFOT, NOUT, LERR, OK )
286 CALL ZPOCON( 'U', -1, A, 1, ANRM, RCOND, W, R, INFO )
287 CALL CHKXER( 'ZPOCON', INFOT, NOUT, LERR, OK )
289 CALL ZPOCON( 'U', 2, A, 1, ANRM, RCOND, W, R, INFO )
290 CALL CHKXER( 'ZPOCON', INFOT, NOUT, LERR, OK )
292 CALL ZPOCON( 'U', 1, A, 1, -ANRM, RCOND, W, R, INFO )
293 CALL CHKXER( 'ZPOCON', INFOT, NOUT, LERR, OK )
299 CALL ZPOEQU( -1, A, 1, R1, RCOND, ANRM, INFO )
300 CALL CHKXER( 'ZPOEQU', INFOT, NOUT, LERR, OK )
302 CALL ZPOEQU( 2, A, 1, R1, RCOND, ANRM, INFO )
303 CALL CHKXER( 'ZPOEQU', INFOT, NOUT, LERR, OK )
309 CALL ZPOEQUB( -1, A, 1, R1, RCOND, ANRM, INFO )
310 CALL CHKXER( 'ZPOEQUB', INFOT, NOUT, LERR, OK )
312 CALL ZPOEQUB( 2, A, 1, R1, RCOND, ANRM, INFO )
313 CALL CHKXER( 'ZPOEQUB', INFOT, NOUT, LERR, OK )
315 * Test error exits of the routines that use the Cholesky
316 * decomposition of a Hermitian positive definite packed matrix.
318 ELSE IF( LSAMEN( 2, C2, 'PP' ) ) THEN
324 CALL ZPPTRF( '/', 0, A, INFO )
325 CALL CHKXER( 'ZPPTRF', INFOT, NOUT, LERR, OK )
327 CALL ZPPTRF( 'U', -1, A, INFO )
328 CALL CHKXER( 'ZPPTRF', INFOT, NOUT, LERR, OK )
334 CALL ZPPTRI( '/', 0, A, INFO )
335 CALL CHKXER( 'ZPPTRI', INFOT, NOUT, LERR, OK )
337 CALL ZPPTRI( 'U', -1, A, INFO )
338 CALL CHKXER( 'ZPPTRI', INFOT, NOUT, LERR, OK )
344 CALL ZPPTRS( '/', 0, 0, A, B, 1, INFO )
345 CALL CHKXER( 'ZPPTRS', INFOT, NOUT, LERR, OK )
347 CALL ZPPTRS( 'U', -1, 0, A, B, 1, INFO )
348 CALL CHKXER( 'ZPPTRS', INFOT, NOUT, LERR, OK )
350 CALL ZPPTRS( 'U', 0, -1, A, B, 1, INFO )
351 CALL CHKXER( 'ZPPTRS', INFOT, NOUT, LERR, OK )
353 CALL ZPPTRS( 'U', 2, 1, A, B, 1, INFO )
354 CALL CHKXER( 'ZPPTRS', INFOT, NOUT, LERR, OK )
360 CALL ZPPRFS( '/', 0, 0, A, AF, B, 1, X, 1, R1, R2, W, R, INFO )
361 CALL CHKXER( 'ZPPRFS', INFOT, NOUT, LERR, OK )
363 CALL ZPPRFS( 'U', -1, 0, A, AF, B, 1, X, 1, R1, R2, W, R,
365 CALL CHKXER( 'ZPPRFS', INFOT, NOUT, LERR, OK )
367 CALL ZPPRFS( 'U', 0, -1, A, AF, B, 1, X, 1, R1, R2, W, R,
369 CALL CHKXER( 'ZPPRFS', INFOT, NOUT, LERR, OK )
371 CALL ZPPRFS( 'U', 2, 1, A, AF, B, 1, X, 2, R1, R2, W, R, INFO )
372 CALL CHKXER( 'ZPPRFS', INFOT, NOUT, LERR, OK )
374 CALL ZPPRFS( 'U', 2, 1, A, AF, B, 2, X, 1, R1, R2, W, R, INFO )
375 CALL CHKXER( 'ZPPRFS', INFOT, NOUT, LERR, OK )
381 CALL ZPPCON( '/', 0, A, ANRM, RCOND, W, R, INFO )
382 CALL CHKXER( 'ZPPCON', INFOT, NOUT, LERR, OK )
384 CALL ZPPCON( 'U', -1, A, ANRM, RCOND, W, R, INFO )
385 CALL CHKXER( 'ZPPCON', INFOT, NOUT, LERR, OK )
387 CALL ZPPCON( 'U', 1, A, -ANRM, RCOND, W, R, INFO )
388 CALL CHKXER( 'ZPPCON', INFOT, NOUT, LERR, OK )
394 CALL ZPPEQU( '/', 0, A, R1, RCOND, ANRM, INFO )
395 CALL CHKXER( 'ZPPEQU', INFOT, NOUT, LERR, OK )
397 CALL ZPPEQU( 'U', -1, A, R1, RCOND, ANRM, INFO )
398 CALL CHKXER( 'ZPPEQU', INFOT, NOUT, LERR, OK )
400 * Test error exits of the routines that use the Cholesky
401 * decomposition of a Hermitian positive definite band matrix.
403 ELSE IF( LSAMEN( 2, C2, 'PB' ) ) THEN
409 CALL ZPBTRF( '/', 0, 0, A, 1, INFO )
410 CALL CHKXER( 'ZPBTRF', INFOT, NOUT, LERR, OK )
412 CALL ZPBTRF( 'U', -1, 0, A, 1, INFO )
413 CALL CHKXER( 'ZPBTRF', INFOT, NOUT, LERR, OK )
415 CALL ZPBTRF( 'U', 1, -1, A, 1, INFO )
416 CALL CHKXER( 'ZPBTRF', INFOT, NOUT, LERR, OK )
418 CALL ZPBTRF( 'U', 2, 1, A, 1, INFO )
419 CALL CHKXER( 'ZPBTRF', INFOT, NOUT, LERR, OK )
425 CALL ZPBTF2( '/', 0, 0, A, 1, INFO )
426 CALL CHKXER( 'ZPBTF2', INFOT, NOUT, LERR, OK )
428 CALL ZPBTF2( 'U', -1, 0, A, 1, INFO )
429 CALL CHKXER( 'ZPBTF2', INFOT, NOUT, LERR, OK )
431 CALL ZPBTF2( 'U', 1, -1, A, 1, INFO )
432 CALL CHKXER( 'ZPBTF2', INFOT, NOUT, LERR, OK )
434 CALL ZPBTF2( 'U', 2, 1, A, 1, INFO )
435 CALL CHKXER( 'ZPBTF2', INFOT, NOUT, LERR, OK )
441 CALL ZPBTRS( '/', 0, 0, 0, A, 1, B, 1, INFO )
442 CALL CHKXER( 'ZPBTRS', INFOT, NOUT, LERR, OK )
444 CALL ZPBTRS( 'U', -1, 0, 0, A, 1, B, 1, INFO )
445 CALL CHKXER( 'ZPBTRS', INFOT, NOUT, LERR, OK )
447 CALL ZPBTRS( 'U', 1, -1, 0, A, 1, B, 1, INFO )
448 CALL CHKXER( 'ZPBTRS', INFOT, NOUT, LERR, OK )
450 CALL ZPBTRS( 'U', 0, 0, -1, A, 1, B, 1, INFO )
451 CALL CHKXER( 'ZPBTRS', INFOT, NOUT, LERR, OK )
453 CALL ZPBTRS( 'U', 2, 1, 1, A, 1, B, 1, INFO )
454 CALL CHKXER( 'ZPBTRS', INFOT, NOUT, LERR, OK )
456 CALL ZPBTRS( 'U', 2, 0, 1, A, 1, B, 1, INFO )
457 CALL CHKXER( 'ZPBTRS', INFOT, NOUT, LERR, OK )
463 CALL ZPBRFS( '/', 0, 0, 0, A, 1, AF, 1, B, 1, X, 1, R1, R2, W,
465 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
467 CALL ZPBRFS( 'U', -1, 0, 0, A, 1, AF, 1, B, 1, X, 1, R1, R2, W,
469 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
471 CALL ZPBRFS( 'U', 1, -1, 0, A, 1, AF, 1, B, 1, X, 1, R1, R2, W,
473 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
475 CALL ZPBRFS( 'U', 0, 0, -1, A, 1, AF, 1, B, 1, X, 1, R1, R2, W,
477 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
479 CALL ZPBRFS( 'U', 2, 1, 1, A, 1, AF, 2, B, 2, X, 2, R1, R2, W,
481 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
483 CALL ZPBRFS( 'U', 2, 1, 1, A, 2, AF, 1, B, 2, X, 2, R1, R2, W,
485 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
487 CALL ZPBRFS( 'U', 2, 0, 1, A, 1, AF, 1, B, 1, X, 2, R1, R2, W,
489 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
491 CALL ZPBRFS( 'U', 2, 0, 1, A, 1, AF, 1, B, 2, X, 1, R1, R2, W,
493 CALL CHKXER( 'ZPBRFS', INFOT, NOUT, LERR, OK )
499 CALL ZPBCON( '/', 0, 0, A, 1, ANRM, RCOND, W, R, INFO )
500 CALL CHKXER( 'ZPBCON', INFOT, NOUT, LERR, OK )
502 CALL ZPBCON( 'U', -1, 0, A, 1, ANRM, RCOND, W, R, INFO )
503 CALL CHKXER( 'ZPBCON', INFOT, NOUT, LERR, OK )
505 CALL ZPBCON( 'U', 1, -1, A, 1, ANRM, RCOND, W, R, INFO )
506 CALL CHKXER( 'ZPBCON', INFOT, NOUT, LERR, OK )
508 CALL ZPBCON( 'U', 2, 1, A, 1, ANRM, RCOND, W, R, INFO )
509 CALL CHKXER( 'ZPBCON', INFOT, NOUT, LERR, OK )
511 CALL ZPBCON( 'U', 1, 0, A, 1, -ANRM, RCOND, W, R, INFO )
512 CALL CHKXER( 'ZPBCON', INFOT, NOUT, LERR, OK )
518 CALL ZPBEQU( '/', 0, 0, A, 1, R1, RCOND, ANRM, INFO )
519 CALL CHKXER( 'ZPBEQU', INFOT, NOUT, LERR, OK )
521 CALL ZPBEQU( 'U', -1, 0, A, 1, R1, RCOND, ANRM, INFO )
522 CALL CHKXER( 'ZPBEQU', INFOT, NOUT, LERR, OK )
524 CALL ZPBEQU( 'U', 1, -1, A, 1, R1, RCOND, ANRM, INFO )
525 CALL CHKXER( 'ZPBEQU', INFOT, NOUT, LERR, OK )
527 CALL ZPBEQU( 'U', 2, 1, A, 1, R1, RCOND, ANRM, INFO )
528 CALL CHKXER( 'ZPBEQU', INFOT, NOUT, LERR, OK )
531 * Print a summary line.
533 CALL ALAESM( PATH, OK, NOUT )