155 SUBROUTINE zdrvsy_rk( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
156 $ NMAX, A, AFAC, E, AINV, B, X, XACT, WORK,
157 $ RWORK, IWORK, NOUT )
165 INTEGER NMAX, NN, NOUT, NRHS
166 DOUBLE PRECISION THRESH
170 INTEGER IWORK( * ), NVAL( * )
171 DOUBLE PRECISION RWORK( * )
172 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ), E( * ),
173 $ work( * ), x( * ), xact( * )
179 DOUBLE PRECISION ONE, ZERO
180 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
181 INTEGER NTYPES, NTESTS
182 parameter( ntypes = 11, ntests = 3 )
184 parameter( nfact = 2 )
188 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
189 CHARACTER*3 MATPATH, PATH
190 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
191 $ izero, j, k, kl, ku, lda, lwork, mode, n,
192 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
193 DOUBLE PRECISION AINVNM, ANORM, CNDNUM, RCONDC
196 CHARACTER FACTS( NFACT ), UPLOS( 2 )
197 INTEGER ISEED( 4 ), ISEEDY( 4 )
198 DOUBLE PRECISION RESULT( NTESTS )
202 DOUBLE PRECISION ZLANSY
216 COMMON / infoc / infot, nunit, ok, lerr
217 COMMON / srnamc / srnamt
223 DATA iseedy / 1988, 1989, 1990, 1991 /
224 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
232 path( 1: 1 ) =
'Zomplex precision'
237 matpath( 1: 1 ) =
'Zomplex precision'
238 matpath( 2: 3 ) =
'SY'
244 iseed( i ) = iseedy( i )
246 lwork = max( 2*nmax, nmax*nrhs )
251 $
CALL zerrvx( path, nout )
272 DO 170 imat = 1, nimat
276 IF( .NOT.dotype( imat ) )
281 zerot = imat.GE.3 .AND. imat.LE.6
282 IF( zerot .AND. n.LT.imat-2 )
288 uplo = uplos( iuplo )
290 IF( imat.NE.ntypes )
THEN
297 CALL zlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
298 $ mode, cndnum, dist )
303 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
304 $ cndnum, anorm, kl, ku, uplo, a, lda,
310 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
311 $ -1, -1, -1, imat, nfail, nerrs, nout )
321 ELSE IF( imat.EQ.4 )
THEN
331 IF( iuplo.EQ.1 )
THEN
332 ioff = ( izero-1 )*lda
333 DO 20 i = 1, izero - 1
343 DO 40 i = 1, izero - 1
353 IF( iuplo.EQ.1 )
THEN
387 CALL zlatsy( uplo, n, a, lda, iseed )
390 DO 150 ifact = 1, nfact
394 fact = facts( ifact )
404 ELSE IF( ifact.EQ.1 )
THEN
408 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
413 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
414 CALL zsytrf_rk( uplo, n, afac, lda, e, iwork, ainv,
419 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
420 lwork = (n+nb+1)*(nb+3)
425 CALL zsytri_3( uplo, n, ainv, lda, e, iwork,
426 $ work, lwork, info )
427 ainvnm = zlansy(
'1', uplo, n, ainv, lda, rwork )
431 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
434 rcondc = ( one / anorm ) / ainvnm
441 CALL zlarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
442 $ nrhs, a, lda, xact, lda, b, lda, iseed,
448 IF( ifact.EQ.2 )
THEN
449 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
450 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
456 CALL zsysv_rk( uplo, n, nrhs, afac, lda, e, iwork,
457 $ x, lda, work, lwork, info )
465 IF( iwork( k ).LT.0 )
THEN
466 IF( iwork( k ).NE.-k )
THEN
470 ELSE IF( iwork( k ).NE.k )
THEN
479 CALL alaerh( path,
'ZSYSV_RK', info, k, uplo,
480 $ n, n, -1, -1, nrhs, imat, nfail,
483 ELSE IF( info.NE.0 )
THEN
490 CALL zsyt01_3( uplo, n, a, lda, afac, lda, e,
491 $ iwork, ainv, lda, rwork,
496 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
497 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
498 $ lda, rwork, result( 2 ) )
503 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
511 IF( result( k ).GE.thresh )
THEN
512 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
513 $
CALL aladhd( nout, path )
514 WRITE( nout, fmt = 9999 )
'ZSYSV_RK', uplo,
515 $ n, imat, k, result( k )
531 CALL alasvm( path, nout, nfail, nrun, nerrs )
533 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
534 $
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
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 aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine zsysv_rk(uplo, n, nrhs, a, lda, e, ipiv, b, ldb, work, lwork, info)
ZSYSV_RK computes the solution to system of linear equations A * X = B for SY matrices
subroutine zsytrf_rk(uplo, n, a, lda, e, ipiv, work, lwork, info)
ZSYTRF_RK computes the factorization of a complex symmetric indefinite matrix using the bounded Bunch...
subroutine zsytri_3(uplo, n, a, lda, e, ipiv, work, lwork, info)
ZSYTRI_3
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zdrvsy_rk(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, e, ainv, b, x, xact, work, rwork, iwork, nout)
ZDRVSY_RK
subroutine zerrvx(path, nunit)
ZERRVX
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
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 zlatsy(uplo, n, x, ldx, iseed)
ZLATSY
subroutine zsyt01_3(uplo, n, a, lda, afac, ldafac, e, ipiv, c, ldc, rwork, resid)
ZSYT01_3
subroutine zsyt02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZSYT02