153 SUBROUTINE ddrvsp( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
154 $ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
163 INTEGER NMAX, NN, NOUT, NRHS
164 DOUBLE PRECISION THRESH
168 INTEGER IWORK( * ), NVAL( * )
169 DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
170 $ rwork( * ), work( * ), x( * ), xact( * )
176 DOUBLE PRECISION ONE, ZERO
177 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
178 INTEGER NTYPES, NTESTS
179 parameter( ntypes = 10, ntests = 6 )
181 parameter( nfact = 2 )
185 CHARACTER DIST, FACT, PACKIT,
TYPE, UPLO, XTYPE
187 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
188 $ izero, j, k, k1, kl, ku, lda, lwork, mode, n,
189 $ nerrs, nfail, nimat, npp, nrun, nt
190 DOUBLE PRECISION AINVNM, ANORM, CNDNUM, RCOND, RCONDC
193 CHARACTER FACTS( NFACT )
194 INTEGER ISEED( 4 ), ISEEDY( 4 )
195 DOUBLE PRECISION RESULT( NTESTS )
198 DOUBLE PRECISION DGET06, DLANSP
199 EXTERNAL DGET06, DLANSP
212 COMMON / infoc / infot, nunit, ok, lerr
213 COMMON / srnamc / srnamt
219 DATA iseedy / 1988, 1989, 1990, 1991 /
220 DATA facts /
'F',
'N' /
226 path( 1: 1 ) =
'Double precision'
232 iseed( i ) = iseedy( i )
234 lwork = max( 2*nmax, nmax*nrhs )
239 $
CALL derrvx( path, nout )
253 DO 170 imat = 1, nimat
257 IF( .NOT.dotype( imat ) )
262 zerot = imat.GE.3 .AND. imat.LE.6
263 IF( zerot .AND. n.LT.imat-2 )
269 IF( iuplo.EQ.1 )
THEN
280 CALL dlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
284 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
285 $ cndnum, anorm, kl, ku, packit, a, lda, work,
291 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
292 $ -1, -1, imat, nfail, nerrs, nout )
302 ELSE IF( imat.EQ.4 )
THEN
312 IF( iuplo.EQ.1 )
THEN
313 ioff = ( izero-1 )*izero / 2
314 DO 20 i = 1, izero - 1
324 DO 40 i = 1, izero - 1
335 IF( iuplo.EQ.1 )
THEN
363 DO 150 ifact = 1, nfact
367 fact = facts( ifact )
377 ELSE IF( ifact.EQ.1 )
THEN
381 anorm = dlansp(
'1', uplo, n, a, rwork )
385 CALL dcopy( npp, a, 1, afac, 1 )
386 CALL dsptrf( uplo, n, afac, iwork, info )
390 CALL dcopy( npp, afac, 1, ainv, 1 )
391 CALL dsptri( uplo, n, ainv, iwork, work, info )
392 ainvnm = dlansp(
'1', uplo, n, ainv, rwork )
396 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
399 rcondc = ( one / anorm ) / ainvnm
406 CALL dlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
407 $ nrhs, a, lda, xact, lda, b, lda, iseed,
413 IF( ifact.EQ.2 )
THEN
414 CALL dcopy( npp, a, 1, afac, 1 )
415 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
420 CALL dspsv( uplo, n, nrhs, afac, iwork, x, lda,
429 IF( iwork( k ).LT.0 )
THEN
430 IF( iwork( k ).NE.-k )
THEN
434 ELSE IF( iwork( k ).NE.k )
THEN
443 CALL alaerh( path,
'DSPSV ', info, k, uplo, n,
444 $ n, -1, -1, nrhs, imat, nfail,
447 ELSE IF( info.NE.0 )
THEN
454 CALL dspt01( uplo, n, a, afac, iwork, ainv, lda,
455 $ rwork, result( 1 ) )
459 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
460 CALL dppt02( uplo, n, nrhs, a, x, lda, work, lda,
461 $ rwork, result( 2 ) )
465 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
473 IF( result( k ).GE.thresh )
THEN
474 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
475 $
CALL aladhd( nout, path )
476 WRITE( nout, fmt = 9999 )
'DSPSV ', uplo, n,
477 $ imat, k, result( k )
487 IF( ifact.EQ.2 .AND. npp.GT.0 )
488 $
CALL dlaset(
'Full', npp, 1, zero, zero, afac,
490 CALL dlaset(
'Full', n, nrhs, zero, zero, x, lda )
496 CALL dspsvx( fact, uplo, n, nrhs, a, afac, iwork, b,
497 $ lda, x, lda, rcond, rwork,
498 $ rwork( nrhs+1 ), work, iwork( n+1 ),
507 IF( iwork( k ).LT.0 )
THEN
508 IF( iwork( k ).NE.-k )
THEN
512 ELSE IF( iwork( k ).NE.k )
THEN
521 CALL alaerh( path,
'DSPSVX', info, k, fact // uplo,
522 $ n, n, -1, -1, nrhs, imat, nfail,
528 IF( ifact.GE.2 )
THEN
533 CALL dspt01( uplo, n, a, afac, iwork, ainv, lda,
534 $ rwork( 2*nrhs+1 ), result( 1 ) )
542 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
543 CALL dppt02( uplo, n, nrhs, a, x, lda, work, lda,
544 $ rwork( 2*nrhs+1 ), result( 2 ) )
548 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
553 CALL dppt05( uplo, n, nrhs, a, b, lda, x, lda,
554 $ xact, lda, rwork, rwork( nrhs+1 ),
563 result( 6 ) = dget06( rcond, rcondc )
569 IF( result( k ).GE.thresh )
THEN
570 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
571 $
CALL aladhd( nout, path )
572 WRITE( nout, fmt = 9998 )
'DSPSVX', fact, uplo,
573 $ n, imat, k, result( k )
587 CALL alasvm( path, nout, nfail, nrun, nerrs )
589 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
590 $
', test ', i2,
', ratio =', g12.5 )
591 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
592 $
', type ', i2,
', test ', i2,
', ratio =', g12.5 )
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 aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine ddrvsp(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
DDRVSP
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 dppt02(uplo, n, nrhs, a, x, ldx, b, ldb, rwork, resid)
DPPT02
subroutine dppt05(uplo, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DPPT05
subroutine dspt01(uplo, n, a, afac, ipiv, c, ldc, rwork, resid)
DSPT01
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
DSPSV computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine dspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
DSPSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine dsptrf(uplo, n, ap, ipiv, info)
DSPTRF
subroutine dsptri(uplo, n, ap, ipiv, work, info)
DSPTRI
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
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.