148 SUBROUTINE ddrvab( DOTYPE, NM, MVAL, NNS,
149 $ NSVAL, THRESH, NMAX, A, AFAC, B,
150 $ X, WORK, RWORK, SWORK, IWORK, NOUT )
157 INTEGER NM, NMAX, NNS, NOUT
162 INTEGER MVAL( * ), NSVAL( * ), IWORK( * )
164 DOUBLE PRECISION A( * ), AFAC( * ), B( * ),
165 $ rwork( * ), work( * ), x( * )
172 PARAMETER ( ZERO = 0.0d+0 )
174 parameter( ntypes = 11 )
176 parameter( ntests = 1 )
180 CHARACTER DIST, TRANS,
TYPE, XTYPE
182 INTEGER I, IM, IMAT, INFO, IOFF, ,
183 $ izero, kl, ku, lda, m, mode, n,
184 $ nerrs, nfail, nimat, nrhs, nrun
185 DOUBLE PRECISION ANORM, CNDNUM
188 INTEGER ISEED( 4 ), ISEEDY( 4 )
189 DOUBLE PRECISION RESULT( NTESTS )
199 INTRINSIC dble,
max,
min, sqrt
207 COMMON / infoc / infot, nunit, ok, lerr
208 COMMON / srnamc / srnamt
211 DATA iseedy / 2006, 2007, 2008, 2009 /
218 path( 1: 1 ) =
'Double precision'
224 iseed( i ) = iseedy( i )
237 IF( m.LE.0 .OR. n.LE.0 )
240 DO 100 imat = 1, nimat
244 IF( .NOT.dotype( imat ) )
249 zerot = imat.GE.5 .AND. imat.LE.7
256 CALL dlatb4( path, imat, m, n,
TYPE, kl, ku, anorm, mode,
260 CALL dlatms( m, n, dist, iseed,
TYPE, rwork, mode,
261 $ cndnum, anorm, kl, ku,
'No packing', a, lda,
267 CALL alaerh( path,
'DLATMS', info, 0,
' ', m, n, -1,
268 $ -1, -1, imat, nfail, nerrs, nout )
278 ELSE IF( imat.EQ.6 )
THEN
281 izero =
min( m, n ) / 2 + 1
283 ioff = ( izero-1 )*lda
289 CALL dlaset(
'Full', m, n-izero+1, zero, zero,
302 CALL dlarhs( path, xtype,
' ', trans, n, n, kl,
303 $ ku, nrhs, a, lda, x, lda, b,
310 CALL dlacpy(
'Full', m, n, a, lda, afac, lda )
312 CALL dsgesv( n, nrhs, a, lda, iwork, b, lda, x, lda,
313 $ work, swork, iter, info)
316 CALL dlacpy(
'Full', m, n, afac, lda, a, lda )
322 IF( info.NE.izero )
THEN
324 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
325 $
CALL alahd( nout, path )
328 IF( info.NE.izero .AND. izero.NE.0 )
THEN
329 WRITE( nout, fmt = 9988 )
'DSGESV',info,
332 WRITE( nout, fmt = 9975 )
'DSGESV',info,
344 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
346 CALL dget08( trans, n, n, nrhs, a, lda, x, lda, work,
347 $ lda, rwork, result( 1 ) )
361 IF ((thresh.LE.0.0e+00)
362 $ .OR.((iter.GE.0).AND.(n.GT.0)
363 $ .AND.(result(1).GE.sqrt(dble(n))))
364 $ .OR.((iter.LT.0).AND.(result(1).GE.thresh)))
THEN
366 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
THEN
367 WRITE( nout, fmt = 8999 )
'DGE'
368 WRITE( nout, fmt =
'( '' Matrix types:'' )' )
369 WRITE( nout, fmt = 8979 )
370 WRITE( nout, fmt = '(
'' test ratios:
'' )
' )
371 WRITE( NOUT, FMT = 8960 )1
372 WRITE( NOUT, FMT = '(
'' messages:
'' )
' )
375 WRITE( NOUT, FMT = 9998 )TRANS, N, NRHS,
376 $ IMAT, 1, RESULT( 1 )
386.GT.
IF( NFAIL0 ) THEN
387 WRITE( NOUT, FMT = 9996 )'dsgesv', NFAIL, NRUN
389 WRITE( NOUT, FMT = 9995 )'dsgesv', NRUN
391.GT.
IF( NERRS0 ) THEN
392 WRITE( NOUT, FMT = 9994 )NERRS
395 9998 FORMAT( ' trans=
''', A1, ''', n =
', I5, ', nrhs=
', I3, ',
type ',
396 $ I2, ', test(
', I2, ') =
', G12.5 )
397 9996 FORMAT( 1X, A6, ':
', I6, ' out of
', I6,
398 $ ' tests failed to pass
the threshold
' )
399 9995 FORMAT( /1X, 'all tests
for ', A6,
400 $ ' routines passed
the threshold(
', I6, ' tests run)
' )
401 9994 FORMAT( 6X, I6, ' error messages recorded
' )
405 9988 FORMAT( ' ***
', A6, ' returned with info =
', I5, ' instead of
',
406 $ I5, / ' ==> m =
', I5, ',
type ',
411 9975 FORMAT( ' *** error code from
', A6, '=
', I5, ' for m=
', I5,
413 8999 FORMAT( / 1X, A3, ': general dense matrices
' )
414 8979 FORMAT( 4X, '1. diagonal
', 24X, '7. last n/2 columns zero
', / 4X,
415 $ '2. upper triangular
', 16X,
416 $ '8. random, cndnum = sqrt(0.1/eps)
', / 4X,
417 $ '3. lower triangular
', 16X, '9. random, cndnum
',
418 $ / 4X, '4. random, cndnum = 2
', 13X,
419 $ '10. scaled near underflow
', / 4X, '5. first column zero
',
420 $ 14X, '11. scaled near overflow
', / 4X,
421 $ '6. last column zero
' )
422 8960 FORMAT( 3X, I2, ': norm_1( b - a * x ) /
',
423 $ '( norm_1(a) * norm_1(x) * eps * sqrt(n) ) > 1
if iterref
',
424 $ / 4x, 'or norm_1( b - a * x ) /
',
425 $ '( norm_1(a) * norm_1(x) * eps ) >
thres if dgetrf' )
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine dsgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, iter, info)
DSGESV computes the solution to system of linear equations A * X = B for GE matrices (mixed precision...
subroutine dlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
DLARHS
subroutine ddrvab(dotype, nm, mval, nns, nsval, thresh, nmax, a, afac, b, x, work, rwork, swork, iwork, nout)
DDRVAB
subroutine dlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
DLATMS