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 )
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine clarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
CLARHS
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine cchkpp(dotype, nn, nval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, nout)
CCHKPP
subroutine cerrpo(path, nunit)
CERRPO
subroutine cget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
CGET04
subroutine claipd(n, a, inda, vinda)
CLAIPD
subroutine clatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
CLATB4
subroutine clatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
CLATMS
subroutine cppt01(uplo, n, a, afac, rwork, resid)
CPPT01
subroutine cppt02(uplo, n, nrhs, a, x, ldx, b, ldb, rwork, resid)
CPPT02
subroutine cppt03(uplo, n, a, ainv, work, ldwork, rwork, rcond, resid)
CPPT03
subroutine cppt05(uplo, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPPT05
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine cppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
CPPCON
subroutine cpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPPRFS
subroutine cpptrf(uplo, n, ap, info)
CPPTRF
subroutine cpptri(uplo, n, ap, info)
CPPTRI
subroutine cpptrs(uplo, n, nrhs, ap, b, ldb, info)
CPPTRS