166 SUBROUTINE ddrvpo( 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
178 DOUBLE PRECISION thresh
182 INTEGER iwork( * ), nval( * )
183 DOUBLE PRECISION a( * ), afac( * ), asav( * ), b( * ),
184 $ bsav( * ), rwork( * ), s( * ), work( * ),
191 DOUBLE PRECISION one, zero
192 parameter( one = 1.0d+0, zero = 0.0d+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 DOUBLE PRECISION 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 DOUBLE PRECISION 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 ) =
'Double precision'
254 iseed( i ) = iseedy( i )
260 $ CALL
derrvx( 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
dlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
305 CALL
dlatms( n, n, dist, iseed, type, rwork, mode,
306 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
312 CALL
alaerh( path,
'DLATMS', 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
dlacpy( 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
dlacpy( uplo, n, n, asav, lda, afac, lda )
387 IF( equil .OR. iequed.GT.1 )
THEN
392 CALL
dpoequ( n, afac, lda, s, scond, amax,
394 IF( info.EQ.0 .AND. n.GT.0 )
THEN
400 CALL
dlaqsy( uplo, n, afac, lda, s, scond,
413 anorm =
dlansy(
'1', uplo, n, afac, lda, rwork )
417 CALL
dpotrf( uplo, n, afac, lda, info )
421 CALL
dlacpy( uplo, n, n, afac, lda, a, lda )
422 CALL
dpotri( uplo, n, a, lda, info )
426 ainvnm =
dlansy(
'1', uplo, n, a, lda, rwork )
427 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
430 rcondc = ( one / anorm ) / ainvnm
436 CALL
dlacpy( uplo, n, n, asav, lda, a, lda )
441 CALL
dlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
442 $ nrhs, a, lda, xact, lda, b, lda,
445 CALL
dlacpy(
'Full', n, nrhs, b, lda, bsav, lda )
454 CALL
dlacpy( uplo, n, n, a, lda, afac, lda )
455 CALL
dlacpy(
'Full', n, nrhs, b, lda, x, lda )
458 CALL
dposv( uplo, n, nrhs, afac, lda, x, lda,
463 IF( info.NE.izero )
THEN
464 CALL
alaerh( path,
'DPOSV ', info, izero,
465 $ uplo, n, n, -1, -1, nrhs, imat,
466 $ nfail, nerrs, nout )
468 ELSE IF( info.NE.0 )
THEN
475 CALL
dpot01( uplo, n, a, lda, afac, lda, rwork,
480 CALL
dlacpy(
'Full', n, nrhs, b, lda, work,
482 CALL
dpot02( uplo, n, nrhs, a, lda, x, lda,
483 $ work, lda, rwork, result( 2 ) )
487 CALL
dget04( 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 )
'DPOSV ', uplo,
499 $ n, imat, k, result( k )
510 $ CALL
dlaset( uplo, n, n, zero, zero, afac, lda )
511 CALL
dlaset(
'Full', n, nrhs, zero, zero, x, lda )
512 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
517 CALL
dlaqsy( uplo, n, a, lda, s, scond, amax,
525 CALL
dposvx( 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,
'DPOSVX', info, izero,
534 $ fact // uplo, n, n, -1, -1, nrhs,
535 $ imat, nfail, nerrs, nout )
539 IF( .NOT.prefac )
THEN
544 CALL
dpot01( uplo, n, a, lda, afac, lda,
545 $ rwork( 2*nrhs+1 ), result( 1 ) )
553 CALL
dlacpy(
'Full', n, nrhs, bsav, lda, work,
555 CALL
dpot02( uplo, n, nrhs, asav, lda, x, lda,
556 $ work, lda, rwork( 2*nrhs+1 ),
561 IF( nofact .OR. ( prefac .AND.
lsame( equed,
563 CALL
dget04( n, nrhs, x, lda, xact, lda,
564 $ rcondc, result( 3 ) )
566 CALL
dget04( n, nrhs, x, lda, xact, lda,
567 $ roldc, result( 3 ) )
573 CALL
dpot05( uplo, n, nrhs, asav, lda, b, lda,
574 $ x, lda, xact, lda, rwork,
575 $ rwork( nrhs+1 ), result( 4 ) )
583 result( 6 ) =
dget06( 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 )
'DPOSVX', fact,
594 $ uplo, n, equed, imat, k, result( k )
596 WRITE( nout, fmt = 9998 )
'DPOSVX', fact,
597 $ uplo, n, imat, k, result( k )
608 CALL
dlacpy(
'Full', n, n, asav, lda, a, lda )
609 CALL
dlacpy(
'Full', n, nrhs, bsav, lda, b, lda )
612 $ CALL
dlaset( uplo, n, n, zero, zero, afac, lda )
613 CALL
dlaset(
'Full', n, nrhs, zero, zero, x, lda )
614 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
619 CALL
dlaqsy( uplo, n, a, lda, s, scond, amax,
628 CALL
dposvxx( 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,
'DPOSVXX', info, izero,
639 $ fact // uplo, n, n, -1, -1, nrhs,
640 $ imat, nfail, nerrs, nout )
645 IF( .NOT.prefac )
THEN
650 CALL
dpot01( uplo, n, a, lda, afac, lda,
651 $ rwork( 2*nrhs+1 ), result( 1 ) )
659 CALL
dlacpy(
'Full', n, nrhs, bsav, lda, work,
661 CALL
dpot02( uplo, n, nrhs, asav, lda, x, lda,
662 $ work, lda, rwork( 2*nrhs+1 ),
667 IF( nofact .OR. ( prefac .AND.
lsame( equed,
669 CALL
dget04( n, nrhs, x, lda, xact, lda,
670 $ rcondc, result( 3 ) )
672 CALL
dget04( n, nrhs, x, lda, xact, lda,
673 $ roldc, result( 3 ) )
679 CALL
dpot05( uplo, n, nrhs, asav, lda, b, lda,
680 $ x, lda, xact, lda, rwork,
681 $ rwork( nrhs+1 ), result( 4 ) )
689 result( 6 ) =
dget06( 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 )
'DPOSVXX', fact,
700 $ uplo, n, equed, imat, k, result( k )
702 WRITE( nout, fmt = 9998 )
'DPOSVXX', 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,
') =',