173 SUBROUTINE schksy_rk( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
174 $ THRESH, TSTERR, NMAX, A, AFAC, E, AINV, B,
175 $ X, XACT, WORK, RWORK, IWORK, NOUT )
183 INTEGER NMAX, NN, NNB, NNS, NOUT
188 INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
189 REAL A( * ), AFAC( * ), AINV( * ), B( * ), E( * ),
190 $ rwork( * ), work( * ), x( * ), xact( * )
197 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
199 parameter( eight = 8.0e+0, sevten = 17.0e+0 )
201 parameter( ntypes = 10 )
203 parameter( ntests = 7 )
206 LOGICAL TRFCON, ZEROT
207 CHARACTER DIST,
TYPE, UPLO, XTYPE
208 CHARACTER*3 PATH, MATPATH
209 INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
210 $ iuplo, izero, j, k, kl, ku, lda, lwork,
211 $ mode, n, nb, nerrs, nfail, nimat, nrhs, nrun,
213 REAL ALPHA, ANORM, CNDNUM, CONST, STEMP, SING_MAX,
214 $ SING_MIN, RCOND, RCONDC
218 INTEGER ISEED( 4 ), ISEEDY( 4 )
219 REAL BLOCK( 2, 2 ), SDUMMY( 1 ), RESULT( NTESTS )
222 REAL SGET06, SLANGE, SLANSY
223 EXTERNAL SGET06, SLANGE, SLANSY
232 INTRINSIC max, min, sqrt
240 COMMON / infoc / infot, nunit, ok, lerr
241 COMMON / srnamc / srnamt
244 DATA iseedy / 1988, 1989, 1990, 1991 /
245 DATA uplos /
'U',
'L' /
251 alpha = ( one+sqrt( sevten ) ) / eight
255 path( 1: 1 ) =
'Single precision'
260 matpath( 1: 1 ) =
'Single precision'
261 matpath( 2: 3 ) =
'SY'
267 iseed( i ) = iseedy( i )
273 $
CALL serrsy( path, nout )
295 DO 260 imat = 1, nimat
299 IF( .NOT.dotype( imat ) )
304 zerot = imat.GE.3 .AND. imat.LE.6
305 IF( zerot .AND. n.LT.imat-2 )
311 uplo = uplos( iuplo )
318 CALL slatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
319 $ mode, cndnum, dist )
324 CALL slatms( n, n, dist, iseed,
TYPE, rwork, mode,
325 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
331 CALL alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
332 $ -1, -1, imat, nfail, nerrs, nout )
346 ELSE IF( imat.EQ.4 )
THEN
356 IF( iuplo.EQ.1 )
THEN
357 ioff = ( izero-1 )*lda
358 DO 20 i = 1, izero - 1
368 DO 40 i = 1, izero - 1
378 IF( iuplo.EQ.1 )
THEN
425 CALL slacpy( uplo, n, n, a, lda, afac, lda )
432 lwork = max( 2, nb )*lda
434 CALL ssytrf_rk( uplo, n, afac, lda, e, iwork, ainv,
443 IF( iwork( k ).LT.0 )
THEN
444 IF( iwork( k ).NE.-k )
THEN
448 ELSE IF( iwork( k ).NE.k )
THEN
457 $
CALL alaerh( path,
'SSYTRF_RK', info, k,
458 $ uplo, n, n, -1, -1, nb, imat,
459 $ nfail, nerrs, nout )
472 CALL ssyt01_3( uplo, n, a, lda, afac, lda, e, iwork,
473 $ ainv, lda, rwork, result( 1 ) )
482 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
483 CALL slacpy( uplo, n, n, afac, lda, ainv, lda )
490 lwork = (n+nb+1)*(nb+3)
491 CALL ssytri_3( uplo, n, ainv, lda, e, iwork, work,
497 $
CALL alaerh( path,
'SSYTRI_3', info, -1,
498 $ uplo, n, n, -1, -1, -1, imat,
499 $ nfail, nerrs, nout )
504 CALL spot03( uplo, n, a, lda, ainv, lda, work, lda,
505 $ rwork, rcondc, result( 2 ) )
513 IF( result( k ).GE.thresh )
THEN
514 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
515 $
CALL alahd( nout, path )
516 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
529 const = one / ( one-alpha )
531 IF( iuplo.EQ.1 )
THEN
540 IF( iwork( k ).GT.zero )
THEN
545 stemp = slange(
'M', k-1, 1,
546 $ afac( ( k-1 )*lda+1 ), lda, rwork )
552 stemp = slange(
'M', k-2, 2,
553 $ afac( ( k-2 )*lda+1 ), lda, rwork )
560 stemp = stemp - const + thresh
561 IF( stemp.GT.result( 3 ) )
562 $ result( 3 ) = stemp
578 IF( iwork( k ).GT.zero )
THEN
583 stemp = slange(
'M', n-k, 1,
584 $ afac( ( k-1 )*lda+k+1 ), lda, rwork )
590 stemp = slange(
'M', n-k-1, 2,
591 $ afac( ( k-1 )*lda+k+2 ), lda, rwork )
598 stemp = stemp - const + thresh
599 IF( stemp.GT.result( 3 ) )
600 $ result( 3 ) = stemp
615 const = ( one+alpha ) / ( one-alpha )
616 CALL slacpy( uplo, n, n, afac, lda, ainv, lda )
618 IF( iuplo.EQ.1 )
THEN
627 IF( iwork( k ).LT.zero )
THEN
633 block( 1, 1 ) = afac( ( k-2 )*lda+k-1 )
634 block( 1, 2 ) = e( k )
635 block( 2, 1 ) = block( 1, 2 )
636 block( 2, 2 ) = afac( (k-1)*lda+k )
638 CALL sgesvd(
'N',
'N', 2, 2, block, 2, rwork,
639 $ sdummy, 1, sdummy, 1,
642 sing_max = rwork( 1 )
643 sing_min = rwork( 2 )
645 stemp = sing_max / sing_min
649 stemp = stemp - const + thresh
650 IF( stemp.GT.result( 4 ) )
651 $ result( 4 ) = stemp
670 IF( iwork( k ).LT.zero )
THEN
676 block( 1, 1 ) = afac( ( k-1 )*lda+k )
677 block( 2, 1 ) = e( k )
678 block( 1, 2 ) = block( 2, 1 )
679 block( 2, 2 ) = afac( k*lda+k+1 )
681 CALL sgesvd(
'N',
'N', 2, 2, block, 2, rwork,
682 $ sdummy, 1, sdummy, 1,
686 sing_max = rwork( 1 )
687 sing_min = rwork( 2 )
689 stemp = sing_max / sing_min
693 stemp = stemp - const + thresh
694 IF( stemp.GT.result( 4 ) )
695 $ result( 4 ) = stemp
710 IF( result( k ).GE.thresh )
THEN
711 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
712 $
CALL alahd( nout, path )
713 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
745 CALL slarhs( matpath, xtype, uplo,
' ', n, n,
746 $ kl, ku, nrhs, a, lda, xact, lda,
747 $ b, lda, iseed, info )
748 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
751 CALL ssytrs_3( uplo, n, nrhs, afac, lda, e, iwork,
757 $
CALL alaerh( path,
'SSYTRS_3', info, 0,
758 $ uplo, n, n, -1, -1, nrhs, imat,
759 $ nfail, nerrs, nout )
761 CALL slacpy(
'Full', n, nrhs, b, lda, work, lda )
765 CALL spot02( uplo, n, nrhs, a, lda, x, lda, work,
766 $ lda, rwork, result( 5 ) )
771 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
778 IF( result( k ).GE.thresh )
THEN
779 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
780 $
CALL alahd( nout, path )
781 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
782 $ imat, k, result( k )
796 anorm = slansy(
'1', uplo, n, a, lda, rwork )
798 CALL ssycon_3( uplo, n, afac, lda, e, iwork, anorm,
799 $ rcond, work, iwork( n+1 ), info )
804 $
CALL alaerh( path,
'SSYCON_3', info, 0,
805 $ uplo, n, n, -1, -1, -1, imat,
806 $ nfail, nerrs, nout )
810 result( 7 ) = sget06( rcond, rcondc )
815 IF( result( 7 ).GE.thresh )
THEN
816 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
817 $
CALL alahd( nout, path )
818 WRITE( nout, fmt = 9997 ) uplo, n, imat, 7,
831 CALL alasum( path, nout, nfail, nrun, nerrs )
833 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
834 $ i2,
', test ', i2,
', ratio =', g12.5 )
835 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
836 $ i2,
', test(', i2,
') =', g12.5 )
837 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
838 $
', test(', i2,
') =', g12.5 )
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine slarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
SLARHS
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine sgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info)
SGESVD computes the singular value decomposition (SVD) for GE matrices
subroutine ssycon_3(uplo, n, a, lda, e, ipiv, anorm, rcond, work, iwork, info)
SSYCON_3
subroutine ssytrf_rk(uplo, n, a, lda, e, ipiv, work, lwork, info)
SSYTRF_RK computes the factorization of a real symmetric indefinite matrix using the bounded Bunch-Ka...
subroutine ssytri_3(uplo, n, a, lda, e, ipiv, work, lwork, info)
SSYTRI_3
subroutine ssytrs_3(uplo, n, nrhs, a, lda, e, ipiv, b, ldb, info)
SSYTRS_3
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine schksy_rk(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, e, ainv, b, x, xact, work, rwork, iwork, nout)
SCHKSY_RK
subroutine serrsy(path, nunit)
SERRSY
subroutine sget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
SGET04
subroutine slatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
SLATB4
subroutine slatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
SLATMS
subroutine spot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
SPOT02
subroutine spot03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
SPOT03
subroutine ssyt01_3(uplo, n, a, lda, afac, ldafac, e, ipiv, c, ldc, rwork, resid)
SSYT01_3