145 SUBROUTINE zchkgt( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
146 $ A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
154 INTEGER NN, NNS, NOUT
155 DOUBLE PRECISION THRESH
159 INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
160 DOUBLE PRECISION RWORK( * )
161 COMPLEX*16 A( * ), AF( * ), B( * ), WORK( * ), X( * ),
168 DOUBLE PRECISION ONE, ZERO
169 parameter( one = 1.0d+0, zero = 0.0d+0 )
171 parameter( ntypes = 12 )
173 parameter( ntests = 7 )
176 LOGICAL TRFCON, ZEROT
177 CHARACTER DIST, NORM, TRANS, TYPE
179 INTEGER I, IMAT, IN, INFO, IRHS, ITRAN, IX, IZERO, J,
180 $ k, kl, koff, ku, lda, m, mode, n, nerrs, nfail,
182 DOUBLE PRECISION AINVNM, ANORM, COND, RCOND, RCONDC, RCONDI,
186 CHARACTER TRANSS( 3 )
187 INTEGER ISEED( 4 ), ISEEDY( 4 )
188 DOUBLE PRECISION RESULT( NTESTS )
192 DOUBLE PRECISION DGET06, DZASUM, ZLANGT
193 EXTERNAL dget06, dzasum, zlangt
210 COMMON / infoc / infot, nunit, ok, lerr
211 COMMON / srnamc / srnamt
214 DATA iseedy / 0, 0, 0, 1 / , transs /
'N',
'T',
219 path( 1: 1 ) =
'Zomplex precision'
225 iseed( i ) = iseedy( i )
231 $
CALL zerrge( path, nout )
245 DO 100 imat = 1, nimat
249 IF( .NOT.dotype( imat ) )
254 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
257 zerot = imat.GE.8 .AND. imat.LE.10
262 koff = max( 2-ku, 3-max( 1, n ) )
264 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode, cond,
265 $ anorm, kl, ku,
'Z', af( koff ), 3, work,
271 CALL alaerh( path,
'ZLATMS', info, 0,
' ', n, n, kl,
272 $ ku, -1, imat, nfail, nerrs, nout )
278 CALL zcopy( n-1, af( 4 ), 3, a, 1 )
279 CALL zcopy( n-1, af( 3 ), 3, a( n+m+1 ), 1 )
281 CALL zcopy( n, af( 2 ), 3, a( m+1 ), 1 )
287 IF( .NOT.zerot .OR. .NOT.dotype( 7 ) )
THEN
292 CALL zlarnv( 2, iseed, n+2*m, a )
294 $
CALL zdscal( n+2*m, anorm, a, 1 )
295 ELSE IF( izero.GT.0 )
THEN
300 IF( izero.EQ.1 )
THEN
304 ELSE IF( izero.EQ.n )
THEN
308 a( 2*n-2+izero ) = z( 1 )
309 a( n-1+izero ) = z( 2 )
316 IF( .NOT.zerot )
THEN
318 ELSE IF( imat.EQ.8 )
THEN
326 ELSE IF( imat.EQ.9 )
THEN
334 DO 20 i = izero, n - 1
348 CALL zcopy( n+2*m, a, 1, af, 1 )
350 CALL zgttrf( n, af, af( m+1 ), af( n+m+1 ), af( n+2*m+1 ),
356 $
CALL alaerh( path,
'ZGTTRF', info, izero,
' ', n, n, 1,
357 $ 1, -1, imat, nfail, nerrs, nout )
360 CALL zgtt01( n, a, a( m+1 ), a( n+m+1 ), af, af( m+1 ),
361 $ af( n+m+1 ), af( n+2*m+1 ), iwork, work, lda,
362 $ rwork, result( 1 ) )
366 IF( result( 1 ).GE.thresh )
THEN
367 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
368 $
CALL alahd( nout, path )
369 WRITE( nout, fmt = 9999 )n, imat, 1, result( 1 )
375 trans = transs( itran )
376 IF( itran.EQ.1 )
THEN
381 anorm = zlangt( norm, n, a, a( m+1 ), a( n+m+1 ) )
383 IF( .NOT.trfcon )
THEN
394 CALL zgttrs( trans, n, 1, af, af( m+1 ),
395 $ af( n+m+1 ), af( n+2*m+1 ), iwork, x,
397 ainvnm = max( ainvnm, dzasum( n, x, 1 ) )
402 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
405 rcondc = ( one / anorm ) / ainvnm
407 IF( itran.EQ.1 )
THEN
421 CALL zgtcon( norm, n, af, af( m+1 ), af( n+m+1 ),
422 $ af( n+2*m+1 ), iwork, anorm, rcond, work,
428 $
CALL alaerh( path,
'ZGTCON', info, 0, norm, n, n, -1,
429 $ -1, -1, imat, nfail, nerrs, nout )
431 result( 7 ) = dget06( rcond, rcondc )
435 IF( result( 7 ).GE.thresh )
THEN
436 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
437 $
CALL alahd( nout, path )
438 WRITE( nout, fmt = 9997 )norm, n, imat, 7,
457 CALL zlarnv( 2, iseed, n, xact( ix ) )
462 trans = transs( itran )
463 IF( itran.EQ.1 )
THEN
471 CALL zlagtm( trans, n, nrhs, one, a, a( m+1 ),
472 $ a( n+m+1 ), xact, lda, zero, b, lda )
477 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
479 CALL zgttrs( trans, n, nrhs, af, af( m+1 ),
480 $ af( n+m+1 ), af( n+2*m+1 ), iwork, x,
486 $
CALL alaerh( path,
'ZGTTRS', info, 0, trans, n, n,
487 $ -1, -1, nrhs, imat, nfail, nerrs,
490 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
491 CALL zgtt02( trans, n, nrhs, a, a( m+1 ), a( n+m+1 ),
492 $ x, lda, work, lda, result( 2 ) )
497 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
504 CALL zgtrfs( trans, n, nrhs, a, a( m+1 ), a( n+m+1 ),
505 $ af, af( m+1 ), af( n+m+1 ),
506 $ af( n+2*m+1 ), iwork, b, lda, x, lda,
507 $ rwork, rwork( nrhs+1 ), work,
508 $ rwork( 2*nrhs+1 ), info )
513 $
CALL alaerh( path,
'ZGTRFS', info, 0, trans, n, n,
514 $ -1, -1, nrhs, imat, nfail, nerrs,
517 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
519 CALL zgtt05( trans, n, nrhs, a, a( m+1 ), a( n+m+1 ),
520 $ b, lda, x, lda, xact, lda, rwork,
521 $ rwork( nrhs+1 ), result( 5 ) )
527 IF( result( k ).GE.thresh )
THEN
528 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
529 $
CALL alahd( nout, path )
530 WRITE( nout, fmt = 9998 )trans, n, nrhs, imat,
543 CALL alasum( path, nout, nfail, nrun, nerrs )
545 9999
FORMAT( 12x,
'N =', i5,
',', 10x,
' type ', i2,
', test(', i2,
547 9998
FORMAT(
' TRANS=''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
548 $ i2,
', test(', i2,
') = ', g12.5 )
549 9997
FORMAT(
' NORM =''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
550 $
', test(', i2,
') = ', 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 zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, info)
ZGTCON
subroutine zgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZGTRFS
subroutine zgttrf(n, dl, d, du, du2, ipiv, info)
ZGTTRF
subroutine zgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info)
ZGTTRS
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
ZLAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a tridiagonal matrix,...
subroutine zlarnv(idist, iseed, n, x)
ZLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine zdscal(n, da, zx, incx)
ZDSCAL
subroutine zchkgt(dotype, nn, nval, nns, nsval, thresh, tsterr, a, af, b, x, xact, work, rwork, iwork, nout)
ZCHKGT
subroutine zerrge(path, nunit)
ZERRGE
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
subroutine zgtt01(n, dl, d, du, dlf, df, duf, du2, ipiv, work, ldwork, rwork, resid)
ZGTT01
subroutine zgtt02(trans, n, nrhs, dl, d, du, x, ldx, b, ldb, resid)
ZGTT02
subroutine zgtt05(trans, n, nrhs, dl, d, du, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZGTT05
subroutine zlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
ZLATB4
subroutine zlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
ZLATMS