141 SUBROUTINE ddrvac( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
142 $ A, AFAC, B, X, WORK,
143 $ RWORK, SWORK, NOUT )
150 INTEGER NMAX, NM, NNS, NOUT
151 DOUBLE PRECISION THRESH
155 INTEGER MVAL( * ), NSVAL( * )
157 DOUBLE PRECISION A( * ), AFAC( * ), B( * ),
158 $ rwork( * ), work( * ), x( * )
164 DOUBLE PRECISION ZERO
165 PARAMETER ( ZERO = 0.0d+0 )
167 parameter( ntypes = 9 )
169 parameter( ntests = 1 )
173 CHARACTER DIST,
TYPE, UPLO, XTYPE
175 INTEGER I, IM, IMAT, INFO, IOFF, IRHS, IUPLO,
176 $ izero, kl, ku, lda, mode, n,
177 $ nerrs, nfail, nimat, nrhs, nrun
178 DOUBLE PRECISION ANORM, CNDNUM
182 INTEGER ISEED( 4 ), ISEEDY( 4 )
183 DOUBLE PRECISION RESULT( NTESTS )
198 INTRINSIC dble, max, sqrt
206 COMMON / infoc / infot, nunit, ok, lerr
207 COMMON / srnamc / srnamt
210 DATA iseedy / 1988, 1989, 1990, 1991 /
211 DATA uplos /
'U',
'L' /
218 path( 1: 1 ) =
'Double precision'
224 iseed( i ) = iseedy( i )
238 DO 110 imat = 1, nimat
242 IF( .NOT.dotype( imat ) )
247 zerot = imat.GE.3 .AND. imat.LE.5
248 IF( zerot .AND. n.LT.imat-2 )
254 uplo = uplos( iuplo )
259 CALL dlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
263 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
264 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
270 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
271 $ -1, -1, imat, nfail, nerrs, nout )
281 ELSE IF( imat.EQ.4 )
THEN
286 ioff = ( izero-1 )*lda
290 IF( iuplo.EQ.1 )
THEN
291 DO 20 i = 1, izero - 1
301 DO 40 i = 1, izero - 1
321 CALL dlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
322 $ nrhs, a, lda, x, lda, b, lda,
331 CALL dlacpy(
'All', n, n, a, lda, afac, lda)
333 CALL dsposv( uplo, n, nrhs, afac, lda, b, lda, x, lda,
334 $ work, swork, iter, info )
337 CALL dlacpy(
'All', n, n, a, lda, afac, lda )
342 IF( info.NE.izero )
THEN
344 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
345 $
CALL alahd( nout, path )
348 IF( info.NE.izero .AND. izero.NE.0 )
THEN
349 WRITE( nout, fmt = 9988 )
'DSPOSV',info,izero,n,
352 WRITE( nout, fmt = 9975 )
'DSPOSV',info,n,imat
363 CALL dlacpy(
'All', n, nrhs, b, lda, work, lda )
365 CALL dpot06( uplo, n, nrhs, a, lda, x, lda, work,
366 $ lda, rwork, result( 1 ) )
380 IF ((thresh.LE.0.0e+00)
381 $ .OR.((iter.GE.0).AND.(n.GT.0)
382 $ .AND.(result(1).GE.sqrt(dble(n))))
383 $ .OR.((iter.LT.0).AND.(result(1).GE.thresh)))
THEN
385 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
THEN
386 WRITE( nout, fmt = 8999 )
'DPO'
387 WRITE( nout, fmt =
'( '' Matrix types:'' )' )
388 WRITE( nout, fmt = 8979 )
389 WRITE( nout, fmt =
'( '' Test ratios:'' )' )
390 WRITE( nout, fmt = 8960 )1
391 WRITE( nout, fmt =
'( '' Messages:'' )' )
394 WRITE( nout, fmt = 9998 )uplo, n, nrhs, imat, 1,
410 IF( nfail.GT.0 )
THEN
411 WRITE( nout, fmt = 9996 )
'DSPOSV', nfail, nrun
413 WRITE( nout, fmt = 9995 )
'DSPOSV', nrun
415 IF( nerrs.GT.0 )
THEN
416 WRITE( nout, fmt = 9994 )nerrs
419 9998
FORMAT(
' UPLO=''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
420 $ i2,
', test(', i2,
') =', g12.5 )
421 9996
FORMAT( 1x, a6,
': ', i6,
' out of ', i6,
422 $
' tests failed to pass the threshold' )
423 9995
FORMAT( /1x,
'All tests for ', a6,
424 $
' routines passed the threshold ( ', i6,
' tests run)' )
425 9994
FORMAT( 6x, i6,
' error messages recorded' )
429 9988
FORMAT(
' *** ', a6,
' returned with INFO =', i5,
' instead of ',
430 $ i5, /
' ==> N =', i5,
', type ',
435 9975
FORMAT(
' *** Error code from ', a6,
'=', i5,
' for M=', i5,
437 8999
FORMAT( / 1x, a3,
': positive definite dense matrices' )
438 8979
FORMAT( 4x,
'1. Diagonal', 24x,
'7. Last n/2 columns zero', / 4x,
439 $
'2. Upper triangular', 16x,
440 $
'8. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
441 $
'3. Lower triangular', 16x,
'9. Random, CNDNUM = 0.1/EPS',
442 $ / 4x,
'4. Random, CNDNUM = 2', 13x,
443 $
'10. Scaled near underflow', / 4x,
'5. First column zero',
444 $ 14x,
'11. Scaled near overflow', / 4x,
445 $
'6. Last column zero' )
446 8960
FORMAT( 3x, i2,
': norm_1( B - A * X ) / ',
447 $
'( norm_1(A) * norm_1(X) * EPS * SQRT(N) ) > 1 if ITERREF',
448 $ / 4x,
'or norm_1( B - A * X ) / ',
449 $
'( norm_1(A) * norm_1(X) * EPS ) > THRES if DPOTRF' )
subroutine dlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
DLARHS
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine ddrvac(dotype, nm, mval, nns, nsval, thresh, nmax, a, afac, b, x, work, rwork, swork, nout)
DDRVAC
subroutine dlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
DLATB4
subroutine dlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
DLATMS
subroutine dpot06(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
DPOT06
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
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 dsposv(uplo, n, nrhs, a, lda, b, ldb, x, ldx, work, swork, iter, info)
DSPOSV computes the solution to system of linear equations A * X = B for PO matrices