156 SUBROUTINE zdrvpb( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
157 $ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
166 INTEGER NMAX, NN, NOUT, NRHS
167 DOUBLE PRECISION THRESH
172 DOUBLE PRECISION RWORK( * ), S( * )
173 COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
174 $ bsav( * ), work( * ), x( * ), xact( * )
180 DOUBLE PRECISION ONE, ZERO
181 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
182 INTEGER NTYPES, NTESTS
183 parameter( ntypes = 8, ntests = 6 )
188 LOGICAL EQUIL, NOFACT, PREFAC, ZEROT
189 CHARACTER DIST, EQUED, FACT, PACKIT,
TYPE, UPLO, XTYPE
191 INTEGER I, I1, I2, IEQUED, IFACT, IKD, IMAT, IN, INFO,
192 $ ioff, iuplo, iw, izero, k, k1, kd, kl, koff,
193 $ ku, lda, ldab, mode, n, nb, nbmin, nerrs,
194 $ nfact, nfail, nimat, nkd, nrun, nt
195 DOUBLE PRECISION AINVNM, AMAX, ANORM, CNDNUM, RCOND, RCONDC,
199 CHARACTER EQUEDS( 2 ), FACTS( 3 )
200 INTEGER ISEED( 4 ), ISEEDY( 4 ), KDVAL( NBW )
201 DOUBLE PRECISION RESULT( NTESTS )
205 DOUBLE PRECISION DGET06, ZLANGE, ZLANHB
206 EXTERNAL lsame, dget06, zlange, zlanhb
215 INTRINSIC dcmplx, max, min
223 COMMON / infoc / infot, nunit, ok, lerr
224 COMMON / srnamc / srnamt
227 DATA iseedy / 1988, 1989, 1990, 1991 /
228 DATA facts /
'F',
'N',
'E' / , equeds /
'N',
'Y' /
234 path( 1: 1 ) =
'Zomplex precision'
240 iseed( i ) = iseedy( i )
246 $
CALL zerrvx( path, nout )
266 nkd = max( 1, min( n, 4 ) )
271 kdval( 2 ) = n + ( n+1 ) / 4
272 kdval( 3 ) = ( 3*n-1 ) / 4
273 kdval( 4 ) = ( n+1 ) / 4
288 IF( iuplo.EQ.1 )
THEN
291 koff = max( 1, kd+2-n )
297 DO 80 imat = 1, nimat
301 IF( .NOT.dotype( imat ) )
306 zerot = imat.GE.2 .AND. imat.LE.4
307 IF( zerot .AND. n.LT.imat-1 )
310 IF( .NOT.zerot .OR. .NOT.dotype( 1 ) )
THEN
315 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm,
316 $ mode, cndnum, dist )
319 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
320 $ cndnum, anorm, kd, kd, packit,
321 $ a( koff ), ldab, work, info )
326 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n,
327 $ n, -1, -1, -1, imat, nfail, nerrs,
331 ELSE IF( izero.GT.0 )
THEN
337 IF( iuplo.EQ.1 )
THEN
338 ioff = ( izero-1 )*ldab + kd + 1
339 CALL zcopy( izero-i1, work( iw ), 1,
340 $ a( ioff-izero+i1 ), 1 )
342 CALL zcopy( i2-izero+1, work( iw ), 1,
343 $ a( ioff ), max( ldab-1, 1 ) )
345 ioff = ( i1-1 )*ldab + 1
346 CALL zcopy( izero-i1, work( iw ), 1,
347 $ a( ioff+izero-i1 ),
349 ioff = ( izero-1 )*ldab + 1
351 CALL zcopy( i2-izero+1, work( iw ), 1,
363 ELSE IF( imat.EQ.3 )
THEN
372 DO 20 i = 1, min( 2*kd+1, n )
376 i1 = max( izero-kd, 1 )
377 i2 = min( izero+kd, n )
379 IF( iuplo.EQ.1 )
THEN
380 ioff = ( izero-1 )*ldab + kd + 1
381 CALL zswap( izero-i1, a( ioff-izero+i1 ), 1,
384 CALL zswap( i2-izero+1, a( ioff ),
385 $ max( ldab-1, 1 ), work( iw ), 1 )
387 ioff = ( i1-1 )*ldab + 1
388 CALL zswap( izero-i1, a( ioff+izero-i1 ),
389 $ max( ldab-1, 1 ), work( iw ), 1 )
390 ioff = ( izero-1 )*ldab + 1
392 CALL zswap( i2-izero+1, a( ioff ), 1,
399 IF( iuplo.EQ.1 )
THEN
400 CALL zlaipd( n, a( kd+1 ), ldab, 0 )
402 CALL zlaipd( n, a( 1 ), ldab, 0 )
407 CALL zlacpy(
'Full', kd+1, n, a, ldab, asav, ldab )
410 equed = equeds( iequed )
411 IF( iequed.EQ.1 )
THEN
417 DO 60 ifact = 1, nfact
418 fact = facts( ifact )
419 prefac = lsame( fact,
'F' )
420 nofact = lsame( fact,
'N' )
421 equil = lsame( fact,
'E' )
428 ELSE IF( .NOT.lsame( fact,
'N' ) )
THEN
435 CALL zlacpy(
'Full', kd+1, n, asav, ldab,
437 IF( equil .OR. iequed.GT.1 )
THEN
442 CALL zpbequ( uplo, n, kd, afac, ldab, s,
443 $ scond, amax, info )
444 IF( info.EQ.0 .AND. n.GT.0 )
THEN
450 CALL zlaqhb( uplo, n, kd, afac, ldab,
451 $ s, scond, amax, equed )
463 anorm = zlanhb(
'1', uplo, n, kd, afac, ldab,
468 CALL zpbtrf( uplo, n, kd, afac, ldab, info )
472 CALL zlaset(
'Full', n, n, dcmplx( zero ),
473 $ dcmplx( one ), a, lda )
475 CALL zpbtrs( uplo, n, kd, n, afac, ldab, a,
480 ainvnm = zlange(
'1', n, n, a, lda, rwork )
481 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
484 rcondc = ( one / anorm ) / ainvnm
490 CALL zlacpy(
'Full', kd+1, n, asav, ldab, a,
497 CALL zlarhs( path, xtype, uplo,
' ', n, n, kd,
498 $ kd, nrhs, a, ldab, xact, lda, b,
501 CALL zlacpy(
'Full', n, nrhs, b, lda, bsav,
511 CALL zlacpy(
'Full', kd+1, n, a, ldab, afac,
513 CALL zlacpy(
'Full', n, nrhs, b, lda, x,
517 CALL zpbsv( uplo, n, kd, nrhs, afac, ldab, x,
522 IF( info.NE.izero )
THEN
523 CALL alaerh( path,
'ZPBSV ', info, izero,
524 $ uplo, n, n, kd, kd, nrhs,
525 $ imat, nfail, nerrs, nout )
527 ELSE IF( info.NE.0 )
THEN
534 CALL zpbt01( uplo, n, kd, a, ldab, afac,
535 $ ldab, rwork, result( 1 ) )
539 CALL zlacpy(
'Full', n, nrhs, b, lda, work,
541 CALL zpbt02( uplo, n, kd, nrhs, a, ldab, x,
542 $ lda, work, lda, rwork,
547 CALL zget04( n, nrhs, x, lda, xact, lda,
548 $ rcondc, result( 3 ) )
555 IF( result( k ).GE.thresh )
THEN
556 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
557 $
CALL aladhd( nout, path )
558 WRITE( nout, fmt = 9999 )
'ZPBSV ',
559 $ uplo, n, kd, imat, k, result( k )
570 $
CALL zlaset(
'Full', kd+1, n, dcmplx( zero ),
571 $ dcmplx( zero ), afac, ldab )
572 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
573 $ dcmplx( zero ), x, lda )
574 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
579 CALL zlaqhb( uplo, n, kd, a, ldab, s, scond,
587 CALL zpbsvx( fact, uplo, n, kd, nrhs, a, ldab,
588 $ afac, ldab, equed, s, b, lda, x,
589 $ lda, rcond, rwork, rwork( nrhs+1 ),
590 $ work, rwork( 2*nrhs+1 ), info )
594 IF( info.NE.izero )
THEN
595 CALL alaerh( path,
'ZPBSVX', info, izero,
596 $ fact // uplo, n, n, kd, kd,
597 $ nrhs, imat, nfail, nerrs, nout )
602 IF( .NOT.prefac )
THEN
607 CALL zpbt01( uplo, n, kd, a, ldab, afac,
608 $ ldab, rwork( 2*nrhs+1 ),
617 CALL zlacpy(
'Full', n, nrhs, bsav, lda,
619 CALL zpbt02( uplo, n, kd, nrhs, asav, ldab,
621 $ rwork( 2*nrhs+1 ), result( 2 ) )
625 IF( nofact .OR. ( prefac .AND. lsame( equed,
627 CALL zget04( n, nrhs, x, lda, xact, lda,
628 $ rcondc, result( 3 ) )
630 CALL zget04( n, nrhs, x, lda, xact, lda,
631 $ roldc, result( 3 ) )
637 CALL zpbt05( uplo, n, kd, nrhs, asav, ldab,
638 $ b, lda, x, lda, xact, lda,
639 $ rwork, rwork( nrhs+1 ),
648 result( 6 ) = dget06( rcond, rcondc )
654 IF( result( k ).GE.thresh )
THEN
655 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
656 $
CALL aladhd( nout, path )
658 WRITE( nout, fmt = 9997 )
'ZPBSVX',
659 $ fact, uplo, n, kd, equed, imat, k,
662 WRITE( nout, fmt = 9998 )
'ZPBSVX',
663 $ fact, uplo, n, kd, imat, k,
679 CALL alasvm( path, nout, nfail, nrun, nerrs )
681 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', KD =', i5,
682 $
', type ', i1,
', test(', i1,
')=', g12.5 )
683 9998
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ', i5,
', ', i5,
684 $
', ... ), type ', i1,
', test(', i1,
')=', g12.5 )
685 9997
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ', i5,
', ', i5,
686 $
', ... ), EQUED=''', a1,
''', type ', i1,
', test(', i1,
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlaqhb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
ZLAQHB scales a Hermitian band matrix, using scaling factors computed by cpbequ.
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
ZPBEQU
subroutine zpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
ZPBSV computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine zpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
ZPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine zpbtrf(uplo, n, kd, ab, ldab, info)
ZPBTRF
subroutine zpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
ZPBTRS
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine zdrvpb(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, asav, b, bsav, x, xact, s, work, rwork, nout)
ZDRVPB
subroutine zerrvx(path, nunit)
ZERRVX
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
subroutine zlaipd(n, a, inda, vinda)
ZLAIPD
subroutine zlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
ZLATB4
subroutine zlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
ZLATMS
subroutine zpbt01(uplo, n, kd, a, lda, afac, ldafac, rwork, resid)
ZPBT01
subroutine zpbt02(uplo, n, kd, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZPBT02
subroutine zpbt05(uplo, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPBT05