144 SUBROUTINE zdrvac( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
145 $ a, afac, b, x, work,
146 $ rwork, swork, nout )
154 INTEGER nmax, nm, nns, nout
155 DOUBLE PRECISION thresh
159 INTEGER mval( * ), nsval( * )
160 DOUBLE PRECISION rwork( * )
162 COMPLEX*16 a( * ), afac( * ), b( * ),
169 DOUBLE PRECISION zero
170 parameter( zero = 0.0d+0 )
172 parameter( ntypes = 9 )
174 parameter( ntests = 1 )
178 CHARACTER dist, type, uplo, xtype
180 INTEGER i, im, imat, info, ioff, irhs, iuplo,
181 $ izero, kl, ku, lda, mode, n,
182 $ nerrs, nfail, nimat, nrhs, nrun
183 DOUBLE PRECISION anorm, cndnum
187 INTEGER iseed( 4 ), iseedy( 4 )
188 DOUBLE PRECISION result( ntests )
199 INTRINSIC dble, max, sqrt
207 common / infoc / infot, nunit, ok, lerr
208 common / srnamc / srnamt
211 DATA iseedy / 1988, 1989, 1990, 1991 /
212 DATA uplos /
'U',
'L' /
219 path( 1: 1 ) =
'Zomplex precision'
225 iseed( i ) = iseedy( i )
239 DO 110 imat = 1, nimat
243 IF( .NOT.dotype( imat ) )
248 zerot = imat.GE.3 .AND. imat.LE.5
249 IF( zerot .AND. n.LT.imat-2 )
255 uplo = uplos( iuplo )
260 CALL
zlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
264 CALL
zlatms( n, n, dist, iseed, type, rwork, mode,
265 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
271 CALL
alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
272 $ -1, -1, imat, nfail, nerrs, nout )
282 ELSE IF( imat.EQ.4 )
THEN
287 ioff = ( izero-1 )*lda
291 IF( iuplo.EQ.1 )
THEN
292 DO 20 i = 1, izero - 1
302 DO 40 i = 1, izero - 1
317 CALL
zlaipd( n, a, lda+1, 0 )
326 CALL
zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
327 $ nrhs, a, lda, x, lda, b, lda,
336 CALL
zlacpy(
'All', n, n, a, lda, afac, lda)
338 CALL
zcposv( uplo, n, nrhs, afac, lda, b, lda, x, lda,
339 $ work, swork, rwork, iter, info )
342 CALL
zlacpy(
'All', n, n, a, lda, afac, lda )
347 IF( info.NE.izero )
THEN
349 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
350 $ CALL
alahd( nout, path )
353 IF( info.NE.izero .AND. izero.NE.0 )
THEN
354 WRITE( nout, fmt = 9988 )
'ZCPOSV',info,izero,n,
357 WRITE( nout, fmt = 9975 )
'ZCPOSV',info,n,imat
368 CALL
zlacpy(
'All', n, nrhs, b, lda, work, lda )
370 CALL
zpot06( uplo, n, nrhs, a, lda, x, lda, work,
371 $ lda, rwork, result( 1 ) )
385 IF ((thresh.LE.0.0e+00)
386 $ .OR.((iter.GE.0).AND.(n.GT.0)
387 $ .AND.(result(1).GE.sqrt(dble(n))))
388 $ .OR.((iter.LT.0).AND.(result(1).GE.thresh)))
THEN
390 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
THEN
391 WRITE( nout, fmt = 8999 )
'ZPO'
392 WRITE( nout, fmt =
'( '' Matrix types:'' )' )
393 WRITE( nout, fmt = 8979 )
394 WRITE( nout, fmt =
'( '' Test ratios:'' )' )
395 WRITE( nout, fmt = 8960 )1
396 WRITE( nout, fmt =
'( '' Messages:'' )' )
399 WRITE( nout, fmt = 9998 )uplo, n, nrhs, imat, 1,
415 IF( nfail.GT.0 )
THEN
416 WRITE( nout, fmt = 9996 )
'ZCPOSV', nfail, nrun
418 WRITE( nout, fmt = 9995 )
'ZCPOSV', nrun
420 IF( nerrs.GT.0 )
THEN
421 WRITE( nout, fmt = 9994 )nerrs
424 9998 format(
' UPLO=''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
425 $ i2,
', test(', i2,
') =', g12.5 )
426 9996 format( 1x, a6,
': ', i6,
' out of ', i6,
427 $
' tests failed to pass the threshold' )
428 9995 format( /1x,
'All tests for ', a6,
429 $
' routines passed the threshold ( ', i6,
' tests run)' )
430 9994 format( 6x, i6,
' error messages recorded' )
434 9988 format(
' *** ', a6,
' returned with INFO =', i5,
' instead of ',
435 $ i5, /
' ==> N =', i5,
', type ',
440 9975 format(
' *** Error code from ', a6,
'=', i5,
' for M=', i5,
442 8999 format( / 1x, a3,
': positive definite dense matrices' )
443 8979 format( 4x,
'1. Diagonal', 24x,
'7. Last n/2 columns zero', / 4x,
444 $
'2. Upper triangular', 16x,
445 $
'8. Random, CNDNUM = sqrt(0.1/EPS)', / 4x,
446 $
'3. Lower triangular', 16x,
'9. Random, CNDNUM = 0.1/EPS',
447 $ / 4x,
'4. Random, CNDNUM = 2', 13x,
448 $
'10. Scaled near underflow', / 4x,
'5. First column zero',
449 $ 14x,
'11. Scaled near overflow', / 4x,
450 $
'6. Last column zero' )
451 8960 format( 3x, i2,
': norm_1( B - A * X ) / ',
452 $
'( norm_1(A) * norm_1(X) * EPS * SQRT(N) ) > 1 if ITERREF',
453 $ / 4x,
'or norm_1( B - A * X ) / ',
454 $
'( norm_1(A) * norm_1(X) * EPS ) > THRES if ZPOTRF' )