151 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK,
152 $ RWORK, IWORK, NOUT )
160 INTEGER NMAX, NN, NOUT, NRHS
165 INTEGER IWORK( * ), NVAL( * )
167 COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
168 $ work( * ), x( * ), xact( * )
175 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
176 INTEGER NTYPES, NTESTS
177 parameter( ntypes = 10, ntests = 3 )
179 parameter( nfact = 2 )
183 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
184 CHARACTER*3 MATPATH, PATH
185 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
186 $ izero, j, k, kl, ku, lda, lwork, mode, n,
187 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
188 REAL AINVNM, ANORM, CNDNUM, RCONDC
191 CHARACTER FACTS( NFACT ), UPLOS( 2 )
192 INTEGER ISEED( 4 ), ISEEDY( 4 )
193 REAL RESULT( NTESTS )
212 COMMON / infoc / infot, nunit, ok, lerr
213 COMMON / srnamc / srnamt
219 DATA iseedy / 1988, 1989, 1990, 1991 /
220 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
228 path( 1: 1 ) =
'Complex precision'
233 matpath( 1: 1 ) =
'Complex precision'
234 matpath( 2: 3 ) =
'HE'
240 iseed( i ) = iseedy( i )
242 lwork = max( 2*nmax, nmax*nrhs )
247 $
CALL cerrvx( path, nout )
268 DO 170 imat = 1, nimat
272 IF( .NOT.dotype( imat ) )
277 zerot = imat.GE.3 .AND. imat.LE.6
278 IF( zerot .AND. n.LT.imat-2 )
284 uplo = uplos( iuplo )
291 CALL clatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
292 $ mode, cndnum, dist )
297 CALL clatms( n, n, dist, iseed,
TYPE, rwork, mode,
298 $ cndnum, anorm, kl, ku, uplo, a, lda,
304 CALL alaerh( path,
'CLATMS', info, 0, uplo, n, n,
305 $ -1, -1, -1, imat, nfail, nerrs, nout )
315 ELSE IF( imat.EQ.4 )
THEN
325 IF( iuplo.EQ.1 )
THEN
326 ioff = ( izero-1 )*lda
327 DO 20 i = 1, izero - 1
337 DO 40 i = 1, izero - 1
347 IF( iuplo.EQ.1 )
THEN
380 DO 150 ifact = 1, nfact
384 fact = facts( ifact )
394 ELSE IF( ifact.EQ.1 )
THEN
398 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
402 CALL clacpy( uplo, n, n, a, lda, afac, lda )
408 CALL clacpy( uplo, n, n, afac, lda, ainv, lda )
409 lwork = (n+nb+1)*(nb+3)
412 ainvnm = clanhe(
'1', uplo, n, ainv, lda, rwork )
416 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
419 rcondc = ( one / anorm ) / ainvnm
426 CALL clarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
427 $ nrhs, a, lda, xact, lda, b, lda, iseed,
433 IF( ifact.EQ.2 )
THEN
434 CALL clacpy( uplo, n, n, a, lda, afac, lda )
435 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
440 srnamt =
'CHESV_ROOK'
441 CALL chesv_rook( uplo, n, nrhs, afac, lda, iwork,
442 $ x, lda, work, lwork, info )
450 IF( iwork( k ).LT.0 )
THEN
451 IF( iwork( k ).NE.-k )
THEN
455 ELSE IF( iwork( k ).NE.k )
THEN
464 CALL alaerh( path,
'CHESV_ROOK', info, k, uplo,
465 $ n, n, -1, -1, nrhs, imat, nfail,
468 ELSE IF( info.NE.0 )
THEN
476 $ iwork, ainv, lda, rwork,
481 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
482 CALL cpot02( uplo, n, nrhs, a, lda, x, lda, work,
483 $ lda, rwork, result( 2 ) )
488 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
496 IF( result( k ).GE.thresh )
THEN
497 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
498 $
CALL aladhd( nout, path )
499 WRITE( nout, fmt = 9999 )
'CHESV_ROOK', uplo,
500 $ n, imat, k, result( k )
516 CALL alasvm( path, nout, nfail, nrun, nerrs )
518 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
519 $
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine clarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
CLARHS
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine cdrvhe_rook(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
CDRVHE_ROOK
subroutine cerrvx(path, nunit)
CERRVX
subroutine cget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
CGET04
subroutine chet01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
CHET01_ROOK
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 cpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
CPOT02
subroutine chesv_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
CHESV_ROOK computes the solution to a system of linear equations A * X = B for HE matrices using the ...
subroutine chetrf_rook(uplo, n, a, lda, ipiv, work, lwork, info)
CHETRF_ROOK computes the factorization of a complex Hermitian indefinite matrix using the bounded Bun...
subroutine chetri_rook(uplo, n, a, lda, ipiv, work, info)
CHETRI_ROOK computes the inverse of HE matrix using the factorization obtained with the bounded Bunch...
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.