163 SUBROUTINE sdrvpo( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
164 $ a, afac, asav, b, bsav, x, xact, s, work,
165 $ rwork, iwork, nout )
174 INTEGER NMAX, NN, NOUT, NRHS
179 INTEGER IWORK( * ), NVAL( * )
180 REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
181 $ bsav( * ), rwork( * ), s( * ), work( * ),
189 parameter ( one = 1.0e+0, zero = 0.0e+0 )
191 parameter ( ntypes = 9 )
193 parameter ( ntests = 6 )
196 LOGICAL EQUIL, NOFACT, PREFAC, ZEROT
197 CHARACTER DIST, EQUED, FACT,
TYPE, UPLO, XTYPE
199 INTEGER I, IEQUED, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
200 $ izero, k, k1, kl, ku, lda, mode, n, nb, nbmin,
201 $ nerrs, nfact, nfail, nimat, nrun, nt
202 REAL AINVNM, AMAX, ANORM, CNDNUM, RCOND, RCONDC,
206 CHARACTER EQUEDS( 2 ), FACTS( 3 ), UPLOS( 2 )
207 INTEGER ISEED( 4 ), ISEEDY( 4 )
208 REAL RESULT( ntests )
213 EXTERNAL lsame, sget06, slansy
230 COMMON / infoc / infot, nunit, ok, lerr
231 COMMON / srnamc / srnamt
234 DATA iseedy / 1988, 1989, 1990, 1991 /
235 DATA uplos /
'U',
'L' /
236 DATA facts /
'F',
'N',
'E' /
237 DATA equeds /
'N',
'Y' /
243 path( 1: 1 ) =
'Single precision'
249 iseed( i ) = iseedy( i )
255 $
CALL serrvx( path, nout )
275 DO 120 imat = 1, nimat
279 IF( .NOT.dotype( imat ) )
284 zerot = imat.GE.3 .AND. imat.LE.5
285 IF( zerot .AND. n.LT.imat-2 )
291 uplo = uplos( iuplo )
296 CALL slatb4( path, imat, n, n,
TYPE, KL, KU, ANORM, MODE,
300 CALL slatms( n, n, dist, iseed,
TYPE, RWORK, MODE,
301 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
307 CALL alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
308 $ -1, -1, imat, nfail, nerrs, nout )
318 ELSE IF( imat.EQ.4 )
THEN
323 ioff = ( izero-1 )*lda
327 IF( iuplo.EQ.1 )
THEN
328 DO 20 i = 1, izero - 1
338 DO 40 i = 1, izero - 1
353 CALL slacpy( uplo, n, n, a, lda, asav, lda )
356 equed = equeds( iequed )
357 IF( iequed.EQ.1 )
THEN
363 DO 90 ifact = 1, nfact
364 fact = facts( ifact )
365 prefac = lsame( fact,
'F' )
366 nofact = lsame( fact,
'N' )
367 equil = lsame( fact,
'E' )
374 ELSE IF( .NOT.lsame( fact,
'N' ) )
THEN
381 CALL slacpy( uplo, n, n, asav, lda, afac, lda )
382 IF( equil .OR. iequed.GT.1 )
THEN
387 CALL spoequ( n, afac, lda, s, scond, amax,
389 IF( info.EQ.0 .AND. n.GT.0 )
THEN
395 CALL slaqsy( uplo, n, afac, lda, s, scond,
408 anorm = slansy(
'1', uplo, n, afac, lda, rwork )
412 CALL spotrf( uplo, n, afac, lda, info )
416 CALL slacpy( uplo, n, n, afac, lda, a, lda )
417 CALL spotri( uplo, n, a, lda, info )
421 ainvnm = slansy(
'1', uplo, n, a, lda, rwork )
422 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
425 rcondc = ( one / anorm ) / ainvnm
431 CALL slacpy( uplo, n, n, asav, lda, a, lda )
436 CALL slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
437 $ nrhs, a, lda, xact, lda, b, lda,
440 CALL slacpy(
'Full', n, nrhs, b, lda, bsav, lda )
449 CALL slacpy( uplo, n, n, a, lda, afac, lda )
450 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
453 CALL sposv( uplo, n, nrhs, afac, lda, x, lda,
458 IF( info.NE.izero )
THEN
459 CALL alaerh( path,
'SPOSV ', info, izero,
460 $ uplo, n, n, -1, -1, nrhs, imat,
461 $ nfail, nerrs, nout )
463 ELSE IF( info.NE.0 )
THEN
470 CALL spot01( uplo, n, a, lda, afac, lda, rwork,
475 CALL slacpy(
'Full', n, nrhs, b, lda, work,
477 CALL spot02( uplo, n, nrhs, a, lda, x, lda,
478 $ work, lda, rwork, result( 2 ) )
482 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
490 IF( result( k ).GE.thresh )
THEN
491 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
492 $
CALL aladhd( nout, path )
493 WRITE( nout, fmt = 9999 )
'SPOSV ', uplo,
494 $ n, imat, k, result( k )
505 $
CALL slaset( uplo, n, n, zero, zero, afac, lda )
506 CALL slaset(
'Full', n, nrhs, zero, zero, x, lda )
507 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
512 CALL slaqsy( uplo, n, a, lda, s, scond, amax,
520 CALL sposvx( fact, uplo, n, nrhs, a, lda, afac,
521 $ lda, equed, s, b, lda, x, lda, rcond,
522 $ rwork, rwork( nrhs+1 ), work, iwork,
527 IF( info.NE.izero )
THEN
528 CALL alaerh( path,
'SPOSVX', info, izero,
529 $ fact // uplo, n, n, -1, -1, nrhs,
530 $ imat, nfail, nerrs, nout )
535 IF( .NOT.prefac )
THEN
540 CALL spot01( uplo, n, a, lda, afac, lda,
541 $ rwork( 2*nrhs+1 ), result( 1 ) )
549 CALL slacpy(
'Full', n, nrhs, bsav, lda, work,
551 CALL spot02( uplo, n, nrhs, asav, lda, x, lda,
552 $ work, lda, rwork( 2*nrhs+1 ),
557 IF( nofact .OR. ( prefac .AND. lsame( equed,
559 CALL sget04( n, nrhs, x, lda, xact, lda,
560 $ rcondc, result( 3 ) )
562 CALL sget04( n, nrhs, x, lda, xact, lda,
563 $ roldc, result( 3 ) )
569 CALL spot05( uplo, n, nrhs, asav, lda, b, lda,
570 $ x, lda, xact, lda, rwork,
571 $ rwork( nrhs+1 ), result( 4 ) )
579 result( 6 ) = sget06( rcond, rcondc )
585 IF( result( k ).GE.thresh )
THEN
586 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
587 $
CALL aladhd( nout, path )
589 WRITE( nout, fmt = 9997 )
'SPOSVX', fact,
590 $ uplo, n, equed, imat, k, result( k )
592 WRITE( nout, fmt = 9998 )
'SPOSVX', fact,
593 $ uplo, n, imat, k, result( k )
607 CALL alasvm( path, nout, nfail, nrun, nerrs )
609 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
610 $
', test(', i1,
')=', g12.5 )
611 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
612 $
', type ', i1,
', test(', i1,
')=', g12.5 )
613 9997
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
614 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
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 slarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
SLARHS
subroutine spot01(UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID)
SPOT01
subroutine spot05(UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
SPOT05
subroutine sdrvpo(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX, A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK, RWORK, IWORK, NOUT)
SDRVPO
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 spotrf(UPLO, N, A, LDA, INFO)
SPOTRF
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 slaqsy(UPLO, N, A, LDA, S, SCOND, AMAX, EQUED)
SLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by 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 sget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
SGET04
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine spoequ(N, A, LDA, S, SCOND, AMAX, INFO)
SPOEQU
subroutine serrvx(PATH, NUNIT)
SERRVX
subroutine spot02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
SPOT02
subroutine spotri(UPLO, N, A, LDA, INFO)
SPOTRI
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 ...