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 )
212 DOUBLE PRECISION DGET06, DLANSY
213 EXTERNAL lsame, dget06, dlansy
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,
') =',
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine dlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine dlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
DLARHS
subroutine dpotrf(UPLO, N, A, LDA, INFO)
DPOTRF
subroutine ddrvpo(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX, A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK, RWORK, IWORK, NOUT)
DDRVPO
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dposv(UPLO, N, NRHS, A, LDA, B, LDB, INFO)
DPOSV computes the solution to system of linear equations A * X = B for PO matrices ...
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine dlaqsy(UPLO, N, A, LDA, S, SCOND, AMAX, EQUED)
DLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by spoequ.
subroutine dlatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
DLATB4
subroutine dget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
DGET04
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine derrvx(PATH, NUNIT)
DERRVX
subroutine dpot01(UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID)
DPOT01
subroutine dpot05(UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
DPOT05
subroutine dposvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO)
DPOSVX computes the solution to system of linear equations A * X = B for PO matrices ...
subroutine dlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
DLATMS
subroutine dpoequ(N, A, LDA, S, SCOND, AMAX, INFO)
DPOEQU
subroutine dpot02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
DPOT02
subroutine dpotri(UPLO, N, A, LDA, INFO)
DPOTRI