151 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK,
152 $ RWORK, IWORK, NOUT )
160 INTEGER NMAX, NN, NOUT, NRHS
165 INTEGER IWORK( * ), NVAL( * )
166 REAL A( * ), AFAC( * ), AINV( * ), B( * ),
167 $ rwork( * ), work( * ), x( * ), xact( * )
174 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
175 INTEGER NTYPES, NTESTS
176 parameter( ntypes = 10, ntests = 3 )
178 parameter( nfact = 2 )
182 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
183 CHARACTER*3 PATH, MATPATH
184 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
185 $ izero, j, k, kl, ku, lda, lwork, mode, n,
186 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
187 REAL AINVNM, ANORM, CNDNUM, RCONDC
190 CHARACTER FACTS( NFACT ), UPLOS( 2 )
191 INTEGER ISEED( 4 ), ISEEDY( 4 )
192 REAL RESULT( NTESTS )
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' /
227 path( 1: 1 ) =
'Single precision'
232 matpath( 1: 1 ) =
'Single precision'
233 matpath( 2: 3 ) =
'SY'
239 iseed( i ) = iseedy( i )
241 lwork = max( 2*nmax, nmax*nrhs )
246 $
CALL serrvx( path, nout )
267 DO 170 imat = 1, nimat
271 IF( .NOT.dotype( imat ) )
276 zerot = imat.GE.3 .AND. imat.LE.6
277 IF( zerot .AND. n.LT.imat-2 )
283 uplo = uplos( iuplo )
290 CALL slatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
291 $ mode, cndnum, dist )
296 CALL slatms( n, n, dist, iseed,
TYPE, rwork, mode,
297 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
303 CALL alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
304 $ -1, -1, imat, nfail, nerrs, nout )
317 ELSE IF( imat.EQ.4 )
THEN
327 IF( iuplo.EQ.1 )
THEN
328 ioff = ( izero-1 )*lda
329 DO 20 i = 1, izero - 1
339 DO 40 i = 1, izero - 1
350 IF( iuplo.EQ.1 )
THEN
380 DO 150 ifact = 1, nfact
384 fact = facts( ifact )
394 ELSE IF( ifact.EQ.1 )
THEN
398 anorm = slansy(
'1', uplo, n, a, lda, rwork )
402 CALL slacpy( uplo, n, n, a, lda, afac, lda )
408 CALL slacpy( uplo, n, n, afac, lda, ainv, lda )
409 lwork = (n+nb+1)*(nb+3)
412 ainvnm = slansy(
'1', uplo, n, ainv, lda, rwork )
416 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
419 rcondc = ( one / anorm ) / ainvnm
426 CALL slarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
427 $ nrhs, a, lda, xact, lda, b, lda, iseed,
433 IF( ifact.EQ.2 )
THEN
434 CALL slacpy( uplo, n, n, a, lda, afac, lda )
435 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
440 srnamt =
'SSYSV_ROOK'
441 CALL ssysv_rook( uplo, n, nrhs, afac, lda, iwork,
442 $ x, lda, work, lwork, info )
450 IF( iwork( k ).LT.0 )
THEN
451 IF( iwork( k ).NE.-k )
THEN
455 ELSE IF( iwork( k ).NE.k )
THEN
464 CALL alaerh( path,
'SSYSV_ROOK', info, k, uplo,
465 $ n, n, -1, -1, nrhs, imat, nfail,
468 ELSE IF( info.NE.0 )
THEN
476 $ iwork, ainv, lda, rwork,
481 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
482 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
483 $ lda, rwork, result( 2 ) )
488 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
496 IF( result( k ).GE.thresh )
THEN
497 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
498 $
CALL aladhd( nout, path )
499 WRITE( nout, fmt = 9999 )
'SSYSV_ROOK', uplo,
500 $ n, imat, k, result( k )
516 CALL alasvm( path, nout, nfail, nrun, nerrs )
518 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
519 $
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine slarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
SLARHS
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 ssysv_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
SSYSV_ROOK computes the solution to system of linear equations A * X = B for SY matrices
subroutine ssytrf_rook(uplo, n, a, lda, ipiv, work, lwork, info)
SSYTRF_ROOK
subroutine ssytri_rook(uplo, n, a, lda, ipiv, work, info)
SSYTRI_ROOK
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
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 sdrvsy_rook(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
SDRVSY_ROOK
subroutine serrvx(path, nunit)
SERRVX
subroutine sget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
SGET04
subroutine slatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
SLATB4
subroutine slatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
SLATMS
subroutine spot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
SPOT02
subroutine spot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
SPOT05
subroutine ssyt01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
SSYT01_ROOK