156 SUBROUTINE cchkpp( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
157 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
166 INTEGER NMAX, NN, NNS, NOUT
171 INTEGER NSVAL( * ), NVAL( * )
173 COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
174 $ work( * ), x( * ), xact( * )
181 PARAMETER ( ZERO = 0.0e+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 REAL ANORM, CNDNUM, RCOND, RCONDC
197 CHARACTER PACKS( 2 ), UPLOS( 2 )
198 INTEGER ISEED( 4 ), ISEEDY( 4 )
199 REAL RESULT( NTESTS )
203 EXTERNAL CLANHP, SGET06
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 ) =
'Complex precision'
237 iseed( i ) = iseedy( i )
243 $
CALL cerrpo( 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 clatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
282 CALL clatms( n, n, dist, iseed,
TYPE, rwork, mode,
283 $ cndnum, anorm, kl, ku, packit, a, lda, work,
289 CALL alaerh( path,
'CLATMS', 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 claipd( n, a, n, -1 )
344 CALL ccopy( npp, a, 1, afac, 1 )
346 CALL cpptrf( uplo, n, afac, info )
350 IF( info.NE.izero )
THEN
351 CALL alaerh( path,
'CPPTRF', info, izero, uplo, n, n,
352 $ -1, -1, -1, imat, nfail, nerrs, nout )
364 CALL ccopy( npp, afac, 1, ainv, 1 )
365 CALL cppt01( uplo, n, a, ainv, rwork, result( 1 ) )
370 CALL ccopy( npp, afac, 1, ainv, 1 )
372 CALL cpptri( uplo, n, ainv, info )
377 $
CALL alaerh( path,
'CPPTRI', info, 0, uplo, n, n, -1,
378 $ -1, -1, imat, nfail, nerrs, nout )
380 CALL cppt03( 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 clarhs( path, xtype, uplo,
' ', n, n, kl, ku,
405 $ nrhs, a, lda, xact, lda, b, lda, iseed,
407 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
410 CALL cpptrs( uplo, n, nrhs, afac, x, lda, info )
415 $
CALL alaerh( path,
'CPPTRS', info, 0, uplo, n, n,
416 $ -1, -1, nrhs, imat, nfail, nerrs,
419 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
420 CALL cppt02( uplo, n, nrhs, a, x, lda, work, lda,
421 $ rwork, result( 3 ) )
426 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
433 CALL cpprfs( 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,
'CPPRFS', info, 0, uplo, n, n,
441 $ -1, -1, nrhs, imat, nfail, nerrs,
444 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
446 CALL cppt05( 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 = clanhp(
'1', uplo, n, a, rwork )
470 CALL cppcon( uplo, n, afac, anorm, rcond, work, rwork,
476 $
CALL alaerh( path,
'CPPCON', info, 0, uplo, n, n, -1,
477 $ -1, -1, imat, nfail, nerrs, nout )
479 result( 8 ) = sget06( 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 )