153 SUBROUTINE sdrvsy( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
154 $ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
163 INTEGER NMAX, NN, NOUT, NRHS
168 INTEGER IWORK( * ), NVAL( * )
169 REAL A( * ), AFAC( * ), AINV( * ), B( * ),
170 $ rwork( * ), work( * ), x( * ), xact( * )
177 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
178 INTEGER NTYPES, NTESTS
179 parameter( ntypes = 10, ntests = 6 )
181 parameter( nfact = 2 )
185 CHARACTER DIST, EQUED, FACT,
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 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt,
191 REAL AINVNM, ANORM, CNDNUM, RCOND, RCONDC,
195 CHARACTER FACTS( NFACT ), UPLOS( 2 )
196 INTEGER ISEED( 4 ), ISEEDY( 4 )
197 REAL RESULT( NTESTS ), BERR( NRHS ),
198 $ errbnds_n( nrhs, 3 ), errbnds_c( nrhs, 3 )
202 EXTERNAL SGET06, SLANSY
216 COMMON / infoc / infot, nunit, ok, lerr
217 COMMON / srnamc / srnamt
223 DATA iseedy / 1988, 1989, 1990, 1991 /
224 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
230 path( 1: 1 ) =
'Single precision'
236 iseed( i ) = iseedy( i )
238 lwork = max( 2*nmax, nmax*nrhs )
243 $
CALL serrvx( path, nout )
263 DO 170 imat = 1, nimat
267 IF( .NOT.dotype( imat ) )
272 zerot = imat.GE.3 .AND. imat.LE.6
273 IF( zerot .AND. n.LT.imat-2 )
279 uplo = uplos( iuplo )
284 CALL slatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
288 CALL slatms( n, n, dist, iseed,
TYPE, rwork, mode,
289 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
295 CALL alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
296 $ -1, -1, imat, nfail, nerrs, nout )
306 ELSE IF( imat.EQ.4 )
THEN
316 IF( iuplo.EQ.1 )
THEN
317 ioff = ( izero-1 )*lda
318 DO 20 i = 1, izero - 1
328 DO 40 i = 1, izero - 1
339 IF( iuplo.EQ.1 )
THEN
367 DO 150 ifact = 1, nfact
371 fact = facts( ifact )
381 ELSE IF( ifact.EQ.1 )
THEN
385 anorm = slansy(
'1', uplo, n, a, lda, rwork )
389 CALL slacpy( uplo, n, n, a, lda, afac, lda )
390 CALL ssytrf( uplo, n, afac, lda, iwork, work,
395 CALL slacpy( uplo, n, n, afac, lda, ainv, lda )
396 lwork = (n+nb+1)*(nb+3)
397 CALL ssytri2( uplo, n, ainv, lda, iwork, work,
399 ainvnm = slansy(
'1', uplo, n, ainv, lda, rwork )
403 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
406 rcondc = ( one / anorm ) / ainvnm
413 CALL slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
414 $ nrhs, a, lda, xact, lda, b, lda, iseed,
420 IF( ifact.EQ.2 )
THEN
421 CALL slacpy( uplo, n, n, a, lda, afac, lda )
422 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
427 CALL ssysv( uplo, n, nrhs, afac, lda, iwork, x,
428 $ lda, work, lwork, info )
436 IF( iwork( k ).LT.0 )
THEN
437 IF( iwork( k ).NE.-k )
THEN
441 ELSE IF( iwork( k ).NE.k )
THEN
450 CALL alaerh( path,
'SSYSV ', info, k, uplo, n,
451 $ n, -1, -1, nrhs, imat, nfail,
454 ELSE IF( info.NE.0 )
THEN
461 CALL ssyt01( uplo, n, a, lda, afac, lda, iwork,
462 $ ainv, lda, rwork, result( 1 ) )
466 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
467 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
468 $ lda, rwork, result( 2 ) )
472 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
480 IF( result( k ).GE.thresh )
THEN
481 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
482 $
CALL aladhd( nout, path )
483 WRITE( nout, fmt = 9999 )
'SSYSV ', uplo, n,
484 $ imat, k, result( k )
495 $
CALL slaset( uplo, n, n, zero, zero, afac, lda )
496 CALL slaset(
'Full', n, nrhs, zero, zero, x, lda )
502 CALL ssysvx( fact, uplo, n, nrhs, a, lda, afac, lda,
503 $ iwork, b, lda, x, lda, rcond, rwork,
504 $ rwork( nrhs+1 ), work, lwork,
505 $ iwork( n+1 ), info )
513 IF( iwork( k ).LT.0 )
THEN
514 IF( iwork( k ).NE.-k )
THEN
518 ELSE IF( iwork( k ).NE.k )
THEN
527 CALL alaerh( path,
'SSYSVX', info, k, fact // uplo,
528 $ n, n, -1, -1, nrhs, imat, nfail,
534 IF( ifact.GE.2 )
THEN
539 CALL ssyt01( uplo, n, a, lda, afac, lda, iwork,
540 $ ainv, lda, rwork( 2*nrhs+1 ),
549 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
550 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
551 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
555 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
560 CALL spot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
561 $ xact, lda, rwork, rwork( nrhs+1 ),
570 result( 6 ) = sget06( rcond, rcondc )
576 IF( result( k ).GE.thresh )
THEN
577 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
578 $
CALL aladhd( nout, path )
579 WRITE( nout, fmt = 9998 )
'SSYSVX', fact, uplo,
580 $ n, imat, k, result( k )
591 $
CALL slaset( uplo, n, n, zero, zero, afac, lda )
592 CALL slaset(
'Full', n, nrhs, zero, zero, x, lda )
600 CALL ssysvxx( fact, uplo, n, nrhs, a, lda, afac,
601 $ lda, iwork, equed, work( n+1 ), b, lda, x,
602 $ lda, rcond, rpvgrw_svxx, berr, n_err_bnds,
603 $ errbnds_n, errbnds_c, 0, zero, work,
604 $ iwork( n+1 ), info )
612 IF( iwork( k ).LT.0 )
THEN
613 IF( iwork( k ).NE.-k )
THEN
617 ELSE IF( iwork( k ).NE.k )
THEN
625 IF( info.NE.k .AND. info.LE.n )
THEN
626 CALL alaerh( path,
'SSYSVXX', info, k,
627 $ fact // uplo, n, n, -1, -1, nrhs, imat, nfail,
633 IF( ifact.GE.2 )
THEN
638 CALL ssyt01( uplo, n, a, lda, afac, lda, iwork,
639 $ ainv, lda, rwork(2*nrhs+1),
648 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
649 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
650 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
654 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
659 CALL spot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
660 $ xact, lda, rwork, rwork( nrhs+1 ),
669 result( 6 ) = sget06( rcond, rcondc )
675 IF( result( k ).GE.thresh )
THEN
676 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
677 $
CALL aladhd( nout, path )
678 WRITE( nout, fmt = 9998 )
'SSYSVXX',
679 $ fact, uplo, n, imat, k,
694 CALL alasvm( path, nout, nfail, nrun, nerrs )
701 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
702 $
', test ', i2,
', ratio =', g12.5 )
703 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
704 $
', type ', i2,
', 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(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 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 ssysvxx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, iwork, info)
SSYSVXX
subroutine ssytrf(uplo, n, a, lda, ipiv, work, lwork, info)
SSYTRF
subroutine ssytri2(uplo, n, a, lda, ipiv, work, lwork, info)
SSYTRI2
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(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
SDRVSY
subroutine sebchvxx(thresh, path)
SEBCHVXX
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(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
SSYT01