161 SUBROUTINE ddrvpb( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
162 $ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
163 $ RWORK, IWORK, NOUT )
171 INTEGER NMAX, NN, NOUT, NRHS
172 DOUBLE PRECISION THRESH
176 INTEGER IWORK( * ), NVAL( * )
177 DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
178 $ bsav( * ), rwork( * ), s( * ), work( * ),
185 DOUBLE PRECISION ONE, ZERO
186 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
187 INTEGER NTYPES, NTESTS
188 parameter( ntypes = 8, ntests = 6 )
193 LOGICAL EQUIL, NOFACT, PREFAC, ZEROT
194 CHARACTER DIST, EQUED, FACT, PACKIT,
TYPE, UPLO, XTYPE
196 INTEGER I, I1, I2, IEQUED, IFACT, IKD, IMAT, IN, INFO,
197 $ ioff, iuplo, iw, izero, k, k1, kd, kl, koff,
198 $ ku, lda, ldab, mode, n, nb, nbmin, nerrs,
199 $ nfact, nfail, nimat, nkd, nrun, nt
200 DOUBLE PRECISION AINVNM, AMAX, ANORM, CNDNUM, RCOND, RCONDC,
204 CHARACTER EQUEDS( 2 ), FACTS( 3 )
205 INTEGER ISEED( 4 ), ISEEDY( 4 ), KDVAL( NBW )
206 DOUBLE PRECISION RESULT( NTESTS )
210 DOUBLE PRECISION DGET06, DLANGE, DLANSB
211 EXTERNAL lsame, dget06, dlange, dlansb
228 COMMON / infoc / infot, nunit, ok, lerr
229 COMMON / srnamc / srnamt
232 DATA iseedy / 1988, 1989, 1990, 1991 /
233 DATA facts /
'F',
'N',
'E' /
234 DATA equeds /
'N',
'Y' /
240 path( 1: 1 ) =
'Double precision'
246 iseed( i ) = iseedy( i )
252 $
CALL derrvx( path, nout )
272 nkd = max( 1, min( n, 4 ) )
277 kdval( 2 ) = n + ( n+1 ) / 4
278 kdval( 3 ) = ( 3*n-1 ) / 4
279 kdval( 4 ) = ( n+1 ) / 4
294 IF( iuplo.EQ.1 )
THEN
297 koff = max( 1, kd+2-n )
303 DO 80 imat = 1, nimat
307 IF( .NOT.dotype( imat ) )
312 zerot = imat.GE.2 .AND. imat.LE.4
313 IF( zerot .AND. n.LT.imat-1 )
316 IF( .NOT.zerot .OR. .NOT.dotype( 1 ) )
THEN
321 CALL dlatb4( path, imat, n, n,
TYPE, kl, ku, anorm,
322 $ mode, cndnum, dist )
325 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
326 $ cndnum, anorm, kd, kd, packit,
327 $ a( koff ), ldab, work, info )
332 CALL alaerh( path,
'DLATMS', info, 0, uplo, n,
333 $ n, -1, -1, -1, imat, nfail, nerrs,
337 ELSE IF( izero.GT.0 )
THEN
343 IF( iuplo.EQ.1 )
THEN
344 ioff = ( izero-1 )*ldab + kd + 1
345 CALL dcopy( izero-i1, work( iw ), 1,
346 $ a( ioff-izero+i1 ), 1 )
348 CALL dcopy( i2-izero+1, work( iw ), 1,
349 $ a( ioff ), max( ldab-1, 1 ) )
351 ioff = ( i1-1 )*ldab + 1
352 CALL dcopy( izero-i1, work( iw ), 1,
353 $ a( ioff+izero-i1 ),
355 ioff = ( izero-1 )*ldab + 1
357 CALL dcopy( i2-izero+1, work( iw ), 1,
369 ELSE IF( imat.EQ.3 )
THEN
378 DO 20 i = 1, min( 2*kd+1, n )
382 i1 = max( izero-kd, 1 )
383 i2 = min( izero+kd, n )
385 IF( iuplo.EQ.1 )
THEN
386 ioff = ( izero-1 )*ldab + kd + 1
387 CALL dswap( izero-i1, a( ioff-izero+i1 ), 1,
390 CALL dswap( i2-izero+1, a( ioff ),
391 $ max( ldab-1, 1 ), work( iw ), 1 )
393 ioff = ( i1-1 )*ldab + 1
394 CALL dswap( izero-i1, a( ioff+izero-i1 ),
395 $ max( ldab-1, 1 ), work( iw ), 1 )
396 ioff = ( izero-1 )*ldab + 1
398 CALL dswap( i2-izero+1, a( ioff ), 1,
405 CALL dlacpy(
'Full', kd+1, n, a, ldab, asav, ldab )
408 equed = equeds( iequed )
409 IF( iequed.EQ.1 )
THEN
415 DO 60 ifact = 1, nfact
416 fact = facts( ifact )
417 prefac = lsame( fact,
'F' )
418 nofact = lsame( fact,
'N' )
419 equil = lsame( fact,
'E' )
426 ELSE IF( .NOT.lsame( fact,
'N' ) )
THEN
433 CALL dlacpy(
'Full', kd+1, n, asav, ldab,
435 IF( equil .OR. iequed.GT.1 )
THEN
440 CALL dpbequ( uplo, n, kd, afac, ldab, s,
441 $ scond, amax, info )
442 IF( info.EQ.0 .AND. n.GT.0 )
THEN
448 CALL dlaqsb( uplo, n, kd, afac, ldab,
449 $ s, scond, amax, equed )
461 anorm = dlansb(
'1', uplo, n, kd, afac, ldab,
466 CALL dpbtrf( uplo, n, kd, afac, ldab, info )
470 CALL dlaset(
'Full', n, n, zero, one, a,
473 CALL dpbtrs( uplo, n, kd, n, afac, ldab, a,
478 ainvnm = dlange(
'1', n, n, a, lda, rwork )
479 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
482 rcondc = ( one / anorm ) / ainvnm
488 CALL dlacpy(
'Full', kd+1, n, asav, ldab, a,
495 CALL dlarhs( path, xtype, uplo,
' ', n, n, kd,
496 $ kd, nrhs, a, ldab, xact, lda, b,
499 CALL dlacpy(
'Full', n, nrhs, b, lda, bsav,
509 CALL dlacpy(
'Full', kd+1, n, a, ldab, afac,
511 CALL dlacpy(
'Full', n, nrhs, b, lda, x,
515 CALL dpbsv( uplo, n, kd, nrhs, afac, ldab, x,
520 IF( info.NE.izero )
THEN
521 CALL alaerh( path,
'DPBSV ', info, izero,
522 $ uplo, n, n, kd, kd, nrhs,
523 $ imat, nfail, nerrs, nout )
525 ELSE IF( info.NE.0 )
THEN
532 CALL dpbt01( uplo, n, kd, a, ldab, afac,
533 $ ldab, rwork, result( 1 ) )
537 CALL dlacpy(
'Full', n, nrhs, b, lda, work,
539 CALL dpbt02( uplo, n, kd, nrhs, a, ldab, x,
540 $ lda, work, lda, rwork,
545 CALL dget04( n, nrhs, x, lda, xact, lda,
546 $ rcondc, result( 3 ) )
553 IF( result( k ).GE.thresh )
THEN
554 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
555 $
CALL aladhd( nout, path )
556 WRITE( nout, fmt = 9999 )
'DPBSV ',
557 $ uplo, n, kd, imat, k, result( k )
568 $
CALL dlaset(
'Full', kd+1, n, zero, zero,
570 CALL dlaset(
'Full', n, nrhs, zero, zero, x,
572 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
577 CALL dlaqsb( uplo, n, kd, a, ldab, s, scond,
585 CALL dpbsvx( fact, uplo, n, kd, nrhs, a, ldab,
586 $ afac, ldab, equed, s, b, lda, x,
587 $ lda, rcond, rwork, rwork( nrhs+1 ),
588 $ work, iwork, info )
592 IF( info.NE.izero )
THEN
593 CALL alaerh( path,
'DPBSVX', info, izero,
594 $ fact // uplo, n, n, kd, kd,
595 $ nrhs, imat, nfail, nerrs, nout )
600 IF( .NOT.prefac )
THEN
605 CALL dpbt01( uplo, n, kd, a, ldab, afac,
606 $ ldab, rwork( 2*nrhs+1 ),
615 CALL dlacpy(
'Full', n, nrhs, bsav, lda,
617 CALL dpbt02( uplo, n, kd, nrhs, asav, ldab,
619 $ rwork( 2*nrhs+1 ), result( 2 ) )
623 IF( nofact .OR. ( prefac .AND. lsame( equed,
625 CALL dget04( n, nrhs, x, lda, xact, lda,
626 $ rcondc, result( 3 ) )
628 CALL dget04( n, nrhs, x, lda, xact, lda,
629 $ roldc, result( 3 ) )
635 CALL dpbt05( uplo, n, kd, nrhs, asav, ldab,
636 $ b, lda, x, lda, xact, lda,
637 $ rwork, rwork( nrhs+1 ),
646 result( 6 ) = dget06( rcond, rcondc )
652 IF( result( k ).GE.thresh )
THEN
653 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
654 $
CALL aladhd( nout, path )
656 WRITE( nout, fmt = 9997 )
'DPBSVX',
657 $ fact, uplo, n, kd, equed, imat, k,
660 WRITE( nout, fmt = 9998 )
'DPBSVX',
661 $ fact, uplo, n, kd, imat, k,
677 CALL alasvm( path, nout, nfail, nrun, nerrs )
679 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', KD =', i5,
680 $
', type ', i1,
', test(', i1,
')=', g12.5 )
681 9998
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ', i5,
', ', i5,
682 $
', ... ), type ', i1,
', test(', i1,
')=', g12.5 )
683 9997
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ', i5,
', ', i5,
684 $
', ... ), EQUED=''', a1,
''', type ', i1,
', test(', i1,
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine dlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
DLARHS
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine ddrvpb(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, asav, b, bsav, x, xact, s, work, rwork, iwork, nout)
DDRVPB
subroutine derrvx(path, nunit)
DERRVX
subroutine dget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
DGET04
subroutine dlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
DLATB4
subroutine dlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
DLATMS
subroutine dpbt01(uplo, n, kd, a, lda, afac, ldafac, rwork, resid)
DPBT01
subroutine dpbt02(uplo, n, kd, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
DPBT02
subroutine dpbt05(uplo, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DPBT05
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
DLAQSB scales a symmetric/Hermitian band matrix, using scaling factors computed by spbequ.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
DPBEQU
subroutine dpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
DPBSV computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine dpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
DPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine dpbtrf(uplo, n, kd, ab, ldab, info)
DPBTRF
subroutine dpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
DPBTRS
subroutine dswap(n, dx, incx, dy, incy)
DSWAP