145 SUBROUTINE cchkpt( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
146 $ A, D, E, B, X, XACT, WORK, RWORK, NOUT )
154 INTEGER NN, NNS, NOUT
159 INTEGER NSVAL( * ), NVAL( * )
160 REAL D( * ), RWORK( * )
161 COMPLEX A( * ), B( * ), E( * ), WORK( * ), X( * ),
169 parameter( one = 1.0e+0, zero = 0.0e+0 )
171 parameter( ntypes = 12 )
173 parameter( ntests = 7 )
177 CHARACTER DIST,
TYPE, UPLO
179 INTEGER I, IA, IMAT, IN, INFO, IRHS, IUPLO, IX, IZERO,
180 $ j, k, kl, ku, lda, mode, n, nerrs, nfail,
182 REAL AINVNM, ANORM, COND, DMAX, RCOND, RCONDC
186 INTEGER ISEED( 4 ), ISEEDY( 4 )
187 REAL RESULT( NTESTS )
192 REAL CLANHT, SCASUM, SGET06
193 EXTERNAL isamax, clanht, scasum, sget06
202 INTRINSIC abs, max, real
210 COMMON / infoc / infot, nunit, ok, lerr
211 COMMON / srnamc / srnamt
214 DATA iseedy / 0, 0, 0, 1 / , uplos /
'U',
'L' /
218 path( 1: 1 ) =
'Complex precision'
224 iseed( i ) = iseedy( i )
230 $
CALL cerrgt( path, nout )
243 DO 110 imat = 1, nimat
247 IF( n.GT.0 .AND. .NOT.dotype( imat ) )
252 CALL clatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
255 zerot = imat.GE.8 .AND. imat.LE.10
262 CALL clatms( n, n, dist, iseed,
TYPE, rwork, mode, cond,
263 $ anorm, kl, ku,
'B', a, 2, work, info )
268 CALL alaerh( path,
'CLATMS', info, 0,
' ', n, n, kl,
269 $ ku, -1, imat, nfail, nerrs, nout )
278 d( i ) = real( a( ia ) )
283 $ d( n ) = real( a( ia ) )
289 IF( .NOT.zerot .OR. .NOT.dotype( 7 ) )
THEN
293 CALL slarnv( 2, iseed, n, d )
294 CALL clarnv( 2, iseed, n-1, e )
299 d( 1 ) = abs( d( 1 ) )
301 d( 1 ) = abs( d( 1 ) ) + abs( e( 1 ) )
302 d( n ) = abs( d( n ) ) + abs( e( n-1 ) )
304 d( i ) = abs( d( i ) ) + abs( e( i ) ) +
311 ix = isamax( n, d, 1 )
313 CALL sscal( n, anorm / dmax, d, 1 )
314 CALL csscal( n-1, anorm / dmax, e, 1 )
316 ELSE IF( izero.GT.0 )
THEN
321 IF( izero.EQ.1 )
THEN
322 d( 1 ) = real( z( 2 ) )
325 ELSE IF( izero.EQ.n )
THEN
327 d( n ) = real( z( 2 ) )
329 e( izero-1 ) = z( 1 )
330 d( izero ) = real( z( 2 ) )
347 ELSE IF( imat.EQ.9 )
THEN
355 ELSE IF( imat.EQ.10 )
THEN
357 IF( izero.GT.1 )
THEN
358 z( 1 ) = e( izero-1 )
368 CALL scopy( n, d, 1, d( n+1 ), 1 )
370 $
CALL ccopy( n-1, e, 1, e( n+1 ), 1 )
376 CALL cpttrf( n, d( n+1 ), e( n+1 ), info )
380 IF( info.NE.izero )
THEN
381 CALL alaerh( path,
'CPTTRF', info, izero,
' ', n, n, -1,
382 $ -1, -1, imat, nfail, nerrs, nout )
391 CALL cptt01( n, d, e, d( n+1 ), e( n+1 ), work,
396 IF( result( 1 ).GE.thresh )
THEN
397 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
398 $
CALL alahd( nout, path )
399 WRITE( nout, fmt = 9999 )n, imat, 1, result( 1 )
408 anorm = clanht(
'1', n, d, e )
419 CALL cpttrs(
'Lower', n, 1, d( n+1 ), e( n+1 ), x, lda,
421 ainvnm = max( ainvnm, scasum( n, x, 1 ) )
423 rcondc = one / max( one, anorm*ainvnm )
432 CALL clarnv( 2, iseed, n, xact( ix ) )
440 uplo = uplos( iuplo )
444 CALL claptm( uplo, n, nrhs, one, d, e, xact, lda,
450 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
451 CALL cpttrs( uplo, n, nrhs, d( n+1 ), e( n+1 ), x,
457 $
CALL alaerh( path,
'CPTTRS', info, 0, uplo, n, n,
458 $ -1, -1, nrhs, imat, nfail, nerrs,
461 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
462 CALL cptt02( uplo, n, nrhs, d, e, x, lda, work, lda,
468 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
475 CALL cptrfs( uplo, n, nrhs, d, e, d( n+1 ), e( n+1 ),
476 $ b, lda, x, lda, rwork, rwork( nrhs+1 ),
477 $ work, rwork( 2*nrhs+1 ), info )
482 $
CALL alaerh( path,
'CPTRFS', info, 0, uplo, n, n,
483 $ -1, -1, nrhs, imat, nfail, nerrs,
486 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
488 CALL cptt05( n, nrhs, d, e, b, lda, x, lda, xact, lda,
489 $ rwork, rwork( nrhs+1 ), result( 5 ) )
495 IF( result( k ).GE.thresh )
THEN
496 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
497 $
CALL alahd( nout, path )
498 WRITE( nout, fmt = 9998 )uplo, n, nrhs, imat,
514 CALL cptcon( n, d( n+1 ), e( n+1 ), anorm, rcond, rwork,
520 $
CALL alaerh( path,
'CPTCON', info, 0,
' ', n, n, -1, -1,
521 $ -1, imat, nfail, nerrs, nout )
523 result( 7 ) = sget06( rcond, rcondc )
527 IF( result( 7 ).GE.thresh )
THEN
528 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
529 $
CALL alahd( nout, path )
530 WRITE( nout, fmt = 9999 )n, imat, 7, result( 7 )
539 CALL alasum( path, nout, nfail, nrun, nerrs )
541 9999
FORMAT(
' N =', i5,
', type ', i2,
', test ', i2,
', ratio = ',
543 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS =', i3,
544 $
', type ', i2,
', test ', i2,
', ratio = ', g12.5 )
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine cchkpt(dotype, nn, nval, nns, nsval, thresh, tsterr, a, d, e, b, x, xact, work, rwork, nout)
CCHKPT
subroutine cerrgt(path, nunit)
CERRGT
subroutine cget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
CGET04
subroutine claptm(uplo, n, nrhs, alpha, d, e, x, ldx, beta, b, ldb)
CLAPTM
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 cptt01(n, d, e, df, ef, work, resid)
CPTT01
subroutine cptt02(uplo, n, nrhs, d, e, x, ldx, b, ldb, resid)
CPTT02
subroutine cptt05(n, nrhs, d, e, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPTT05
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
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 slarnv(idist, iseed, n, x)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine clarnv(idist, iseed, n, x)
CLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine cptcon(n, d, e, anorm, rcond, rwork, info)
CPTCON
subroutine cptrfs(uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPTRFS
subroutine cpttrf(n, d, e, info)
CPTTRF
subroutine cpttrs(uplo, n, nrhs, d, e, b, ldb, info)
CPTTRS
subroutine csscal(n, sa, cx, incx)
CSSCAL
subroutine sscal(n, sa, sx, incx)
SSCAL