165 SUBROUTINE zchkpo( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
166 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
167 $ XACT, WORK, RWORK, NOUT )
175 INTEGER NMAX, NN, NNB, NNS, NOUT
176 DOUBLE PRECISION THRESH
180 INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
181 DOUBLE PRECISION RWORK( * )
182 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
183 $ work( * ), x( * ), xact( * )
190 PARAMETER ( CZERO = ( 0.0d+0, 0.0d+0 ) )
192 parameter( ntypes = 9 )
194 parameter( ntests = 8 )
198 CHARACTER DIST,
TYPE, UPLO, XTYPE
200 INTEGER I, IMAT, IN, INB, INFO, IOFF, IRHS, IUPLO,
201 $ izero, k, kl, ku, lda, mode, n, nb, nerrs,
202 $ nfail, nimat, nrhs, nrun
203 DOUBLE PRECISION ANORM, CNDNUM, RCOND, RCONDC
207 INTEGER ISEED( 4 ), ISEEDY( 4 )
208 DOUBLE PRECISION RESULT( NTESTS )
211 DOUBLE PRECISION DGET06, ZLANHE
212 EXTERNAL DGET06, ZLANHE
226 COMMON / infoc / infot, nunit, ok, lerr
227 COMMON / srnamc / srnamt
233 DATA iseedy / 1988, 1989, 1990, 1991 /
234 DATA uplos /
'U',
'L' /
240 path( 1: 1 ) =
'Zomplex precision'
246 iseed( i ) = iseedy( i )
252 $
CALL zerrpo( path, nout )
266 DO 110 imat = 1, nimat
270 IF( .NOT.dotype( imat ) )
275 zerot = imat.GE.3 .AND. imat.LE.5
276 IF( zerot .AND. n.LT.imat-2 )
282 uplo = uplos( iuplo )
287 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
291 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
292 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
298 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
299 $ -1, -1, imat, nfail, nerrs, nout )
309 ELSE IF( imat.EQ.4 )
THEN
314 ioff = ( izero-1 )*lda
318 IF( iuplo.EQ.1 )
THEN
319 DO 20 i = 1, izero - 1
329 DO 40 i = 1, izero - 1
344 CALL zlaipd( n, a, lda+1, 0 )
354 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
356 CALL zpotrf( uplo, n, afac, lda, info )
360 IF( info.NE.izero )
THEN
361 CALL alaerh( path,
'ZPOTRF', info, izero, uplo, n,
362 $ n, -1, -1, nb, imat, nfail, nerrs,
375 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
376 CALL zpot01( uplo, n, a, lda, ainv, lda, rwork,
382 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
384 CALL zpotri( uplo, n, ainv, lda, info )
389 $
CALL alaerh( path,
'ZPOTRI', info, 0, uplo, n, n,
390 $ -1, -1, -1, imat, nfail, nerrs, nout )
392 CALL zpot03( uplo, n, a, lda, ainv, lda, work, lda,
393 $ rwork, rcondc, result( 2 ) )
399 IF( result( k ).GE.thresh )
THEN
400 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
401 $
CALL alahd( nout, path )
402 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
422 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
423 $ nrhs, a, lda, xact, lda, b, lda,
425 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
428 CALL zpotrs( uplo, n, nrhs, afac, lda, x, lda,
434 $
CALL alaerh( path,
'ZPOTRS', info, 0, uplo, n,
435 $ n, -1, -1, nrhs, imat, nfail,
438 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
439 CALL zpot02( uplo, n, nrhs, a, lda, x, lda, work,
440 $ lda, rwork, result( 3 ) )
445 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
452 CALL zporfs( uplo, n, nrhs, a, lda, afac, lda, b,
453 $ lda, x, lda, rwork, rwork( nrhs+1 ),
454 $ work, rwork( 2*nrhs+1 ), info )
459 $
CALL alaerh( path,
'ZPORFS', info, 0, uplo, n,
460 $ n, -1, -1, nrhs, imat, nfail,
463 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
465 CALL zpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
466 $ xact, lda, rwork, rwork( nrhs+1 ),
473 IF( result( k ).GE.thresh )
THEN
474 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
475 $
CALL alahd( nout, path )
476 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
477 $ imat, k, result( k )
487 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
489 CALL zpocon( uplo, n, afac, lda, anorm, rcond, work,
495 $
CALL alaerh( path,
'ZPOCON', info, 0, uplo, n, n,
496 $ -1, -1, -1, imat, nfail, nerrs, nout )
498 result( 8 ) = dget06( rcond, rcondc )
502 IF( result( 8 ).GE.thresh )
THEN
503 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
504 $
CALL alahd( nout, path )
505 WRITE( nout, fmt = 9997 )uplo, n, imat, 8,
517 CALL alasum( path, nout, nfail, nrun, nerrs )
519 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
520 $ i2,
', test ', i2,
', ratio =', g12.5 )
521 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
522 $ i2,
', test(', i2,
') =', g12.5 )
523 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
524 $
', test(', i2,
') =', g12.5 )
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine xlaenv(ispec, nvalue)
XLAENV
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 zpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
ZPOCON
subroutine zporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZPORFS
subroutine zpotrf(uplo, n, a, lda, info)
ZPOTRF
subroutine zpotri(uplo, n, a, lda, info)
ZPOTRI
subroutine zpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
ZPOTRS
subroutine zchkpo(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, nout)
ZCHKPO
subroutine zerrpo(path, nunit)
ZERRPO
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
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 zpot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
ZPOT01
subroutine zpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZPOT02
subroutine zpot03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
ZPOT03
subroutine zpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPOT05