144 SUBROUTINE dchkpt( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
145 $ A, D, E, B, X, XACT, WORK, RWORK, NOUT )
153 INTEGER NN, NNS, NOUT
154 DOUBLE PRECISION THRESH
158 INTEGER NSVAL( * ), NVAL( * )
159 DOUBLE PRECISION A( * ), B( * ), D( * ), E( * ), RWORK( * ),
160 $ work( * ), x( * ), xact( * )
166 DOUBLE PRECISION ONE, ZERO
167 parameter( one = 1.0d+0, zero = 0.0d+0 )
169 parameter( ntypes = 12 )
171 parameter( ntests = 7 )
177 INTEGER I, IA, IMAT, IN, INFO, IRHS, IX, IZERO, J, K,
178 $ kl, ku, lda, mode, n, nerrs, nfail, nimat,
180 DOUBLE PRECISION AINVNM, ANORM, COND, DMAX, RCOND, RCONDC
183 INTEGER ISEED( 4 ), ISEEDY( 4 )
184 DOUBLE PRECISION RESULT( NTESTS ), Z( 3 )
188 DOUBLE PRECISION DASUM, DGET06, DLANST
189 EXTERNAL idamax, dasum, dget06, dlanst
206 COMMON / infoc / infot, nunit, ok, lerr
207 COMMON / srnamc / srnamt
210 DATA iseedy / 0, 0, 0, 1 /
214 path( 1: 1 ) =
'Double precision'
220 iseed( i ) = iseedy( i )
226 $
CALL derrgt( path, nout )
239 DO 100 imat = 1, nimat
243 IF( n.GT.0 .AND. .NOT.dotype( imat ) )
248 CALL dlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
251 zerot = imat.GE.8 .AND. imat.LE.10
258 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode, cond,
259 $ anorm, kl, ku,
'B', a, 2, work, info )
264 CALL alaerh( path,
'DLATMS', info, 0,
' ', n, n, kl,
265 $ ku, -1, imat, nfail, nerrs, nout )
285 IF( .NOT.zerot .OR. .NOT.dotype( 7 ) )
THEN
289 CALL dlarnv( 2, iseed, n, d )
290 CALL dlarnv( 2, iseed, n-1, e )
295 d( 1 ) = abs( d( 1 ) )
297 d( 1 ) = abs( d( 1 ) ) + abs( e( 1 ) )
298 d( n ) = abs( d( n ) ) + abs( e( n-1 ) )
300 d( i ) = abs( d( i ) ) + abs( e( i ) ) +
307 ix = idamax( n, d, 1 )
309 CALL dscal( n, anorm / dmax, d, 1 )
310 CALL dscal( n-1, anorm / dmax, e, 1 )
312 ELSE IF( izero.GT.0 )
THEN
317 IF( izero.EQ.1 )
THEN
321 ELSE IF( izero.EQ.n )
THEN
325 e( izero-1 ) = z( 1 )
343 ELSE IF( imat.EQ.9 )
THEN
351 ELSE IF( imat.EQ.10 )
THEN
353 IF( izero.GT.1 )
THEN
354 z( 1 ) = e( izero-1 )
364 CALL dcopy( n, d, 1, d( n+1 ), 1 )
366 $
CALL dcopy( n-1, e, 1, e( n+1 ), 1 )
372 CALL dpttrf( n, d( n+1 ), e( n+1 ), info )
376 IF( info.NE.izero )
THEN
377 CALL alaerh( path,
'DPTTRF', info, izero,
' ', n, n, -1,
378 $ -1, -1, imat, nfail, nerrs, nout )
387 CALL dptt01( n, d, e, d( n+1 ), e( n+1 ), work,
392 IF( result( 1 ).GE.thresh )
THEN
393 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
394 $
CALL alahd( nout, path )
395 WRITE( nout, fmt = 9999 )n, imat, 1, result( 1 )
404 anorm = dlanst(
'1', n, d, e )
415 CALL dpttrs( n, 1, d( n+1 ), e( n+1 ), x, lda, info )
416 ainvnm = max( ainvnm, dasum( n, x, 1 ) )
418 rcondc = one / max( one, anorm*ainvnm )
427 CALL dlarnv( 2, iseed, n, xact( ix ) )
433 CALL dlaptm( n, nrhs, one, d, e, xact, lda, zero, b,
439 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
440 CALL dpttrs( n, nrhs, d( n+1 ), e( n+1 ), x, lda, info )
445 $
CALL alaerh( path,
'DPTTRS', info, 0,
' ', n, n, -1,
446 $ -1, nrhs, imat, nfail, nerrs, nout )
448 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
449 CALL dptt02( n, nrhs, d, e, x, lda, work, lda,
455 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
462 CALL dptrfs( n, nrhs, d, e, d( n+1 ), e( n+1 ), b, lda,
463 $ x, lda, rwork, rwork( nrhs+1 ), work, info )
468 $
CALL alaerh( path,
'DPTRFS', info, 0,
' ', n, n, -1,
469 $ -1, nrhs, imat, nfail, nerrs, nout )
471 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
473 CALL dptt05( n, nrhs, d, e, b, lda, x, lda, xact, lda,
474 $ rwork, rwork( nrhs+1 ), result( 5 ) )
480 IF( result( k ).GE.thresh )
THEN
481 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
482 $
CALL alahd( nout, path )
483 WRITE( nout, fmt = 9998 )n, nrhs, imat, k,
497 CALL dptcon( n, d( n+1 ), e( n+1 ), anorm, rcond, rwork,
503 $
CALL alaerh( path,
'DPTCON', info, 0,
' ', n, n, -1, -1,
504 $ -1, imat, nfail, nerrs, nout )
506 result( 7 ) = dget06( rcond, rcondc )
510 IF( result( 7 ).GE.thresh )
THEN
511 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
512 $
CALL alahd( nout, path )
513 WRITE( nout, fmt = 9999 )n, imat, 7, result( 7 )
522 CALL alasum( path, nout, nfail, nrun, nerrs )
524 9999
FORMAT(
' N =', i5,
', type ', i2,
', test ', i2,
', ratio = ',
526 9998
FORMAT(
' N =', i5,
', NRHS=', i3,
', type ', i2,
', test(', i2,
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine dchkpt(dotype, nn, nval, nns, nsval, thresh, tsterr, a, d, e, b, x, xact, work, rwork, nout)
DCHKPT
subroutine derrgt(path, nunit)
DERRGT
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 dptcon(n, d, e, anorm, rcond, work, info)
DPTCON
subroutine dptrfs(n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, info)
DPTRFS
subroutine dpttrf(n, d, e, info)
DPTTRF
subroutine dpttrs(n, nrhs, d, e, b, ldb, info)
DPTTRS
subroutine dscal(n, da, dx, incx)
DSCAL