138 SUBROUTINE ddrvpt( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
139 $ E, B, X, XACT, WORK, RWORK, NOUT )
147 INTEGER NN, NOUT, NRHS
148 DOUBLE PRECISION THRESH
153 DOUBLE PRECISION A( * ), B( * ), D( * ), E( * ), RWORK( * ),
154 $ work( * ), x( * ), xact( * )
160 DOUBLE PRECISION ONE, ZERO
161 parameter( one = 1.0d+0, zero = 0.0d+0 )
163 parameter( ntypes = 12 )
165 parameter( ntests = 6 )
169 CHARACTER DIST, FACT, TYPE
171 INTEGER I, IA, IFACT, IMAT, IN, INFO, IX, IZERO, J, K,
172 $ k1, kl, ku, lda, mode, n, nerrs, nfail, nimat,
174 DOUBLE PRECISION AINVNM, ANORM, COND, DMAX, RCOND, RCONDC
177 INTEGER ISEED( 4 ), ISEEDY( 4 )
178 DOUBLE PRECISION RESULT( NTESTS ), Z( 3 )
182 DOUBLE PRECISION DASUM, DGET06, DLANST
183 EXTERNAL idamax, dasum, dget06, dlanst
200 COMMON / infoc / infot, nunit, ok, lerr
201 COMMON / srnamc / srnamt
204 DATA iseedy / 0, 0, 0, 1 /
208 path( 1: 1 ) =
'Double precision'
214 iseed( i ) = iseedy( i )
220 $
CALL derrvx( path, nout )
233 DO 110 imat = 1, nimat
237 IF( n.GT.0 .AND. .NOT.dotype( imat ) )
242 CALL dlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
245 zerot = imat.GE.8 .AND. imat.LE.10
252 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode, cond,
253 $ anorm, kl, ku,
'B', a, 2, work, info )
258 CALL alaerh( path,
'DLATMS', info, 0,
' ', n, n, kl,
259 $ ku, -1, imat, nfail, nerrs, nout )
279 IF( .NOT.zerot .OR. .NOT.dotype( 7 ) )
THEN
283 CALL dlarnv( 2, iseed, n, d )
284 CALL dlarnv( 2, iseed, n-1, e )
289 d( 1 ) = abs( d( 1 ) )
291 d( 1 ) = abs( d( 1 ) ) + abs( e( 1 ) )
292 d( n ) = abs( d( n ) ) + abs( e( n-1 ) )
294 d( i ) = abs( d( i ) ) + abs( e( i ) ) +
301 ix = idamax( n, d, 1 )
303 CALL dscal( n, anorm / dmax, d, 1 )
305 $
CALL dscal( n-1, anorm / dmax, e, 1 )
307 ELSE IF( izero.GT.0 )
THEN
312 IF( izero.EQ.1 )
THEN
316 ELSE IF( izero.EQ.n )
THEN
320 e( izero-1 ) = z( 1 )
338 ELSE IF( imat.EQ.9 )
THEN
346 ELSE IF( imat.EQ.10 )
THEN
348 IF( izero.GT.1 )
THEN
349 z( 1 ) = e( izero-1 )
363 CALL dlarnv( 2, iseed, n, xact( ix ) )
369 CALL dlaptm( n, nrhs, one, d, e, xact, lda, zero, b, lda )
372 IF( ifact.EQ.1 )
THEN
386 ELSE IF( ifact.EQ.1 )
THEN
390 anorm = dlanst(
'1', n, d, e )
392 CALL dcopy( n, d, 1, d( n+1 ), 1 )
394 $
CALL dcopy( n-1, e, 1, e( n+1 ), 1 )
398 CALL dpttrf( n, d( n+1 ), e( n+1 ), info )
409 CALL dpttrs( n, 1, d( n+1 ), e( n+1 ), x, lda,
411 ainvnm = max( ainvnm, dasum( n, x, 1 ) )
416 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
419 rcondc = ( one / anorm ) / ainvnm
423 IF( ifact.EQ.2 )
THEN
427 CALL dcopy( n, d, 1, d( n+1 ), 1 )
429 $
CALL dcopy( n-1, e, 1, e( n+1 ), 1 )
430 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
435 CALL dptsv( n, nrhs, d( n+1 ), e( n+1 ), x, lda,
441 $
CALL alaerh( path,
'DPTSV ', info, izero,
' ', n,
442 $ n, 1, 1, nrhs, imat, nfail, nerrs,
445 IF( izero.EQ.0 )
THEN
450 CALL dptt01( n, d, e, d( n+1 ), e( n+1 ), work,
455 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
456 CALL dptt02( n, nrhs, d, e, x, lda, work, lda,
461 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
470 IF( result( k ).GE.thresh )
THEN
471 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
472 $
CALL aladhd( nout, path )
473 WRITE( nout, fmt = 9999 )
'DPTSV ', n, imat, k,
483 IF( ifact.GT.1 )
THEN
495 CALL dlaset(
'Full', n, nrhs, zero, zero, x, lda )
501 CALL dptsvx( fact, n, nrhs, d, e, d( n+1 ), e( n+1 ), b,
502 $ lda, x, lda, rcond, rwork, rwork( nrhs+1 ),
508 $
CALL alaerh( path,
'DPTSVX', info, izero, fact, n, n,
509 $ 1, 1, nrhs, imat, nfail, nerrs, nout )
510 IF( izero.EQ.0 )
THEN
511 IF( ifact.EQ.2 )
THEN
517 CALL dptt01( n, d, e, d( n+1 ), e( n+1 ), work,
525 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
526 CALL dptt02( n, nrhs, d, e, x, lda, work, lda,
531 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
536 CALL dptt05( n, nrhs, d, e, b, lda, x, lda, xact, lda,
537 $ rwork, rwork( nrhs+1 ), result( 4 ) )
544 result( 6 ) = dget06( rcond, rcondc )
550 IF( result( k ).GE.thresh )
THEN
551 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
552 $
CALL aladhd( nout, path )
553 WRITE( nout, fmt = 9998 )
'DPTSVX', fact, n, imat,
565 CALL alasvm( path, nout, nfail, nrun, nerrs )
567 9999
FORMAT( 1x, a,
', N =', i5,
', type ', i2,
', test ', i2,
568 $
', ratio = ', g12.5 )
569 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', N =', i5,
', type ', i2,
570 $
', test ', i2,
', ratio = ', g12.5 )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine ddrvpt(dotype, nn, nval, nrhs, thresh, tsterr, a, d, e, b, x, xact, work, rwork, nout)
DDRVPT
subroutine derrvx(path, nunit)
DERRVX
subroutine dget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
DGET04
subroutine dlaptm(n, nrhs, alpha, d, e, x, ldx, beta, b, ldb)
DLAPTM
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 dptt01(n, d, e, df, ef, work, resid)
DPTT01
subroutine dptt02(n, nrhs, d, e, x, ldx, b, ldb, resid)
DPTT02
subroutine dptt05(n, nrhs, d, e, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DPTT05
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 dlarnv(idist, iseed, n, x)
DLARNV returns a vector of random numbers from a uniform or normal distribution.
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 dptsv(n, nrhs, d, e, b, ldb, info)
DPTSV computes the solution to system of linear equations A * X = B for PT matrices
subroutine dptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, info)
DPTSVX computes the solution to system of linear equations A * X = B for PT matrices
subroutine dpttrf(n, d, e, info)
DPTTRF
subroutine dpttrs(n, nrhs, d, e, b, ldb, info)
DPTTRS
subroutine dscal(n, da, dx, incx)
DSCAL