142 SUBROUTINE zdrvac( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
143 $ A, AFAC, B, X, WORK,
144 $ RWORK, SWORK, NOUT )
151 INTEGER NMAX, NM, NNS, NOUT
152 DOUBLE PRECISION THRESH
156 INTEGER MVAL( * ), NSVAL( * )
157 DOUBLE PRECISION RWORK( * )
159 COMPLEX*16 A( * ), AFAC( * ), B( * ),
166 DOUBLE PRECISION ZERO
167 PARAMETER ( ZERO = 0.0d+0 )
169 parameter( ntypes = 9 )
171 parameter( ntests = 1 )
175 CHARACTER DIST,
TYPE, UPLO, XTYPE
177 INTEGER I, IM, IMAT, INFO, IOFF, IRHS, IUPLO,
178 $ izero, kl, ku, lda, mode, n,
179 $ nerrs, nfail, nimat, nrhs, nrun
180 DOUBLE PRECISION ANORM, CNDNUM
184 INTEGER ISEED( 4 ), ISEEDY( 4 )
185 DOUBLE PRECISION RESULT( NTESTS )
196 INTRINSIC dble, max, sqrt
204 COMMON / infoc / infot, nunit, ok, lerr
205 COMMON / srnamc / srnamt
208 DATA iseedy / 1988, 1989, 1990, 1991 /
209 DATA uplos /
'U',
'L' /
216 path( 1: 1 ) =
'Zomplex precision'
222 iseed( i ) = iseedy( i )
236 DO 110 imat = 1, nimat
240 IF( .NOT.dotype( imat ) )
245 zerot = imat.GE.3 .AND. imat.LE.5
246 IF( zerot .AND. n.LT.imat-2 )
252 uplo = uplos( iuplo )
257 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
261 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
262 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
268 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
269 $ -1, -1, imat, nfail, nerrs, nout )
279 ELSE IF( imat.EQ.4 )
THEN
284 ioff = ( izero-1 )*lda
288 IF( iuplo.EQ.1 )
THEN
289 DO 20 i = 1, izero - 1
299 DO 40 i = 1, izero - 1
314 CALL zlaipd( n, a, lda+1, 0 )
323 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
324 $ nrhs, a, lda, x, lda, b, lda,
333 CALL zlacpy(
'All', n, n, a, lda, afac, lda)
335 CALL zcposv( uplo, n, nrhs, afac, lda, b, lda, x, lda,
336 $ work, swork, rwork, iter, info )
339 CALL zlacpy(
'All', n, n, a, lda, afac, lda )
344 IF( info.NE.izero )
THEN
346 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
347 $
CALL alahd( nout, path )
350 IF( info.NE.izero .AND. izero.NE.0 )
THEN
351 WRITE( nout, fmt = 9988 )
'ZCPOSV',info,izero,n,
354 WRITE( nout, fmt = 9975 )
'ZCPOSV',info,n,imat
365 CALL zlacpy(
'All', n, nrhs, b, lda, work, lda )
367 CALL zpot06( uplo, n, nrhs, a, lda, x, lda, work,
368 $ lda, rwork, result( 1 ) )
382 IF ((thresh.LE.0.0e+00)
383 $ .OR.((iter.GE.0).AND.(n.GT.0)
384 $ .AND.(result(1).GE.sqrt(dble(n))))
385 $ .OR.((iter.LT.0).AND.(result(1).GE.thresh)))
THEN
387 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
THEN
388 WRITE( nout, fmt = 8999 )
'ZPO'
389 WRITE( nout, fmt =
'( '' Matrix types:'' )' )
390 WRITE( nout, fmt = 8979 )
391 WRITE( nout, fmt =
'( '' Test ratios:'' )' )
392 WRITE( nout, fmt = 8960 )1
393 WRITE( nout, fmt =
'( '' Messages:'' )' )
396 WRITE( nout, fmt = 9998 )uplo, n, nrhs, imat, 1,
412 IF( nfail.GT.0 )
THEN
413 WRITE( nout, fmt = 9996 )
'ZCPOSV', nfail, nrun
415 WRITE( nout, fmt = 9995 )
'ZCPOSV', nrun
417 IF( nerrs.GT.0 )
THEN
418 WRITE( nout, fmt = 9994 )nerrs
421 9998
FORMAT(
' UPLO=''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
422 $ i2,
', test(', i2,
') =', g12.5 )
423 9996
FORMAT( 1x, a6,
': ', i6,
' out of ', i6,
424 $
' tests failed to pass the threshold' )
425 9995
FORMAT( /1x,
'All tests for ', a6,
426 $
' routines passed the threshold ( ', i6,
' tests run)' )
427 9994
FORMAT( 6x, i6,
' error messages recorded' )
431 9988
FORMAT(
' *** ', a6,
' returned with INFO =', i5,
' instead of ',
432 $ i5, /
' ==> N =', i5,
', type ',
437 9975
FORMAT(
' *** Error code from ', a6,
'=', i5,
' for M=', i5,
439 8999
FORMAT( / 1x, a3,
': positive definite dense matrices' )
440 8979
FORMAT( 4x,
'1. Diagonal', 24x,
'7. Last n/2 columns zero', / 4x,
441 $
'2. Upper triangular', 16x,
442 $
'8. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
443 $
'3. Lower triangular', 16x,
'9. Random, CNDNUM = 0.1/EPS',
444 $ / 4x,
'4. Random, CNDNUM = 2', 13x,
445 $
'10. Scaled near underflow', / 4x,
'5. First column zero',
446 $ 14x,
'11. Scaled near overflow', / 4x,
447 $
'6. Last column zero' )
448 8960
FORMAT( 3x, i2,
': norm_1( B - A * X ) / ',
449 $
'( norm_1(A) * norm_1(X) * EPS * SQRT(N) ) > 1 if ITERREF',
450 $ / 4x,
'or norm_1( B - A * X ) / ',
451 $
'( norm_1(A) * norm_1(X) * EPS ) > THRES if ZPOTRF' )
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zcposv(uplo, n, nrhs, a, lda, b, ldb, x, ldx, work, swork, rwork, iter, info)
ZCPOSV computes the solution to system of linear equations A * X = B for PO matrices
subroutine zdrvac(dotype, nm, mval, nns, nsval, thresh, nmax, a, afac, b, x, work, rwork, swork, nout)
ZDRVAC
subroutine zlaipd(n, a, inda, vinda)
ZLAIPD
subroutine zlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
ZLATB4
subroutine zlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
ZLATMS
subroutine zpot06(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZPOT06