168 SUBROUTINE zchksy( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
169 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
170 $ XACT, WORK, RWORK, IWORK, NOUT )
178 INTEGER NMAX, NN, NNB, NNS, NOUT
179 DOUBLE PRECISION THRESH
183 INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
184 DOUBLE PRECISION RWORK( * )
185 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
186 $ work( * ), x( * ), xact( * )
192 DOUBLE PRECISION ZERO
193 PARAMETER ( ZERO = 0.0d+0 )
195 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
197 parameter( ntypes = 11 )
199 parameter( ntests = 9 )
202 LOGICAL TRFCON, ZEROT
203 CHARACTER DIST,
TYPE, UPLO, XTYPE
205 INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
206 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
207 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
208 DOUBLE PRECISION ANORM, CNDNUM, RCOND, RCONDC
212 INTEGER ISEED( 4 ), ISEEDY( 4 )
213 DOUBLE PRECISION RESULT( NTESTS )
216 DOUBLE PRECISION DGET06, ZLANSY
217 EXTERNAL DGET06, ZLANSY
234 COMMON / infoc / infot, nunit, ok, lerr
235 COMMON / srnamc / srnamt
238 DATA iseedy / 1988, 1989, 1990, 1991 /
239 DATA uplos /
'U',
'L' /
245 path( 1: 1 ) =
'Zomplex precision'
251 iseed( i ) = iseedy( i )
257 $
CALL zerrsy( path, nout )
279 DO 170 imat = 1, nimat
283 IF( .NOT.dotype( imat ) )
288 zerot = imat.GE.3 .AND. imat.LE.6
289 IF( zerot .AND. n.LT.imat-2 )
295 uplo = uplos( iuplo )
299 IF( imat.NE.ntypes )
THEN
304 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm,
305 $ mode, cndnum, dist )
310 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
311 $ cndnum, anorm, kl, ku,
'N', a, lda, work,
317 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
318 $ -1, -1, -1, imat, nfail, nerrs, nout )
332 ELSE IF( imat.EQ.4 )
THEN
342 IF( iuplo.EQ.1 )
THEN
343 ioff = ( izero-1 )*lda
344 DO 20 i = 1, izero - 1
354 DO 40 i = 1, izero - 1
364 IF( iuplo.EQ.1 )
THEN
400 CALL zlatsy( uplo, n, a, lda, iseed )
421 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
428 lwork = max( 2, nb )*lda
430 CALL zsytrf( uplo, n, afac, lda, iwork, ainv, lwork,
439 IF( iwork( k ).LT.0 )
THEN
440 IF( iwork( k ).NE.-k )
THEN
444 ELSE IF( iwork( k ).NE.k )
THEN
453 $
CALL alaerh( path,
'ZSYTRF', info, k, uplo, n, n,
454 $ -1, -1, nb, imat, nfail, nerrs, nout )
467 CALL zsyt01( uplo, n, a, lda, afac, lda, iwork, ainv,
468 $ lda, rwork, result( 1 ) )
477 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
478 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
480 lwork = (n+nb+1)*(nb+3)
481 CALL zsytri2( uplo, n, ainv, lda, iwork, work,
487 $
CALL alaerh( path,
'ZSYTRI2', info, 0, uplo, n,
488 $ n, -1, -1, -1, imat, nfail, nerrs,
494 CALL zsyt03( uplo, n, a, lda, ainv, lda, work, lda,
495 $ rwork, rcondc, result( 2 ) )
503 IF( result( k ).GE.thresh )
THEN
504 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
505 $
CALL alahd( nout, path )
506 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
538 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
539 $ nrhs, a, lda, xact, lda, b, lda,
541 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
544 CALL zsytrs( uplo, n, nrhs, afac, lda, iwork, x,
550 $
CALL alaerh( path,
'ZSYTRS', info, 0, uplo, n,
551 $ n, -1, -1, nrhs, imat, nfail,
554 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
558 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
559 $ lda, rwork, result( 3 ) )
568 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
569 $ nrhs, a, lda, xact, lda, b, lda,
571 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
574 CALL zsytrs2( uplo, n, nrhs, afac, lda, iwork, x,
580 $
CALL alaerh( path,
'ZSYTRS', info, 0, uplo, n,
581 $ n, -1, -1, nrhs, imat, nfail,
584 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
588 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
589 $ lda, rwork, result( 4 ) )
595 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
602 CALL zsyrfs( uplo, n, nrhs, a, lda, afac, lda,
603 $ iwork, b, lda, x, lda, rwork,
604 $ rwork( nrhs+1 ), work,
605 $ rwork( 2*nrhs+1 ), info )
610 $
CALL alaerh( path,
'ZSYRFS', info, 0, uplo, n,
611 $ n, -1, -1, nrhs, imat, nfail,
614 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
616 CALL zpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
617 $ xact, lda, rwork, rwork( nrhs+1 ),
624 IF( result( k ).GE.thresh )
THEN
625 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
626 $
CALL alahd( nout, path )
627 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
628 $ imat, k, result( k )
642 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
644 CALL zsycon( uplo, n, afac, lda, iwork, anorm, rcond,
650 $
CALL alaerh( path,
'ZSYCON', info, 0, uplo, n, n,
651 $ -1, -1, -1, imat, nfail, nerrs, nout )
655 result( 9 ) = dget06( rcond, rcondc )
660 IF( result( 9 ).GE.thresh )
THEN
661 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
662 $
CALL alahd( nout, path )
663 WRITE( nout, fmt = 9997 )uplo, n, imat, 9,
675 CALL alasum( path, nout, nfail, nrun, nerrs )
677 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
678 $ i2,
', test ', i2,
', ratio =', g12.5 )
679 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
680 $ i2,
', test(', i2,
') =', g12.5 )
681 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
682 $
', test(', i2,
') =', g12.5 )
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 zsycon(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
ZSYCON
subroutine zsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZSYRFS
subroutine zsytrf(uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRF
subroutine zsytri2(uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRI2
subroutine zsytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
ZSYTRS2
subroutine zsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
ZSYTRS
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zchksy(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
ZCHKSY
subroutine zerrsy(path, nunit)
ZERRSY
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 zpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPOT05
subroutine zsyt01(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZSYT01
subroutine zsyt02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZSYT02
subroutine zsyt03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
ZSYT03