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
158 DOUBLE PRECISION THRESH
162 INTEGER MVAL( * ), NSVAL( * ), IWORK( * )
164 DOUBLE PRECISION A( * ), AFAC( * ), B( * ),
165 $ rwork( * ), work( * ), x( * )
171 DOUBLE PRECISION ZERO
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, IRHS,
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
250 IF( zerot .AND. n.LT.imat-4 )
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 IF( nfail.GT.0 )
THEN
387 WRITE( nout, fmt = 9996 )
'DSGESV', nfail, nrun
389 WRITE( nout, fmt = 9995 )
'DSGESV', nrun
391 IF( nerrs.GT.0 )
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 = 0.1/EPS',
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 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 ddrvab(dotype, nm, mval, nns, nsval, thresh, nmax, a, afac, b, x, work, rwork, swork, iwork, nout)
DDRVAB
subroutine dget08(trans, m, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
DGET08
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 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 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.