182 INTEGER nmax, nn, nnb, nns, nout
183 DOUBLE PRECISION thresh
187 INTEGER iwork( * ), nbval( * ), nsval( * ), nval( * )
188 DOUBLE PRECISION rwork( * )
189 COMPLEX*16 a( * ), afac( * ), ainv( * ), b( * ),
190 $ work( * ), x( * ), xact( * )
196 DOUBLE PRECISION zero, one
197 parameter ( zero = 0.0d+0, one = 1.0d+0 )
198 DOUBLE PRECISION onehalf
199 parameter ( onehalf = 0.5d+0 )
200 DOUBLE PRECISION eight, sevten
201 parameter ( eight = 8.0d+0, sevten = 17.0d+0 )
203 parameter ( czero = ( 0.0d+0, 0.0d+0 ) )
205 parameter ( ntypes = 11 )
207 parameter ( ntests = 7 )
210 LOGICAL trfcon, zerot
211 CHARACTER dist,
TYPE, uplo, xtype
212 CHARACTER*3 path, matpath
213 INTEGER i, i1, i2, imat, in, inb, info, ioff, irhs,
214 $ itemp, itemp2, iuplo, izero, j, k, kl, ku, lda,
215 $ lwork, mode, n, nb, nerrs, nfail, nimat, nrhs,
217 DOUBLE PRECISION alpha, anorm, cndnum, const, dtemp, sing_max,
218 $ sing_min, rcond, rcondc
222 INTEGER iseed( 4 ), iseedy( 4 )
223 DOUBLE PRECISION result( ntests )
224 COMPLEX*16 block( 2, 2 ), zdummy( 1 )
237 INTRINSIC max, min, sqrt
245 COMMON / infoc / infot, nunit, ok, lerr
246 COMMON / srnamc / srnamt
249 DATA iseedy / 1988, 1989, 1990, 1991 /
250 DATA uplos /
'U',
'L' /
256 alpha = ( one+sqrt( sevten ) ) / eight
260 path( 1: 1 ) =
'Zomplex precision'
265 matpath( 1: 1 ) =
'Zomplex precision'
266 matpath( 2: 3 ) =
'SY'
272 iseed( i ) = iseedy( i )
278 $
CALL zerrsy( path, nout )
300 DO 260 imat = 1, nimat
304 IF( .NOT.dotype( imat ) )
309 zerot = imat.GE.3 .AND. imat.LE.6
310 IF( zerot .AND. n.LT.imat-2 )
316 uplo = uplos( iuplo )
320 IF( imat.NE.ntypes )
THEN
325 CALL zlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
326 $ mode, cndnum, dist )
331 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
332 $ cndnum, anorm, kl, ku, uplo, a, lda,
338 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
339 $ -1, -1, -1, imat, nfail, nerrs, nout )
353 ELSE IF( imat.EQ.4 )
THEN
363 IF( iuplo.EQ.1 )
THEN
364 ioff = ( izero-1 )*lda
365 DO 20 i = 1, izero - 1
375 DO 40 i = 1, izero - 1
385 IF( iuplo.EQ.1 )
THEN
421 CALL zlatsy( uplo, n, a, lda, iseed )
442 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
449 lwork = max( 2, nb )*lda
450 srnamt =
'ZSYTRF_ROOK'
460 IF( iwork( k ).LT.0 )
THEN
461 IF( iwork( k ).NE.-k )
THEN
465 ELSE IF( iwork( k ).NE.k )
THEN
474 $
CALL alaerh( path,
'ZSYTRF_ROOK', info, k,
475 $ uplo, n, n, -1, -1, nb, imat,
476 $ nfail, nerrs, nout )
489 CALL zsyt01_rook( uplo, n, a, lda, afac, lda, iwork,
490 $ ainv, lda, rwork, result( 1 ) )
499 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
500 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
501 srnamt =
'ZSYTRI_ROOK'
508 $
CALL alaerh( path,
'ZSYTRI_ROOK', info, -1,
509 $ uplo, n, n, -1, -1, -1, imat,
510 $ nfail, nerrs, nout )
515 CALL zsyt03( uplo, n, a, lda, ainv, lda, work, lda,
516 $ rwork, rcondc, result( 2 ) )
524 IF( result( k ).GE.thresh )
THEN
525 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
526 $
CALL alahd( nout, path )
527 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
540 const = ( ( alpha**2-one ) / ( alpha**2-onehalf ) ) /
543 IF( iuplo.EQ.1 )
THEN
552 IF( iwork( k ).GT.zero )
THEN
557 dtemp =
zlange(
'M', k-1, 1,
558 $ afac( ( k-1 )*lda+1 ), lda, rwork )
564 dtemp =
zlange(
'M', k-2, 2,
565 $ afac( ( k-2 )*lda+1 ), lda, rwork )
572 dtemp = dtemp - const + thresh
573 IF( dtemp.GT.result( 3 ) )
574 $ result( 3 ) = dtemp
590 IF( iwork( k ).GT.zero )
THEN
595 dtemp =
zlange(
'M', n-k, 1,
596 $ afac( ( k-1 )*lda+k+1 ), lda, rwork )
602 dtemp =
zlange(
'M', n-k-1, 2,
603 $ afac( ( k-1 )*lda+k+2 ), lda, rwork )
610 dtemp = dtemp - const + thresh
611 IF( dtemp.GT.result( 3 ) )
612 $ result( 3 ) = dtemp
628 const = ( ( alpha**2-one ) / ( alpha**2-onehalf ) )*
629 $ ( ( one + alpha ) / ( one - alpha ) )
631 IF( iuplo.EQ.1 )
THEN
640 IF( iwork( k ).LT.zero )
THEN
646 block( 1, 1 ) = afac( ( k-2 )*lda+k-1 )
647 block( 1, 2 ) = afac( (k-1)*lda+k-1 )
648 block( 2, 1 ) = block( 1, 2 )
649 block( 2, 2 ) = afac( (k-1)*lda+k )
651 CALL zgesvd(
'N',
'N', 2, 2, block, 2, rwork,
652 $ zdummy, 1, zdummy, 1,
653 $ work, 6, rwork( 3 ), info )
656 sing_max = rwork( 1 )
657 sing_min = rwork( 2 )
659 dtemp = sing_max / sing_min
663 dtemp = dtemp - const + thresh
664 IF( dtemp.GT.result( 4 ) )
665 $ result( 4 ) = dtemp
684 IF( iwork( k ).LT.zero )
THEN
690 block( 1, 1 ) = afac( ( k-1 )*lda+k )
691 block( 2, 1 ) = afac( ( k-1 )*lda+k+1 )
692 block( 1, 2 ) = block( 2, 1 )
693 block( 2, 2 ) = afac( k*lda+k+1 )
695 CALL zgesvd(
'N',
'N', 2, 2, block, 2, rwork,
696 $ zdummy, 1, zdummy, 1,
697 $ work, 6, rwork(3), info )
699 sing_max = rwork( 1 )
700 sing_min = rwork( 2 )
702 dtemp = sing_max / sing_min
706 dtemp = dtemp - const + thresh
707 IF( dtemp.GT.result( 4 ) )
708 $ result( 4 ) = dtemp
723 IF( result( k ).GE.thresh )
THEN
724 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
725 $
CALL alahd( nout, path )
726 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
758 CALL zlarhs( matpath, xtype, uplo,
' ', n, n,
759 $ kl, ku, nrhs, a, lda, xact, lda,
760 $ b, lda, iseed, info )
761 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
763 srnamt =
'ZSYTRS_ROOK'
770 $
CALL alaerh( path,
'ZSYTRS_ROOK', info, 0,
771 $ uplo, n, n, -1, -1, nrhs, imat,
772 $ nfail, nerrs, nout )
774 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
778 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
779 $ lda, rwork, result( 5 ) )
784 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
791 IF( result( k ).GE.thresh )
THEN
792 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
793 $
CALL alahd( nout, path )
794 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
795 $ imat, k, result( k )
809 anorm =
zlansy(
'1', uplo, n, a, lda, rwork )
810 srnamt =
'ZSYCON_ROOK'
811 CALL zsycon_rook( uplo, n, afac, lda, iwork, anorm,
812 $ rcond, work, info )
817 $
CALL alaerh( path,
'ZSYCON_ROOK', info, 0,
818 $ uplo, n, n, -1, -1, -1, imat,
819 $ nfail, nerrs, nout )
823 result( 7 ) =
dget06( rcond, rcondc )
828 IF( result( 7 ).GE.thresh )
THEN
829 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
830 $
CALL alahd( nout, path )
831 WRITE( nout, fmt = 9997 )uplo, n, imat, 7,
844 CALL alasum( path, nout, nfail, nrun, nerrs )
846 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
847 $ i2,
', test ', i2,
', ratio =', g12.5 )
848 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
849 $ i2,
', test(', i2,
') =', g12.5 )
850 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
851 $
', test(', i2,
') =', g12.5 )
subroutine alahd(IOUNIT, PATH)
ALAHD
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine zsyt01_rook(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
ZSYT01_ROOK
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
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 zerrsy(PATH, NUNIT)
ZERRSY
subroutine zsytri_rook(UPLO, N, A, LDA, IPIV, WORK, INFO)
ZSYTRI_ROOK
subroutine zget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
ZGET04
subroutine zsytrf_rook(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
ZSYTRF_ROOK
subroutine zlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
ZLARHS
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine zlatsy(UPLO, N, X, LDX, ISEED)
ZLATSY
subroutine zlatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
ZLATB4
subroutine zsyt03(UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK, RCOND, RESID)
ZSYT03
double precision function zlange(NORM, M, N, A, LDA, WORK)
ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine zsycon_rook(UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, INFO)
ZSYCON_ROOK
double precision function zlansy(NORM, UPLO, N, A, LDA, WORK)
ZLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex symmetric matrix.
subroutine zsyt02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
ZSYT02
double precision function dget06(RCOND, RCONDC)
DGET06
subroutine zlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
ZLATMS
subroutine zsytrs_rook(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
ZSYTRS_ROOK
subroutine alasum(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASUM