1 SUBROUTINE ddrvac( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
10 INTEGER nmax, nm, nns, nout
11 DOUBLE PRECISION thresh
15 INTEGER mval( * ), nsval( * )
17 DOUBLE PRECISION a( * ), afac( * ), b( * ),
18 $ rwork( * ), work( * ), x( * )
78 DOUBLE PRECISION one, zero
79 parameter( one = 1.0d+0, zero = 0.0d+0 )
81 parameter( ntypes = 9 )
83 parameter( ntests = 1 )
87 CHARACTER dist, type,
uplo, xtype
89 INTEGER i, im, imat, info, ioff, irhs, iuplo,
90 $ izero, kl, ku, lda, mode, n,
91 $ nerrs, nfail, nimat, nrhs, nrun
92 DOUBLE PRECISION anorm, cndnum
96 INTEGER iseed( 4 ), iseedy( 4 )
97 DOUBLE PRECISION result( ntests )
112 INTRINSIC dble,
max, sqrt
120 common / infoc / infot, nunit, ok, lerr
121 common / srnamc / srnamt
124 DATA iseedy / 1988, 1989, 1990, 1991 /
125 DATA uplos /
'U',
'L' /
132 path( 1: 1 ) =
'Double precision'
138 iseed( i ) = iseedy( i )
152 DO 110 imat = 1, nimat
156 IF( .NOT.dotype( imat ) )
161 zerot = imat.GE.3 .AND. imat.LE.5
162 IF( zerot .AND. n.LT.imat-2 )
168 uplo = uplos( iuplo )
173 CALL
dlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
177 CALL
dlatms( n, n, dist, iseed, type, rwork, mode,
178 $ cndnum, anorm, kl, ku,
uplo, a, lda, work,
184 CALL
alaerh( path,
'DLATMS', info, 0,
uplo, n, n, -1,
185 $ -1, -1, imat, nfail, nerrs, nout )
195 ELSE IF( imat.EQ.4 )
THEN
200 ioff = ( izero-1 )*lda
204 IF( iuplo.EQ.1 )
THEN
205 DO 20 i = 1, izero - 1
215 DO 40 i = 1, izero - 1
235 CALL
dlarhs( path, xtype,
uplo,
' ', n, n, kl, ku,
236 $ nrhs, a, lda, x, lda, b, lda,
245 CALL dlacpy(
'All', n, n, a, lda, afac, lda)
247 CALL dsposv(
uplo, n, nrhs, afac, lda, b, lda, x, lda,
248 $ work, swork, iter, info )
251 CALL dlacpy(
'All', n, n, a, lda, afac, lda )
256 IF( info.NE.izero )
THEN
258 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
259 $ CALL
alahd( nout, path )
262 IF( info.NE.izero .AND. izero.NE.0 )
THEN
263 WRITE( nout, fmt = 9988 )
'DSPOSV',info,izero,n,
266 WRITE( nout, fmt = 9975 )
'DSPOSV',info,n,imat
277 CALL dlacpy(
'All', n, nrhs, b, lda, work, lda )
279 CALL
dpot06(
uplo, n, nrhs, a, lda, x, lda, work,
280 $ lda, rwork, result( 1 ) )
294 IF ((thresh.LE.0.0e+00)
295 $ .OR.((iter.GE.0).AND.(n.GT.0)
296 $ .AND.(result(1).GE.sqrt(dble(n))))
297 $ .OR.((iter.LT.0).AND.(result(1).GE.thresh)))
THEN
299 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
THEN
300 WRITE( nout, fmt = 8999 )
'DPO'
301 WRITE( nout, fmt =
'( '' Matrix types:'' )' )
302 WRITE( nout, fmt = 8979 )
303 WRITE( nout, fmt =
'( '' Test ratios:'' )' )
304 WRITE( nout, fmt = 8960 )1
305 WRITE( nout, fmt =
'( '' Messages:'' )' )
308 WRITE( nout, fmt = 9998 )
uplo, n, nrhs, imat, 1,
326 IF( nfail.GT.0 )
THEN
327 WRITE( nout, fmt = 9996 )
'DSPOSV', nfail, nrun
329 WRITE( nout, fmt = 9995 )
'DSPOSV', nrun
331 IF( nerrs.GT.0 )
THEN
332 WRITE( nout, fmt = 9994 )nerrs
335 9998
format(
' UPLO=''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
336 $ i2,
', test(', i2,
') =', g12.5 )
337 9996
format( 1x, a6,
': ', i6,
' out of ', i6,
338 $
' tests failed to pass the threshold' )
339 9995
format( /1x,
'All tests for ', a6,
340 $
' routines passed the threshold (', i6,
' tests run)' )
341 9994
format( 6x, i6,
' error messages recorded' )
345 9988
format(
' *** ', a6,
' returned with INFO =', i5,
' instead of ',
346 $ i5, /
' ==> N =', i5,
', type ',
351 9975
format(
' *** Error code from ', a6,
'=', i5,
' for M=', i5,
353 8999
format( / 1x, a3,
': positive definite dense matrices' )
354 8979
format( 4x,
'1. Diagonal', 24x,
'7. Last n/2 columns zero', / 4x,
355 $
'2. Upper triangular', 16x,
356 $
'8. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
357 $
'3. Lower triangular', 16x,
'9. Random, CNDNUM = 0.1/EPS',
358 $ / 4x,
'4. Random, CNDNUM = 2', 13x,
359 $
'10. Scaled near underflow', / 4x,
'5. First column zero',
360 $ 14x,
'11. Scaled near overflow', / 4x,
361 $
'6. Last column zero' )
362 8960
format( 3x, i2,
': norm_1( B - A * X ) / ',
363 $
'( norm_1(A) * norm_1(X) * EPS * SQRT(N) ) > 1 if ITERREF',
364 $ / 4x,
'or norm_1( B - A * X ) / ',
365 $
'( norm_1(A) * norm_1(X) * EPS ) > THRES if DPOTRF' )