170 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
171 $ XACT, WORK, RWORK, IWORK, NOUT )
179 INTEGER NMAX, NN, NNB, NNS, NOUT
180 DOUBLE PRECISION THRESH
184 INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
185 DOUBLE PRECISION RWORK( * )
186 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
187 $ work( * ), x( * ), xact( * )
193 DOUBLE PRECISION ZERO, ONE
194 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
195 DOUBLE PRECISION ONEHALF
196 parameter( onehalf = 0.5d+0 )
197 DOUBLE PRECISION EIGHT, SEVTEN
198 parameter( eight = 8.0d+0, sevten = 17.0d+0 )
200 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
202 parameter( ntypes = 11 )
204 parameter( ntests = 7 )
207 LOGICAL TRFCON, ZEROT
208 CHARACTER DIST,
TYPE, UPLO, XTYPE
209 CHARACTER*3 PATH, MATPATH
210 INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
211 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
212 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
213 DOUBLE PRECISION ALPHA, ANORM, CNDNUM, CONST, DTEMP, SING_MAX,
214 $ SING_MIN, RCOND, RCONDC
218 INTEGER ISEED( 4 ), ISEEDY( 4 )
219 DOUBLE PRECISION RESULT( NTESTS )
220 COMPLEX*16 BLOCK( 2, 2 ), ZDUMMY( 1 )
223 DOUBLE PRECISION DGET06, ZLANGE, ZLANSY
224 EXTERNAL DGET06, ZLANGE, ZLANSY
233 INTRINSIC max, min, sqrt
241 COMMON / infoc / infot, nunit, ok, lerr
242 COMMON / srnamc / srnamt
245 DATA iseedy / 1988, 1989, 1990, 1991 /
246 DATA uplos /
'U',
'L' /
252 alpha = ( one+sqrt( sevten ) ) / eight
256 path( 1: 1 ) =
'Zomplex precision'
261 matpath( 1: 1 ) =
'Zomplex precision'
262 matpath( 2: 3 ) =
'SY'
268 iseed( i ) = iseedy( i )
274 $
CALL zerrsy( path, nout )
296 DO 260 imat = 1, nimat
300 IF( .NOT.dotype( imat ) )
305 zerot = imat.GE.3 .AND. imat.LE.6
306 IF( zerot .AND. n.LT.imat-2 )
312 uplo = uplos( iuplo )
316 IF( imat.NE.ntypes )
THEN
321 CALL zlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
322 $ mode, cndnum, dist )
327 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
328 $ cndnum, anorm, kl, ku, uplo, a, lda,
334 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
335 $ -1, -1, -1, imat, nfail, nerrs, nout )
349 ELSE IF( imat.EQ.4 )
THEN
359 IF( iuplo.EQ.1 )
THEN
360 ioff = ( izero-1 )*lda
361 DO 20 i = 1, izero - 1
371 DO 40 i = 1, izero - 1
381 IF( iuplo.EQ.1 )
THEN
417 CALL zlatsy( uplo, n, a, lda, iseed )
438 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
445 lwork = max( 2, nb )*lda
446 srnamt =
'ZSYTRF_ROOK'
456 IF( iwork( k ).LT.0 )
THEN
457 IF( iwork( k ).NE.-k )
THEN
461 ELSE IF( iwork( k ).NE.k )
THEN
470 $
CALL alaerh( path,
'ZSYTRF_ROOK', info, k,
471 $ uplo, n, n, -1, -1, nb, imat,
472 $ nfail, nerrs, nout )
485 CALL zsyt01_rook( uplo, n, a, lda, afac, lda, iwork,
486 $ ainv, lda, rwork, result( 1 ) )
495 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
496 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
497 srnamt =
'ZSYTRI_ROOK'
504 $
CALL alaerh( path,
'ZSYTRI_ROOK', info, -1,
505 $ uplo, n, n, -1, -1, -1, imat,
506 $ nfail, nerrs, nout )
511 CALL zsyt03( uplo, n, a, lda, ainv, lda, work, lda,
512 $ rwork, rcondc, result( 2 ) )
520 IF( result( k ).GE.thresh )
THEN
521 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
522 $
CALL alahd( nout, path )
523 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
536 const = ( ( alpha**2-one ) / ( alpha**2-onehalf ) ) /
539 IF( iuplo.EQ.1 )
THEN
548 IF( iwork( k ).GT.zero )
THEN
553 dtemp = zlange(
'M', k-1, 1,
554 $ afac( ( k-1 )*lda+1 ), lda, rwork )
560 dtemp = zlange(
'M', k-2, 2,
561 $ afac( ( k-2 )*lda+1 ), lda, rwork )
568 dtemp = dtemp - const + thresh
569 IF( dtemp.GT.result( 3 ) )
570 $ result( 3 ) = dtemp
586 IF( iwork( k ).GT.zero )
THEN
591 dtemp = zlange(
'M', n-k, 1,
592 $ afac( ( k-1 )*lda+k+1 ), lda, rwork )
598 dtemp = zlange(
'M', n-k-1, 2,
599 $ afac( ( k-1 )*lda+k+2 ), lda, rwork )
606 dtemp = dtemp - const + thresh
607 IF( dtemp.GT.result( 3 ) )
608 $ result( 3 ) = dtemp
624 const = ( ( alpha**2-one ) / ( alpha**2-onehalf ) )*
625 $ ( ( one + alpha ) / ( one - alpha ) )
627 IF( iuplo.EQ.1 )
THEN
636 IF( iwork( k ).LT.zero )
THEN
642 block( 1, 1 ) = afac( ( k-2 )*lda+k-1 )
643 block( 1, 2 ) = afac( (k-1)*lda+k-1 )
644 block( 2, 1 ) = block( 1, 2 )
645 block( 2, 2 ) = afac( (k-1)*lda+k )
647 CALL zgesvd(
'N',
'N', 2, 2, block, 2, rwork,
648 $ zdummy, 1, zdummy, 1,
649 $ work, 6, rwork( 3 ), info )
652 sing_max = rwork( 1 )
653 sing_min = rwork( 2 )
655 dtemp = sing_max / sing_min
659 dtemp = dtemp - const + thresh
660 IF( dtemp.GT.result( 4 ) )
661 $ result( 4 ) = dtemp
680 IF( iwork( k ).LT.zero )
THEN
686 block( 1, 1 ) = afac( ( k-1 )*lda+k )
687 block( 2, 1 ) = afac( ( k-1 )*lda+k+1 )
688 block( 1, 2 ) = block( 2, 1 )
689 block( 2, 2 ) = afac( k*lda+k+1 )
691 CALL zgesvd(
'N',
'N', 2, 2, block, 2, rwork,
692 $ zdummy, 1, zdummy, 1,
693 $ work, 6, rwork(3), info )
695 sing_max = rwork( 1 )
696 sing_min = rwork( 2 )
698 dtemp = sing_max / sing_min
702 dtemp = dtemp - const + thresh
703 IF( dtemp.GT.result( 4 ) )
704 $ result( 4 ) = dtemp
719 IF( result( k ).GE.thresh )
THEN
720 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
721 $
CALL alahd( nout, path )
722 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
754 CALL zlarhs( matpath, xtype, uplo,
' ', n, n,
755 $ kl, ku, nrhs, a, lda, xact, lda,
756 $ b, lda, iseed, info )
757 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
759 srnamt =
'ZSYTRS_ROOK'
766 $
CALL alaerh( path,
'ZSYTRS_ROOK', info, 0,
767 $ uplo, n, n, -1, -1, nrhs, imat,
768 $ nfail, nerrs, nout )
770 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
774 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
775 $ lda, rwork, result( 5 ) )
780 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
787 IF( result( k ).GE.thresh )
THEN
788 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
789 $
CALL alahd( nout, path )
790 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
791 $ imat, k, result( k )
805 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
806 srnamt =
'ZSYCON_ROOK'
807 CALL zsycon_rook( uplo, n, afac, lda, iwork, anorm,
808 $ rcond, work, info )
813 $
CALL alaerh( path,
'ZSYCON_ROOK', info, 0,
814 $ uplo, n, n, -1, -1, -1, imat,
815 $ nfail, nerrs, nout )
819 result( 7 ) = dget06( rcond, rcondc )
824 IF( result( 7 ).GE.thresh )
THEN
825 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
826 $
CALL alahd( nout, path )
827 WRITE( nout, fmt = 9997 )uplo, n, imat, 7,
840 CALL alasum( path, nout, nfail, nrun, nerrs )
842 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
843 $ i2,
', test ', i2,
', ratio =', g12.5 )
844 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
845 $ i2,
', test(', i2,
') =', g12.5 )
846 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
847 $
', 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 zgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)
ZGESVD computes the singular value decomposition (SVD) for GE matrices
subroutine zsycon_rook(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
ZSYCON_ROOK
subroutine zsytrf_rook(uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRF_ROOK
subroutine zsytri_rook(uplo, n, a, lda, ipiv, work, info)
ZSYTRI_ROOK
subroutine zsytrs_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
ZSYTRS_ROOK
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zchksy_rook(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
ZCHKSY_ROOK
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 zsyt01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZSYT01_ROOK
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