140 SUBROUTINE cdrvpt( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
141 $ e, b, x, xact, work, rwork, nout )
150 INTEGER NN, NOUT, NRHS
156 REAL D( * ), RWORK( * )
157 COMPLEX A( * ), B( * ), E( * ), WORK( * ), X( * ),
165 parameter ( one = 1.0e+0, zero = 0.0e+0 )
167 parameter ( ntypes = 12 )
169 parameter ( ntests = 6 )
173 CHARACTER DIST, FACT, TYPE
175 INTEGER I, IA, IFACT, IMAT, IN, INFO, IX, IZERO, J, K,
176 $ k1, kl, ku, lda, mode, n, nerrs, nfail, nimat,
178 REAL AINVNM, ANORM, COND, DMAX, RCOND, RCONDC
181 INTEGER ISEED( 4 ), ISEEDY( 4 )
182 REAL RESULT( ntests ), Z( 3 )
186 REAL CLANHT, SCASUM, SGET06
187 EXTERNAL isamax, clanht, scasum, sget06
196 INTRINSIC abs, cmplx, max
204 COMMON / infoc / infot, nunit, ok, lerr
205 COMMON / srnamc / srnamt
208 DATA iseedy / 0, 0, 0, 1 /
212 path( 1: 1 ) =
'Complex precision'
218 iseed( i ) = iseedy( i )
224 $
CALL cerrvx( path, nout )
237 DO 110 imat = 1, nimat
241 IF( n.GT.0 .AND. .NOT.dotype( imat ) )
246 CALL clatb4( path, imat, n, n,
TYPE, KL, KU, ANORM, MODE,
249 zerot = imat.GE.8 .AND. imat.LE.10
256 CALL clatms( n, n, dist, iseed,
TYPE, RWORK, MODE, COND,
257 $ anorm, kl, ku,
'B', a, 2, work, info )
262 CALL alaerh( path,
'CLATMS', info, 0,
' ', n, n, kl,
263 $ ku, -1, imat, nfail, nerrs, nout )
283 IF( .NOT.zerot .OR. .NOT.dotype( 7 ) )
THEN
287 CALL slarnv( 2, iseed, n, d )
288 CALL clarnv( 2, iseed, n-1, e )
293 d( 1 ) = abs( d( 1 ) )
295 d( 1 ) = abs( d( 1 ) ) + abs( e( 1 ) )
296 d( n ) = abs( d( n ) ) + abs( e( n-1 ) )
298 d( i ) = abs( d( i ) ) + abs( e( i ) ) +
305 ix = isamax( n, d, 1 )
307 CALL sscal( n, anorm / dmax, d, 1 )
309 $
CALL csscal( n-1, anorm / dmax, e, 1 )
311 ELSE IF( izero.GT.0 )
THEN
316 IF( izero.EQ.1 )
THEN
320 ELSE IF( izero.EQ.n )
THEN
324 e( izero-1 ) = z( 1 )
342 ELSE IF( imat.EQ.9 )
THEN
350 ELSE IF( imat.EQ.10 )
THEN
352 IF( izero.GT.1 )
THEN
353 z( 1 ) = e( izero-1 )
367 CALL clarnv( 2, iseed, n, xact( ix ) )
373 CALL claptm(
'Lower', n, nrhs, one, d, e, xact, lda, zero,
377 IF( ifact.EQ.1 )
THEN
391 ELSE IF( ifact.EQ.1 )
THEN
395 anorm = clanht(
'1', n, d, e )
397 CALL scopy( n, d, 1, d( n+1 ), 1 )
399 $
CALL ccopy( n-1, e, 1, e( n+1 ), 1 )
403 CALL cpttrf( n, d( n+1 ), e( n+1 ), info )
414 CALL cpttrs(
'Lower', n, 1, d( n+1 ), e( n+1 ), x,
416 ainvnm = max( ainvnm, scasum( n, x, 1 ) )
421 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
424 rcondc = ( one / anorm ) / ainvnm
428 IF( ifact.EQ.2 )
THEN
432 CALL scopy( n, d, 1, d( n+1 ), 1 )
434 $
CALL ccopy( n-1, e, 1, e( n+1 ), 1 )
435 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
440 CALL cptsv( n, nrhs, d( n+1 ), e( n+1 ), x, lda,
446 $
CALL alaerh( path,
'CPTSV ', info, izero,
' ', n,
447 $ n, 1, 1, nrhs, imat, nfail, nerrs,
450 IF( izero.EQ.0 )
THEN
455 CALL cptt01( n, d, e, d( n+1 ), e( n+1 ), work,
460 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
461 CALL cptt02(
'Lower', n, nrhs, d, e, x, lda, work,
466 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
475 IF( result( k ).GE.thresh )
THEN
476 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
477 $
CALL aladhd( nout, path )
478 WRITE( nout, fmt = 9999 )
'CPTSV ', n, imat, k,
488 IF( ifact.GT.1 )
THEN
500 CALL claset(
'Full', n, nrhs, cmplx( zero ),
501 $ cmplx( zero ), x, lda )
507 CALL cptsvx( fact, n, nrhs, d, e, d( n+1 ), e( n+1 ), b,
508 $ lda, x, lda, rcond, rwork, rwork( nrhs+1 ),
509 $ work, rwork( 2*nrhs+1 ), info )
514 $
CALL alaerh( path,
'CPTSVX', info, izero, fact, n, n,
515 $ 1, 1, nrhs, imat, nfail, nerrs, nout )
516 IF( izero.EQ.0 )
THEN
517 IF( ifact.EQ.2 )
THEN
523 CALL cptt01( n, d, e, d( n+1 ), e( n+1 ), work,
531 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
532 CALL cptt02(
'Lower', n, nrhs, d, e, x, lda, work,
537 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
542 CALL cptt05( n, nrhs, d, e, b, lda, x, lda, xact, lda,
543 $ rwork, rwork( nrhs+1 ), result( 4 ) )
550 result( 6 ) = sget06( rcond, rcondc )
556 IF( result( k ).GE.thresh )
THEN
557 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
558 $
CALL aladhd( nout, path )
559 WRITE( nout, fmt = 9998 )
'CPTSVX', fact, n, imat,
571 CALL alasvm( path, nout, nfail, nrun, nerrs )
573 9999
FORMAT( 1x, a,
', N =', i5,
', type ', i2,
', test ', i2,
574 $
', ratio = ', g12.5 )
575 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', N =', i5,
', type ', i2,
576 $
', test ', i2,
', ratio = ', g12.5 )
subroutine cpttrf(N, D, E, INFO)
CPTTRF
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine claptm(UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB)
CLAPTM
subroutine slarnv(IDIST, ISEED, N, X)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine cpttrs(UPLO, N, NRHS, D, E, B, LDB, INFO)
CPTTRS
subroutine cerrvx(PATH, NUNIT)
CERRVX
subroutine cptsv(N, NRHS, D, E, B, LDB, INFO)
CPTSV computes the solution to system of linear equations A * X = B for PT matrices ...
subroutine cptt02(UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID)
CPTT02
subroutine clarnv(IDIST, ISEED, N, X)
CLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine cptt01(N, D, E, DF, EF, WORK, RESID)
CPTT01
subroutine cptt05(N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
CPTT05
subroutine clatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
CLATMS
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine cdrvpt(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D, E, B, X, XACT, WORK, RWORK, NOUT)
CDRVPT
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine sscal(N, SA, SX, INCX)
SSCAL
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine clatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
CLATB4
subroutine cptsvx(FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO)
CPTSVX computes the solution to system of linear equations A * X = B for PT matrices ...
subroutine cget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
CGET04
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
subroutine csscal(N, SA, CX, INCX)
CSSCAL