156 SUBROUTINE zchkpp( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
157 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
166 INTEGER NMAX, NN, NNS, NOUT
167 DOUBLE PRECISION THRESH
171 INTEGER NSVAL( * ), NVAL( * )
172 DOUBLE PRECISION RWORK( * )
173 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
174 $ work( * ), x( * ), xact( * )
180 DOUBLE PRECISION ZERO
181 PARAMETER ( ZERO = 0.0d+0 )
183 parameter( ntypes = 9 )
185 parameter( ntests = 8 )
189 CHARACTER DIST, PACKIT,
TYPE, UPLO, XTYPE
191 INTEGER I, IMAT, IN, INFO, IOFF, IRHS, IUPLO, IZERO, K,
192 $ kl, ku, lda, mode, n, nerrs, nfail, nimat, npp,
194 DOUBLE PRECISION ANORM, CNDNUM, RCOND, RCONDC
197 CHARACTER PACKS( 2 ), UPLOS( 2 )
198 INTEGER ISEED( 4 ), ISEEDY( 4 )
199 DOUBLE PRECISION RESULT( NTESTS )
202 DOUBLE PRECISION DGET06, ZLANHP
203 EXTERNAL DGET06, ZLANHP
217 COMMON / infoc / infot, nunit, ok, lerr
218 COMMON / srnamc / srnamt
224 DATA iseedy / 1988, 1989, 1990, 1991 /
225 DATA uplos /
'U',
'L' / , packs /
'C',
'R' /
231 path( 1: 1 ) =
'Zomplex precision'
237 iseed( i ) = iseedy( i )
243 $
CALL zerrpo( path, nout )
256 DO 100 imat = 1, nimat
260 IF( .NOT.dotype( imat ) )
265 zerot = imat.GE.3 .AND. imat.LE.5
266 IF( zerot .AND. n.LT.imat-2 )
272 uplo = uplos( iuplo )
273 packit = packs( iuplo )
278 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
282 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
283 $ cndnum, anorm, kl, ku, packit, a, lda, work,
289 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
290 $ -1, -1, imat, nfail, nerrs, nout )
300 ELSE IF( imat.EQ.4 )
THEN
308 IF( iuplo.EQ.1 )
THEN
309 ioff = ( izero-1 )*izero / 2
310 DO 20 i = 1, izero - 1
320 DO 40 i = 1, izero - 1
335 IF( iuplo.EQ.1 )
THEN
338 CALL zlaipd( n, a, n, -1 )
344 CALL zcopy( npp, a, 1, afac, 1 )
346 CALL zpptrf( uplo, n, afac, info )
350 IF( info.NE.izero )
THEN
351 CALL alaerh( path,
'ZPPTRF', info, izero, uplo, n, n,
352 $ -1, -1, -1, imat, nfail, nerrs, nout )
364 CALL zcopy( npp, afac, 1, ainv, 1 )
365 CALL zppt01( uplo, n, a, ainv, rwork, result( 1 ) )
370 CALL zcopy( npp, afac, 1, ainv, 1 )
372 CALL zpptri( uplo, n, ainv, info )
377 $
CALL alaerh( path,
'ZPPTRI', info, 0, uplo, n, n, -1,
378 $ -1, -1, imat, nfail, nerrs, nout )
380 CALL zppt03( uplo, n, a, ainv, work, lda, rwork, rcondc,
387 IF( result( k ).GE.thresh )
THEN
388 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
389 $
CALL alahd( nout, path )
390 WRITE( nout, fmt = 9999 )uplo, n, imat, k,
404 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
405 $ nrhs, a, lda, xact, lda, b, lda, iseed,
407 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
410 CALL zpptrs( uplo, n, nrhs, afac, x, lda, info )
415 $
CALL alaerh( path,
'ZPPTRS', info, 0, uplo, n, n,
416 $ -1, -1, nrhs, imat, nfail, nerrs,
419 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
420 CALL zppt02( uplo, n, nrhs, a, x, lda, work, lda,
421 $ rwork, result( 3 ) )
426 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
433 CALL zpprfs( uplo, n, nrhs, a, afac, b, lda, x, lda,
434 $ rwork, rwork( nrhs+1 ), work,
435 $ rwork( 2*nrhs+1 ), info )
440 $
CALL alaerh( path,
'ZPPRFS', info, 0, uplo, n, n,
441 $ -1, -1, nrhs, imat, nfail, nerrs,
444 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
446 CALL zppt05( uplo, n, nrhs, a, b, lda, x, lda, xact,
447 $ lda, rwork, rwork( nrhs+1 ),
454 IF( result( k ).GE.thresh )
THEN
455 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
456 $
CALL alahd( nout, path )
457 WRITE( nout, fmt = 9998 )uplo, n, nrhs, imat,
468 anorm = zlanhp(
'1', uplo, n, a, rwork )
470 CALL zppcon( uplo, n, afac, anorm, rcond, work, rwork,
476 $
CALL alaerh( path,
'ZPPCON', info, 0, uplo, n, n, -1,
477 $ -1, -1, imat, nfail, nerrs, nout )
479 result( 8 ) = dget06( rcond, rcondc )
483 IF( result( 8 ).GE.thresh )
THEN
484 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
485 $
CALL alahd( nout, path )
486 WRITE( nout, fmt = 9999 )uplo, n, imat, 8,
498 CALL alasum( path, nout, nfail, nrun, nerrs )
500 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', type ', i2,
', test ',
501 $ i2,
', ratio =', g12.5 )
502 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
503 $ i2,
', test(', i2,
') =', g12.5 )