163 SUBROUTINE ddrvpo( 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
175 DOUBLE PRECISION thresh
179 INTEGER iwork( * ), nval( * )
180 DOUBLE PRECISION a( * ), afac( * ), asav( * ), b( * ),
181 $ bsav( * ), rwork( * ), s( * ), work( * ),
188 DOUBLE PRECISION one, zero
189 parameter( one = 1.0d+0, zero = 0.0d+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 DOUBLE PRECISION ainvnm, amax, anorm, cndnum, rcond, rcondc,
206 CHARACTER equeds( 2 ), facts( 3 ), uplos( 2 )
207 INTEGER iseed( 4 ), iseedy( 4 )
208 DOUBLE PRECISION result( ntests )
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 ) =
'Double precision'
249 iseed( i ) = iseedy( i )
255 $ CALL
derrvx( 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
dlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
300 CALL
dlatms( n, n, dist, iseed, type, rwork, mode,
301 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
307 CALL
alaerh( path,
'DLATMS', 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
dlacpy( 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
dlacpy( uplo, n, n, asav, lda, afac, lda )
382 IF( equil .OR. iequed.GT.1 )
THEN
387 CALL
dpoequ( n, afac, lda, s, scond, amax,
389 IF( info.EQ.0 .AND. n.GT.0 )
THEN
395 CALL
dlaqsy( uplo, n, afac, lda, s, scond,
408 anorm =
dlansy(
'1', uplo, n, afac, lda, rwork )
412 CALL
dpotrf( uplo, n, afac, lda, info )
416 CALL
dlacpy( uplo, n, n, afac, lda, a, lda )
417 CALL
dpotri( uplo, n, a, lda, info )
421 ainvnm =
dlansy(
'1', uplo, n, a, lda, rwork )
422 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
425 rcondc = ( one / anorm ) / ainvnm
431 CALL
dlacpy( uplo, n, n, asav, lda, a, lda )
436 CALL
dlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
437 $ nrhs, a, lda, xact, lda, b, lda,
440 CALL
dlacpy(
'Full', n, nrhs, b, lda, bsav, lda )
449 CALL
dlacpy( uplo, n, n, a, lda, afac, lda )
450 CALL
dlacpy(
'Full', n, nrhs, b, lda, x, lda )
453 CALL
dposv( uplo, n, nrhs, afac, lda, x, lda,
458 IF( info.NE.izero )
THEN
459 CALL
alaerh( path,
'DPOSV ', info, izero,
460 $ uplo, n, n, -1, -1, nrhs, imat,
461 $ nfail, nerrs, nout )
463 ELSE IF( info.NE.0 )
THEN
470 CALL
dpot01( uplo, n, a, lda, afac, lda, rwork,
475 CALL
dlacpy(
'Full', n, nrhs, b, lda, work,
477 CALL
dpot02( uplo, n, nrhs, a, lda, x, lda,
478 $ work, lda, rwork, result( 2 ) )
482 CALL
dget04( 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 )
'DPOSV ', uplo,
494 $ n, imat, k, result( k )
505 $ CALL
dlaset( uplo, n, n, zero, zero, afac, lda )
506 CALL
dlaset(
'Full', n, nrhs, zero, zero, x, lda )
507 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
512 CALL
dlaqsy( uplo, n, a, lda, s, scond, amax,
520 CALL
dposvx( 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,
'DPOSVX', info, izero,
529 $ fact // uplo, n, n, -1, -1, nrhs,
530 $ imat, nfail, nerrs, nout )
535 IF( .NOT.prefac )
THEN
540 CALL
dpot01( uplo, n, a, lda, afac, lda,
541 $ rwork( 2*nrhs+1 ), result( 1 ) )
549 CALL
dlacpy(
'Full', n, nrhs, bsav, lda, work,
551 CALL
dpot02( uplo, n, nrhs, asav, lda, x, lda,
552 $ work, lda, rwork( 2*nrhs+1 ),
557 IF( nofact .OR. ( prefac .AND.
lsame( equed,
559 CALL
dget04( n, nrhs, x, lda, xact, lda,
560 $ rcondc, result( 3 ) )
562 CALL
dget04( n, nrhs, x, lda, xact, lda,
563 $ roldc, result( 3 ) )
569 CALL
dpot05( uplo, n, nrhs, asav, lda, b, lda,
570 $ x, lda, xact, lda, rwork,
571 $ rwork( nrhs+1 ), result( 4 ) )
579 result( 6 ) =
dget06( 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 )
'DPOSVX', fact,
590 $ uplo, n, equed, imat, k, result( k )
592 WRITE( nout, fmt = 9998 )
'DPOSVX', 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,
') =',