166 INTEGER nmax, nn, nout, nrhs
167 DOUBLE PRECISION thresh
171 INTEGER iwork( * ), nval( * )
172 DOUBLE PRECISION a( * ), afac( * ), ainv( * ), b( * ), e( * ),
173 $ rwork( * ), work( * ), x( * ), xact( * )
179 DOUBLE PRECISION one, zero
180 parameter ( one = 1.0d+0, zero = 0.0d+0 )
181 INTEGER ntypes, ntests
182 parameter ( ntypes = 10, ntests = 3 )
184 parameter ( nfact = 2 )
188 CHARACTER dist, fact,
TYPE, uplo, xtype
189 CHARACTER*3 path, matpath
190 INTEGER i, i1, i2, ifact, imat, in, info, ioff, iuplo,
191 $ izero, j, k, kl, ku, lda, lwork, mode, n,
192 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
193 DOUBLE PRECISION ainvnm, anorm, cndnum, rcondc
196 CHARACTER facts( nfact ), uplos( 2 )
197 INTEGER iseed( 4 ), iseedy( 4 )
198 DOUBLE PRECISION result( ntests )
215 COMMON / infoc / infot, nunit, ok, lerr
216 COMMON / srnamc / srnamt
222 DATA iseedy / 1988, 1989, 1990, 1991 /
223 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
231 path( 1: 1 ) =
'Double precision'
236 matpath( 1: 1 ) =
'Double precision'
237 matpath( 2: 3 ) =
'SY'
243 iseed( i ) = iseedy( i )
245 lwork = max( 2*nmax, nmax*nrhs )
250 $
CALL derrvx( path, nout )
271 DO 170 imat = 1, nimat
275 IF( .NOT.dotype( imat ) )
280 zerot = imat.GE.3 .AND. imat.LE.6
281 IF( zerot .AND. n.LT.imat-2 )
287 uplo = uplos( iuplo )
294 CALL dlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
295 $ mode, cndnum, dist )
300 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
301 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
307 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
308 $ -1, -1, imat, nfail, nerrs, nout )
321 ELSE IF( imat.EQ.4 )
THEN
331 IF( iuplo.EQ.1 )
THEN
332 ioff = ( izero-1 )*lda
333 DO 20 i = 1, izero - 1
343 DO 40 i = 1, izero - 1
354 IF( iuplo.EQ.1 )
THEN
384 DO 150 ifact = 1, nfact
388 fact = facts( ifact )
397 ELSE IF( ifact.EQ.1 )
THEN
401 anorm =
dlansy(
'1', uplo, n, a, lda, rwork )
405 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
406 CALL dsytrf_rk( uplo, n, afac, lda, e, iwork, work,
411 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
412 lwork = (n+nb+1)*(nb+3)
417 CALL dsytri_3( uplo, n, ainv, lda, e, iwork,
418 $ work, lwork, info )
419 ainvnm =
dlansy(
'1', uplo, n, ainv, lda, rwork )
423 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
426 rcondc = ( one / anorm ) / ainvnm
433 CALL dlarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
434 $ nrhs, a, lda, xact, lda, b, lda, iseed,
440 IF( ifact.EQ.2 )
THEN
441 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
442 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
448 CALL dsysv_rk( uplo, n, nrhs, afac, lda, e, iwork,
449 $ x, lda, work, lwork, info )
457 IF( iwork( k ).LT.0 )
THEN
458 IF( iwork( k ).NE.-k )
THEN
462 ELSE IF( iwork( k ).NE.k )
THEN
471 CALL alaerh( path,
'DSYSV_RK', info, k, uplo,
472 $ n, n, -1, -1, nrhs, imat, nfail,
475 ELSE IF( info.NE.0 )
THEN
482 CALL dsyt01_3( uplo, n, a, lda, afac, lda, e,
483 $ iwork, ainv, lda, rwork,
488 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
489 CALL dpot02( uplo, n, nrhs, a, lda, x, lda, work,
490 $ lda, rwork, result( 2 ) )
495 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
503 IF( result( k ).GE.thresh )
THEN
504 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
505 $
CALL aladhd( nout, path )
506 WRITE( nout, fmt = 9999 )
'DSYSV_RK', uplo,
507 $ n, imat, k, result( k )
523 CALL alasvm( path, nout, nfail, nrun, nerrs )
525 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
526 $
', test ', i2,
', ratio =', g12.5 )
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
double precision function dlansy(NORM, UPLO, N, A, LDA, WORK)
DLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix.
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine dlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
DLARHS
subroutine dsytri_3(UPLO, N, A, LDA, E, IPIV, WORK, LWORK, INFO)
DSYTRI_3
subroutine dsyt01_3(UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, LDC, RWORK, RESID)
DSYT01_3
subroutine dsytrf_rk(UPLO, N, A, LDA, E, IPIV, WORK, LWORK, INFO)
DSYTRF_RK computes the factorization of a real symmetric indefinite matrix using the bounded Bunch-Ka...
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine dlatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
DLATB4
subroutine dget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
DGET04
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine derrvx(PATH, NUNIT)
DERRVX
subroutine dsysv_rk(UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, WORK, LWORK, INFO)
DSYSV_RK computes the solution to system of linear equations A * X = B for SY matrices ...
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