149 SUBROUTINE ddrvsy( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
150 $ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
159 INTEGER NMAX, NN, NOUT, NRHS
160 DOUBLE PRECISION THRESH
164 INTEGER IWORK( * ), NVAL( * )
165 DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
166 $ rwork( * ), work( * ), x( * ), xact( * )
172 DOUBLE PRECISION ONE, ZERO
173 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
174 INTEGER NTYPES, NTESTS
175 parameter( ntypes = 10, ntests = 6 )
177 parameter( nfact = 2 )
181 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
183 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
184 $ izero, j, k, k1, kl, ku, lda, lwork, mode, n,
185 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
186 DOUBLE PRECISION AINVNM, ANORM, CNDNUM, RCOND, RCONDC
189 CHARACTER FACTS( NFACT ), UPLOS( 2 )
190 INTEGER ISEED( 4 ), ISEEDY( 4 )
191 DOUBLE PRECISION RESULT( NTESTS )
194 DOUBLE PRECISION DGET06, DLANSY
195 EXTERNAL DGET06, DLANSY
208 COMMON / infoc / infot, nunit, ok, lerr
209 COMMON / srnamc / srnamt
215 DATA iseedy / 1988, 1989, 1990, 1991 /
216 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
222 path( 1: 1 ) =
'Double precision'
228 iseed( i ) = iseedy( i )
230 lwork = max( 2*nmax, nmax*nrhs )
235 $
CALL derrvx( path, nout )
255 DO 170 imat = 1, nimat
259 IF( .NOT.dotype( imat ) )
264 zerot = imat.GE.3 .AND. imat.LE.6
265 IF( zerot .AND. n.LT.imat-2 )
271 uplo = uplos( iuplo )
276 CALL dlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
280 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
281 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
287 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
288 $ -1, -1, imat, nfail, nerrs, nout )
298 ELSE IF( imat.EQ.4 )
THEN
308 IF( iuplo.EQ.1 )
THEN
309 ioff = ( izero-1 )*lda
310 DO 20 i = 1, izero - 1
320 DO 40 i = 1, izero - 1
331 IF( iuplo.EQ.1 )
THEN
359 DO 150 ifact = 1, nfact
363 fact = facts( ifact )
373 ELSE IF( ifact.EQ.1 )
THEN
377 anorm = dlansy(
'1', uplo, n, a, lda, rwork )
381 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
382 CALL dsytrf( uplo, n, afac, lda, iwork, work,
387 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
388 lwork = (n+nb+1)*(nb+3)
389 CALL dsytri2( uplo, n, ainv, lda, iwork, work,
391 ainvnm = dlansy(
'1', uplo, n, ainv, lda, rwork )
395 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
398 rcondc = ( one / anorm ) / ainvnm
405 CALL dlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
406 $ nrhs, a, lda, xact, lda, b, lda, iseed,
412 IF( ifact.EQ.2 )
THEN
413 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
414 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
419 CALL dsysv( uplo, n, nrhs, afac, lda, iwork, x,
420 $ lda, work, lwork, info )
428 IF( iwork( k ).LT.0 )
THEN
429 IF( iwork( k ).NE.-k )
THEN
433 ELSE IF( iwork( k ).NE.k )
THEN
442 CALL alaerh( path,
'DSYSV ', info, k, uplo, n,
443 $ n, -1, -1, nrhs, imat, nfail,
446 ELSE IF( info.NE.0 )
THEN
453 CALL dsyt01( uplo, n, a, lda, afac, lda, iwork,
454 $ ainv, lda, rwork, result( 1 ) )
458 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
459 CALL dpot02( uplo, n, nrhs, a, lda, x, lda, work,
460 $ lda, rwork, result( 2 ) )
464 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
472 IF( result( k ).GE.thresh )
THEN
473 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
474 $
CALL aladhd( nout, path )
475 WRITE( nout, fmt = 9999 )
'DSYSV ', uplo, n,
476 $ imat, k, result( k )
487 $
CALL dlaset( uplo, n, n, zero, zero, afac, lda )
488 CALL dlaset(
'Full', n, nrhs, zero, zero, x, lda )
494 CALL dsysvx( fact, uplo, n, nrhs, a, lda, afac, lda,
495 $ iwork, b, lda, x, lda, rcond, rwork,
496 $ rwork( nrhs+1 ), work, lwork,
497 $ iwork( n+1 ), info )
505 IF( iwork( k ).LT.0 )
THEN
506 IF( iwork( k ).NE.-k )
THEN
510 ELSE IF( iwork( k ).NE.k )
THEN
519 CALL alaerh( path,
'DSYSVX', info, k, fact // uplo,
520 $ n, n, -1, -1, nrhs, imat, nfail,
526 IF( ifact.GE.2 )
THEN
531 CALL dsyt01( uplo, n, a, lda, afac, lda, iwork,
532 $ ainv, lda, rwork( 2*nrhs+1 ),
541 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
542 CALL dpot02( uplo, n, nrhs, a, lda, x, lda, work,
543 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
547 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
552 CALL dpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
553 $ xact, lda, rwork, rwork( nrhs+1 ),
562 result( 6 ) = dget06( rcond, rcondc )
568 IF( result( k ).GE.thresh )
THEN
569 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
570 $
CALL aladhd( nout, path )
571 WRITE( nout, fmt = 9998 )
'DSYSVX', fact, uplo,
572 $ n, imat, k, result( k )
586 CALL alasvm( path, nout, nfail, nrun, nerrs )
588 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
589 $
', test ', i2,
', ratio =', g12.5 )
590 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
591 $
', 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 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 ddrvsy(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
DDRVSY
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 dpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
DPOT02
subroutine dpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DPOT05
subroutine dsyt01(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
DSYT01
subroutine dsysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
DSYSV computes the solution to system of linear equations A * X = B for SY matrices
subroutine dsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, iwork, info)
DSYSVX computes the solution to system of linear equations A * X = B for SY matrices
subroutine dsytrf(uplo, n, a, lda, ipiv, work, lwork, info)
DSYTRF
subroutine dsytri2(uplo, n, a, lda, ipiv, work, lwork, info)
DSYTRI2
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.