161 SUBROUTINE sdrvpo( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
162 $ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
163 $ RWORK, IWORK, NOUT )
171 INTEGER NMAX, NN, NOUT, NRHS
176 INTEGER IWORK( * ), NVAL( * )
177 REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
178 $ bsav( * ), rwork( * ), s( * ), work( * ),
186 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
188 parameter( ntypes = 9 )
190 parameter( ntests = 6 )
193 LOGICAL EQUIL, NOFACT, PREFAC, ZEROT
194 CHARACTER DIST, EQUED, FACT,
TYPE, UPLO, XTYPE
196 INTEGER I, IEQUED, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
197 $ izero, k, k1, kl, ku, lda, mode, n, nb, nbmin,
198 $ nerrs, nfact, nfail, nimat, nrun, nt
199 REAL AINVNM, AMAX, ANORM, CNDNUM, RCOND, RCONDC,
203 CHARACTER EQUEDS( 2 ), FACTS( 3 ), UPLOS( 2 )
204 INTEGER ISEED( 4 ), ISEEDY( 4 )
205 REAL RESULT( NTESTS )
210 EXTERNAL lsame, sget06, slansy
227 COMMON / infoc / infot, nunit, ok, lerr
228 COMMON / srnamc / srnamt
231 DATA iseedy / 1988, 1989, 1990, 1991 /
232 DATA uplos /
'U',
'L' /
233 DATA facts /
'F',
'N',
'E' /
234 DATA equeds /
'N',
'Y' /
240 path( 1: 1 ) =
'Single precision'
246 iseed( i ) = iseedy( i )
252 $
CALL serrvx( path, nout )
272 DO 120 imat = 1, nimat
276 IF( .NOT.dotype( imat ) )
281 zerot = imat.GE.3 .AND. imat.LE.5
282 IF( zerot .AND. n.LT.imat-2 )
288 uplo = uplos( iuplo )
293 CALL slatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
297 CALL slatms( n, n, dist, iseed,
TYPE, rwork, mode,
298 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
304 CALL alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
305 $ -1, -1, imat, nfail, nerrs, nout )
315 ELSE IF( imat.EQ.4 )
THEN
320 ioff = ( izero-1 )*lda
324 IF( iuplo.EQ.1 )
THEN
325 DO 20 i = 1, izero - 1
335 DO 40 i = 1, izero - 1
350 CALL slacpy( uplo, n, n, a, lda, asav, lda )
353 equed = equeds( iequed )
354 IF( iequed.EQ.1 )
THEN
360 DO 90 ifact = 1, nfact
361 fact = facts( ifact )
362 prefac = lsame( fact,
'F' )
363 nofact = lsame( fact,
'N' )
364 equil = lsame( fact,
'E' )
371 ELSE IF( .NOT.lsame( fact,
'N' ) )
THEN
378 CALL slacpy( uplo, n, n, asav, lda, afac, lda )
379 IF( equil .OR. iequed.GT.1 )
THEN
384 CALL spoequ( n, afac, lda, s, scond, amax,
386 IF( info.EQ.0 .AND. n.GT.0 )
THEN
392 CALL slaqsy( uplo, n, afac, lda, s, scond,
405 anorm = slansy(
'1', uplo, n, afac, lda, rwork )
409 CALL spotrf( uplo, n, afac, lda, info )
413 CALL slacpy( uplo, n, n, afac, lda, a, lda )
414 CALL spotri( uplo, n, a, lda, info )
418 ainvnm = slansy(
'1', uplo, n, a, lda, rwork )
419 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
422 rcondc = ( one / anorm ) / ainvnm
428 CALL slacpy( uplo, n, n, asav, lda, a, lda )
433 CALL slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
434 $ nrhs, a, lda, xact, lda, b, lda,
437 CALL slacpy(
'Full', n, nrhs, b, lda, bsav, lda )
446 CALL slacpy( uplo, n, n, a, lda, afac, lda )
447 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
450 CALL sposv( uplo, n, nrhs, afac, lda, x, lda,
455 IF( info.NE.izero )
THEN
456 CALL alaerh( path,
'SPOSV ', info, izero,
457 $ uplo, n, n, -1, -1, nrhs, imat,
458 $ nfail, nerrs, nout )
460 ELSE IF( info.NE.0 )
THEN
467 CALL spot01( uplo, n, a, lda, afac, lda, rwork,
472 CALL slacpy(
'Full', n, nrhs, b, lda, work,
474 CALL spot02( uplo, n, nrhs, a, lda, x, lda,
475 $ work, lda, rwork, result( 2 ) )
479 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
487 IF( result( k ).GE.thresh )
THEN
488 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
489 $
CALL aladhd( nout, path )
490 WRITE( nout, fmt = 9999 )
'SPOSV ', uplo,
491 $ n, imat, k, result( k )
502 $
CALL slaset( uplo, n, n, zero, zero, afac, lda )
503 CALL slaset(
'Full', n, nrhs, zero, zero, x, lda )
504 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
509 CALL slaqsy( uplo, n, a, lda, s, scond, amax,
517 CALL sposvx( fact, uplo, n, nrhs, a, lda, afac,
518 $ lda, equed, s, b, lda, x, lda, rcond,
519 $ rwork, rwork( nrhs+1 ), work, iwork,
524 IF( info.NE.izero )
THEN
525 CALL alaerh( path,
'SPOSVX', info, izero,
526 $ fact // uplo, n, n, -1, -1, nrhs,
527 $ imat, nfail, nerrs, nout )
532 IF( .NOT.prefac )
THEN
537 CALL spot01( uplo, n, a, lda, afac, lda,
538 $ rwork( 2*nrhs+1 ), result( 1 ) )
546 CALL slacpy(
'Full', n, nrhs, bsav, lda, work,
548 CALL spot02( uplo, n, nrhs, asav, lda, x, lda,
549 $ work, lda, rwork( 2*nrhs+1 ),
554 IF( nofact .OR. ( prefac .AND. lsame( equed,
556 CALL sget04( n, nrhs, x, lda, xact, lda,
557 $ rcondc, result( 3 ) )
559 CALL sget04( n, nrhs, x, lda, xact, lda,
560 $ roldc, result( 3 ) )
566 CALL spot05( uplo, n, nrhs, asav, lda, b, lda,
567 $ x, lda, xact, lda, rwork,
568 $ rwork( nrhs+1 ), result( 4 ) )
576 result( 6 ) = sget06( rcond, rcondc )
582 IF( result( k ).GE.thresh )
THEN
583 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
584 $
CALL aladhd( nout, path )
586 WRITE( nout, fmt = 9997 )
'SPOSVX', fact,
587 $ uplo, n, equed, imat, k, result( k )
589 WRITE( nout, fmt = 9998 )
'SPOSVX', fact,
590 $ uplo, n, imat, k, result( k )
604 CALL alasvm( path, nout, nfail, nrun, nerrs )
606 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
607 $
', test(', i1,
')=', g12.5 )
608 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
609 $
', type ', i1,
', test(', i1,
')=', g12.5 )
610 9997
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
611 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',
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 slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slaqsy(uplo, n, a, lda, s, scond, amax, equed)
SLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by spoequ.
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 spoequ(n, a, lda, s, scond, amax, info)
SPOEQU
subroutine sposv(uplo, n, nrhs, a, lda, b, ldb, info)
SPOSV computes the solution to system of linear equations A * X = B for PO matrices
subroutine sposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
SPOSVX computes the solution to system of linear equations A * X = B for PO matrices
subroutine spotrf(uplo, n, a, lda, info)
SPOTRF
subroutine spotri(uplo, n, a, lda, info)
SPOTRI
subroutine sdrvpo(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, asav, b, bsav, x, xact, s, work, rwork, iwork, nout)
SDRVPO
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 spot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
SPOT01
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