151 SUBROUTINE sdrvsy( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
152 $ a, afac, ainv, b, x, xact, work, rwork, iwork,
162 INTEGER NMAX, NN, NOUT, NRHS
167 INTEGER IWORK( * ), NVAL( * )
168 REAL A( * ), AFAC( * ), AINV( * ), B( * ),
169 $ rwork( * ), work( * ), x( * ), xact( * )
176 parameter ( one = 1.0e+0, zero = 0.0e+0 )
177 INTEGER NTYPES, NTESTS
178 parameter ( ntypes = 10, ntests = 6 )
180 parameter ( nfact = 2 )
184 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
186 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
187 $ izero, j, k, k1, kl, ku, lda, lwork, mode, n,
188 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
189 REAL AINVNM, ANORM, CNDNUM, RCOND, RCONDC
192 CHARACTER FACTS( nfact ), UPLOS( 2 )
193 INTEGER ISEED( 4 ), ISEEDY( 4 )
194 REAL RESULT( ntests )
198 EXTERNAL sget06, slansy
211 COMMON / infoc / infot, nunit, ok, lerr
212 COMMON / srnamc / srnamt
218 DATA iseedy / 1988, 1989, 1990, 1991 /
219 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
225 path( 1: 1 ) =
'Single precision'
231 iseed( i ) = iseedy( i )
233 lwork = max( 2*nmax, nmax*nrhs )
238 $
CALL serrvx( path, nout )
258 DO 170 imat = 1, nimat
262 IF( .NOT.dotype( imat ) )
267 zerot = imat.GE.3 .AND. imat.LE.6
268 IF( zerot .AND. n.LT.imat-2 )
274 uplo = uplos( iuplo )
279 CALL slatb4( path, imat, n, n,
TYPE, KL, KU, ANORM, MODE,
283 CALL slatms( n, n, dist, iseed,
TYPE, RWORK, MODE,
284 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
290 CALL alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
291 $ -1, -1, imat, nfail, nerrs, nout )
301 ELSE IF( imat.EQ.4 )
THEN
311 IF( iuplo.EQ.1 )
THEN
312 ioff = ( izero-1 )*lda
313 DO 20 i = 1, izero - 1
323 DO 40 i = 1, izero - 1
334 IF( iuplo.EQ.1 )
THEN
362 DO 150 ifact = 1, nfact
366 fact = facts( ifact )
376 ELSE IF( ifact.EQ.1 )
THEN
380 anorm = slansy(
'1', uplo, n, a, lda, rwork )
384 CALL slacpy( uplo, n, n, a, lda, afac, lda )
385 CALL ssytrf( uplo, n, afac, lda, iwork, work,
390 CALL slacpy( uplo, n, n, afac, lda, ainv, lda )
391 lwork = (n+nb+1)*(nb+3)
392 CALL ssytri2( uplo, n, ainv, lda, iwork, work,
394 ainvnm = slansy(
'1', uplo, n, ainv, lda, rwork )
398 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
401 rcondc = ( one / anorm ) / ainvnm
408 CALL slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
409 $ nrhs, a, lda, xact, lda, b, lda, iseed,
415 IF( ifact.EQ.2 )
THEN
416 CALL slacpy( uplo, n, n, a, lda, afac, lda )
417 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
422 CALL ssysv( uplo, n, nrhs, afac, lda, iwork, x,
423 $ lda, work, lwork, info )
431 IF( iwork( k ).LT.0 )
THEN
432 IF( iwork( k ).NE.-k )
THEN
436 ELSE IF( iwork( k ).NE.k )
THEN
445 CALL alaerh( path,
'SSYSV ', info, k, uplo, n,
446 $ n, -1, -1, nrhs, imat, nfail,
449 ELSE IF( info.NE.0 )
THEN
456 CALL ssyt01( uplo, n, a, lda, afac, lda, iwork,
457 $ ainv, lda, rwork, result( 1 ) )
461 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
462 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
463 $ lda, rwork, result( 2 ) )
467 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
475 IF( result( k ).GE.thresh )
THEN
476 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
477 $
CALL aladhd( nout, path )
478 WRITE( nout, fmt = 9999 )
'SSYSV ', uplo, n,
479 $ imat, k, result( k )
490 $
CALL slaset( uplo, n, n, zero, zero, afac, lda )
491 CALL slaset(
'Full', n, nrhs, zero, zero, x, lda )
497 CALL ssysvx( fact, uplo, n, nrhs, a, lda, afac, lda,
498 $ iwork, b, lda, x, lda, rcond, rwork,
499 $ rwork( nrhs+1 ), work, lwork,
500 $ iwork( n+1 ), info )
508 IF( iwork( k ).LT.0 )
THEN
509 IF( iwork( k ).NE.-k )
THEN
513 ELSE IF( iwork( k ).NE.k )
THEN
522 CALL alaerh( path,
'SSYSVX', info, k, fact // uplo,
523 $ n, n, -1, -1, nrhs, imat, nfail,
529 IF( ifact.GE.2 )
THEN
534 CALL ssyt01( uplo, n, a, lda, afac, lda, iwork,
535 $ ainv, lda, rwork( 2*nrhs+1 ),
544 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
545 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
546 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
550 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
555 CALL spot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
556 $ xact, lda, rwork, rwork( nrhs+1 ),
565 result( 6 ) = sget06( rcond, rcondc )
571 IF( result( k ).GE.thresh )
THEN
572 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
573 $
CALL aladhd( nout, path )
574 WRITE( nout, fmt = 9998 )
'SSYSVX', fact, uplo,
575 $ n, imat, k, result( k )
589 CALL alasvm( path, nout, nfail, nrun, nerrs )
591 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
592 $
', test ', i2,
', ratio =', g12.5 )
593 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
594 $
', type ', i2,
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine ssytri2(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
SSYTRI2
subroutine sdrvsy(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK, NOUT)
SDRVSY
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine slatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
SLATB4
subroutine ssytrf(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
SSYTRF
subroutine slarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
SLARHS
subroutine ssysvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK, IWORK, INFO)
SSYSVX computes the solution to system of linear equations A * X = B for SY matrices ...
subroutine spot05(UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
SPOT05
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
SLATMS
subroutine slaset(UPLO, M, N, ALPHA, BETA, A, LDA)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine sget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
SGET04
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine serrvx(PATH, NUNIT)
SERRVX
subroutine ssysv(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK, LWORK, INFO)
SSYSV computes the solution to system of linear equations A * X = B for SY matrices ...
subroutine spot02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
SPOT02
subroutine ssyt01(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
SSYT01