166 SUBROUTINE sdrvpo( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
167 $ a, afac, asav, b, bsav, x, xact, s, work,
168 $ rwork, iwork, nout )
177 INTEGER nmax, nn, nout, nrhs
182 INTEGER iwork( * ), nval( * )
183 REAL a( * ), afac( * ), asav( * ), b( * ),
184 $ bsav( * ), rwork( * ), s( * ), work( * ),
192 parameter( one = 1.0e+0, zero = 0.0e+0 )
194 parameter( ntypes = 9 )
196 parameter( ntests = 6 )
199 LOGICAL equil, nofact, prefac, zerot
200 CHARACTER dist, equed, fact, type, uplo, xtype
202 INTEGER i, iequed, ifact, imat, in, info, ioff, iuplo,
203 $ izero, k, k1, kl, ku, lda, mode, n, nb, nbmin,
204 $ nerrs, nfact, nfail, nimat, nrun, nt,
206 REAL ainvnm, amax, anorm, cndnum, rcond, rcondc,
207 $ roldc, scond, rpvgrw_svxx
210 CHARACTER equeds( 2 ), facts( 3 ), uplos( 2 )
211 INTEGER iseed( 4 ), iseedy( 4 )
212 REAL result( ntests ), berr( nrhs ),
213 $ errbnds_n( nrhs, 3 ), errbnds_c( nrhs, 3 )
235 common / infoc / infot, nunit, ok, lerr
236 common / srnamc / srnamt
239 DATA iseedy / 1988, 1989, 1990, 1991 /
240 DATA uplos /
'U',
'L' /
241 DATA facts /
'F',
'N',
'E' /
242 DATA equeds /
'N',
'Y' /
248 path( 1: 1 ) =
'Single precision'
254 iseed( i ) = iseedy( i )
260 $ CALL
serrvx( path, nout )
280 DO 120 imat = 1, nimat
284 IF( .NOT.dotype( imat ) )
289 zerot = imat.GE.3 .AND. imat.LE.5
290 IF( zerot .AND. n.LT.imat-2 )
296 uplo = uplos( iuplo )
301 CALL
slatb4( path, imat, n, n, type, kl, ku, anorm, mode,
305 CALL
slatms( n, n, dist, iseed, type, rwork, mode,
306 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
312 CALL
alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
313 $ -1, -1, imat, nfail, nerrs, nout )
323 ELSE IF( imat.EQ.4 )
THEN
328 ioff = ( izero-1 )*lda
332 IF( iuplo.EQ.1 )
THEN
333 DO 20 i = 1, izero - 1
343 DO 40 i = 1, izero - 1
358 CALL
slacpy( uplo, n, n, a, lda, asav, lda )
361 equed = equeds( iequed )
362 IF( iequed.EQ.1 )
THEN
368 DO 90 ifact = 1, nfact
369 fact = facts( ifact )
370 prefac =
lsame( fact,
'F' )
371 nofact =
lsame( fact,
'N' )
372 equil =
lsame( fact,
'E' )
379 ELSE IF( .NOT.
lsame( fact,
'N' ) )
THEN
386 CALL
slacpy( uplo, n, n, asav, lda, afac, lda )
387 IF( equil .OR. iequed.GT.1 )
THEN
392 CALL
spoequ( n, afac, lda, s, scond, amax,
394 IF( info.EQ.0 .AND. n.GT.0 )
THEN
400 CALL
slaqsy( uplo, n, afac, lda, s, scond,
413 anorm =
slansy(
'1', uplo, n, afac, lda, rwork )
417 CALL
spotrf( uplo, n, afac, lda, info )
421 CALL
slacpy( uplo, n, n, afac, lda, a, lda )
422 CALL
spotri( uplo, n, a, lda, info )
426 ainvnm =
slansy(
'1', uplo, n, a, lda, rwork )
427 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
430 rcondc = ( one / anorm ) / ainvnm
436 CALL
slacpy( uplo, n, n, asav, lda, a, lda )
441 CALL
slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
442 $ nrhs, a, lda, xact, lda, b, lda,
445 CALL
slacpy(
'Full', n, nrhs, b, lda, bsav, lda )
454 CALL
slacpy( uplo, n, n, a, lda, afac, lda )
455 CALL
slacpy(
'Full', n, nrhs, b, lda, x, lda )
458 CALL
sposv( uplo, n, nrhs, afac, lda, x, lda,
463 IF( info.NE.izero )
THEN
464 CALL
alaerh( path,
'SPOSV ', info, izero,
465 $ uplo, n, n, -1, -1, nrhs, imat,
466 $ nfail, nerrs, nout )
468 ELSE IF( info.NE.0 )
THEN
475 CALL
spot01( uplo, n, a, lda, afac, lda, rwork,
480 CALL
slacpy(
'Full', n, nrhs, b, lda, work,
482 CALL
spot02( uplo, n, nrhs, a, lda, x, lda,
483 $ work, lda, rwork, result( 2 ) )
487 CALL
sget04( n, nrhs, x, lda, xact, lda, rcondc,
495 IF( result( k ).GE.thresh )
THEN
496 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
497 $ CALL
aladhd( nout, path )
498 WRITE( nout, fmt = 9999 )
'SPOSV ', uplo,
499 $ n, imat, k, result( k )
510 $ CALL
slaset( uplo, n, n, zero, zero, afac, lda )
511 CALL
slaset(
'Full', n, nrhs, zero, zero, x, lda )
512 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
517 CALL
slaqsy( uplo, n, a, lda, s, scond, amax,
525 CALL
sposvx( fact, uplo, n, nrhs, a, lda, afac,
526 $ lda, equed, s, b, lda, x, lda, rcond,
527 $ rwork, rwork( nrhs+1 ), work, iwork,
533 $ CALL
alaerh( path,
'SPOSVX', info, izero,
534 $ fact // uplo, n, n, -1, -1, nrhs,
535 $ imat, nfail, nerrs, nout )
539 IF( .NOT.prefac )
THEN
544 CALL
spot01( uplo, n, a, lda, afac, lda,
545 $ rwork( 2*nrhs+1 ), result( 1 ) )
553 CALL
slacpy(
'Full', n, nrhs, bsav, lda, work,
555 CALL
spot02( uplo, n, nrhs, asav, lda, x, lda,
556 $ work, lda, rwork( 2*nrhs+1 ),
561 IF( nofact .OR. ( prefac .AND.
lsame( equed,
563 CALL
sget04( n, nrhs, x, lda, xact, lda,
564 $ rcondc, result( 3 ) )
566 CALL
sget04( n, nrhs, x, lda, xact, lda,
567 $ roldc, result( 3 ) )
573 CALL
spot05( uplo, n, nrhs, asav, lda, b, lda,
574 $ x, lda, xact, lda, rwork,
575 $ rwork( nrhs+1 ), result( 4 ) )
583 result( 6 ) =
sget06( rcond, rcondc )
589 IF( result( k ).GE.thresh )
THEN
590 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
591 $ CALL
aladhd( nout, path )
593 WRITE( nout, fmt = 9997 )
'SPOSVX', fact,
594 $ uplo, n, equed, imat, k, result( k )
596 WRITE( nout, fmt = 9998 )
'SPOSVX', fact,
597 $ uplo, n, imat, k, result( k )
608 CALL
slacpy(
'Full', n, n, asav, lda, a, lda )
609 CALL
slacpy(
'Full', n, nrhs, bsav, lda, b, lda )
612 $ CALL
slaset( uplo, n, n, zero, zero, afac, lda )
613 CALL
slaset(
'Full', n, nrhs, zero, zero, x, lda )
614 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
619 CALL
slaqsy( uplo, n, a, lda, s, scond, amax,
628 CALL
sposvxx( fact, uplo, n, nrhs, a, lda, afac,
629 $ lda, equed, s, b, lda, x,
630 $ lda, rcond, rpvgrw_svxx, berr, n_err_bnds,
631 $ errbnds_n, errbnds_c, 0, zero, work,
636 IF( info.EQ.n+1 ) goto 90
637 IF( info.NE.izero )
THEN
638 CALL
alaerh( path,
'SPOSVXX', info, izero,
639 $ fact // uplo, n, n, -1, -1, nrhs,
640 $ imat, nfail, nerrs, nout )
645 IF( .NOT.prefac )
THEN
650 CALL
spot01( uplo, n, a, lda, afac, lda,
651 $ rwork( 2*nrhs+1 ), result( 1 ) )
659 CALL
slacpy(
'Full', n, nrhs, bsav, lda, work,
661 CALL
spot02( uplo, n, nrhs, asav, lda, x, lda,
662 $ work, lda, rwork( 2*nrhs+1 ),
667 IF( nofact .OR. ( prefac .AND.
lsame( equed,
669 CALL
sget04( n, nrhs, x, lda, xact, lda,
670 $ rcondc, result( 3 ) )
672 CALL
sget04( n, nrhs, x, lda, xact, lda,
673 $ roldc, result( 3 ) )
679 CALL
spot05( uplo, n, nrhs, asav, lda, b, lda,
680 $ x, lda, xact, lda, rwork,
681 $ rwork( nrhs+1 ), result( 4 ) )
689 result( 6 ) =
sget06( rcond, rcondc )
695 IF( result( k ).GE.thresh )
THEN
696 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
697 $ CALL
aladhd( nout, path )
699 WRITE( nout, fmt = 9997 )
'SPOSVXX', fact,
700 $ uplo, n, equed, imat, k, result( k )
702 WRITE( nout, fmt = 9998 )
'SPOSVXX', fact,
703 $ uplo, n, imat, k, result( k )
717 CALL
alasvm( path, nout, nfail, nrun, nerrs )
724 9999 format( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
725 $
', test(', i1,
')=', g12.5 )
726 9998 format( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
727 $
', type ', i1,
', test(', i1,
')=', g12.5 )
728 9997 format( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
729 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',