168 SUBROUTINE zchkhe_aa( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
169 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
170 $ X, XACT, WORK, RWORK, IWORK, NOUT )
180 INTEGER NMAX, NN, NNB, NNS, NOUT
181 DOUBLE PRECISION THRESH
185 INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
186 DOUBLE PRECISION RWORK( * )
187 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
188 $ work( * ), x( * ), xact( * )
194 DOUBLE PRECISION ZERO
195 PARAMETER ( ZERO = 0.0d+0 )
197 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
199 parameter( ntypes = 10 )
201 parameter( ntests = 9 )
205 CHARACTER DIST,
TYPE, UPLO, XTYPE
206 CHARACTER*3 PATH, MATPATH
207 INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
208 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
209 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
210 DOUBLE PRECISION ANORM, CNDNUM
214 INTEGER ISEED( 4 ), ISEEDY( 4 )
215 DOUBLE PRECISION RESULT( NTESTS )
231 COMMON / infoc / infot, nunit, ok, lerr
232 COMMON / srnamc / srnamt
235 DATA iseedy / 1988, 1989, 1990, 1991 /
236 DATA uplos /
'U',
'L' /
244 path( 1: 1 ) =
'Zomplex precision'
249 matpath( 1: 1 ) =
'Zomplex precision'
250 matpath( 2: 3 ) =
'HE'
255 iseed( i ) = iseedy( i )
261 $
CALL zerrhe( path, nout )
273 IF( n .GT. nmax )
THEN
275 WRITE(nout, 9995)
'M ', n, nmax
285 DO 170 imat = 1, nimat
289 IF( .NOT.dotype( imat ) )
294 zerot = imat.GE.3 .AND. imat.LE.6
295 IF( zerot .AND. n.LT.imat-2 )
301 uplo = uplos( iuplo )
306 CALL zlatb4( matpath, imat, n, n,
TYPE, kl, ku,
307 $ anorm, mode, cndnum, dist )
312 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
313 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
319 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
320 $ -1, -1, imat, nfail, nerrs, nout )
333 ELSE IF( imat.EQ.4 )
THEN
343 IF( iuplo.EQ.1 )
THEN
344 ioff = ( izero-1 )*lda
345 DO 20 i = 1, izero - 1
355 DO 40 i = 1, izero - 1
365 IF( iuplo.EQ.1 )
THEN
401 CALL zlaipd( n, a, lda+1, 0 )
417 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
424 lwork = max( 1, ( nb+1 )*lda )
426 CALL zhetrf_aa( uplo, n, afac, lda, iwork, ainv,
452 CALL alaerh( path,
'ZHETRF_AA', info, k, uplo,
453 $ n, n, -1, -1, nb, imat, nfail, nerrs,
460 CALL zhet01_aa( uplo, n, a, lda, afac, lda, iwork,
461 $ ainv, lda, rwork, result( 1 ) )
469 IF( result( k ).GE.thresh )
THEN
470 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
471 $
CALL alahd( nout, path )
472 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
497 CALL zlarhs( matpath, xtype, uplo,
' ', n, n,
498 $ kl, ku, nrhs, a, lda, xact, lda,
499 $ b, lda, iseed, info )
500 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
503 lwork = max( 1, 3*n-2 )
504 CALL zhetrs_aa( uplo, n, nrhs, afac, lda, iwork,
505 $ x, lda, work, lwork, info )
510 IF( izero.EQ.0 )
THEN
511 CALL alaerh( path,
'ZHETRS_AA', info, 0,
512 $ uplo, n, n, -1, -1, nrhs, imat,
513 $ nfail, nerrs, nout )
517 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda
522 CALL zpot02( uplo, n, nrhs, a, lda, x, lda,
523 $ work, lda, rwork, result( 2 ) )
529 IF( result( k ).GE.thresh )
THEN
530 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
531 $
CALL alahd( nout, path )
532 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
533 $ imat, k, result( k )
551 CALL alasum( path, nout, nfail, nrun, nerrs )
553 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
554 $ i2,
', test ', i2,
', ratio =', g12.5 )
555 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
556 $ i2,
', test(', i2,
') =', g12.5 )
559 9995
FORMAT(
' Invalid input value: ', a4,
'=', i6,
'; must be <=',
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine zhetrf_aa(uplo, n, a, lda, ipiv, work, lwork, info)
ZHETRF_AA
subroutine zhetrs_aa(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
ZHETRS_AA
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zchkhe_aa(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
ZCHKHE_AA
subroutine zerrhe(path, nunit)
ZERRHE
subroutine zhet01_aa(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZHET01_AA
subroutine zlaipd(n, a, inda, vinda)
ZLAIPD
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
subroutine zpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZPOT02