171 SUBROUTINE schksy( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
172 $ thresh, tsterr, nmax, a, afac, ainv, b, x,
173 $ xact, work, rwork, iwork, nout )
182 INTEGER nmax, nn, nnb, nns, nout
187 INTEGER iwork( * ), nbval( * ), nsval( * ), nval( * )
188 REAL a( * ), afac( * ), ainv( * ), b( * ),
189 $ rwork( * ), work( * ), x( * ), xact( * )
196 parameter( zero = 0.0e+0 )
198 parameter( ntypes = 10 )
200 parameter( ntests = 9 )
203 LOGICAL trfcon, zerot
204 CHARACTER dist, type, uplo, xtype
206 INTEGER i, i1, i2, imat, in, inb, info, ioff, irhs,
207 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
208 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
209 REAL anorm, cndnum, rcond, rcondc
213 INTEGER iseed( 4 ), iseedy( 4 )
214 REAL result( ntests )
235 common / infoc / infot, nunit, ok, lerr
236 common / srnamc / srnamt
239 DATA iseedy / 1988, 1989, 1990, 1991 /
240 DATA uplos /
'U',
'L' /
246 path( 1: 1 ) =
'Single precision'
252 iseed( i ) = iseedy( i )
258 $ CALL
serrsy( path, nout )
280 DO 170 imat = 1, nimat
284 IF( .NOT.dotype( imat ) )
289 zerot = imat.GE.3 .AND. imat.LE.6
290 IF( zerot .AND. n.LT.imat-2 )
296 uplo = uplos( iuplo )
303 CALL
slatb4( path, imat, n, n, type, kl, ku, anorm, mode,
309 CALL
slatms( n, n, dist, iseed, type, rwork, mode,
310 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
316 CALL
alaerh( path,
'SLATMS', info, 0, uplo, n, n, -1,
317 $ -1, -1, imat, nfail, nerrs, nout )
328 ELSE IF( imat.EQ.4 )
THEN
338 IF( iuplo.EQ.1 )
THEN
339 ioff = ( izero-1 )*lda
340 DO 20 i = 1, izero - 1
350 DO 40 i = 1, izero - 1
361 IF( iuplo.EQ.1 )
THEN
405 CALL
slacpy( uplo, n, n, a, lda, afac, lda )
412 lwork = max( 2, nb )*lda
414 CALL
ssytrf( uplo, n, afac, lda, iwork, ainv, lwork,
423 IF( iwork( k ).LT.0 )
THEN
424 IF( iwork( k ).NE.-k )
THEN
428 ELSE IF( iwork( k ).NE.k )
THEN
437 $ CALL
alaerh( path,
'SSYTRF', info, k, uplo, n, n,
438 $ -1, -1, nb, imat, nfail, nerrs, nout )
451 CALL
ssyt01( uplo, n, a, lda, afac, lda, iwork, ainv,
452 $ lda, rwork, result( 1 ) )
461 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
462 CALL
slacpy( uplo, n, n, afac, lda, ainv, lda )
464 lwork = (n+nb+1)*(nb+3)
465 CALL
ssytri2( uplo, n, ainv, lda, iwork, work,
471 $ CALL
alaerh( path,
'SSYTRI2', info, -1, uplo, n,
472 $ n, -1, -1, -1, imat, nfail, nerrs,
478 CALL
spot03( uplo, n, a, lda, ainv, lda, work, lda,
479 $ rwork, rcondc, result( 2 ) )
487 IF( result( k ).GE.thresh )
THEN
488 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
489 $ CALL
alahd( nout, path )
490 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
520 CALL
slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
521 $ nrhs, a, lda, xact, lda, b, lda,
523 CALL
slacpy(
'Full', n, nrhs, b, lda, x, lda )
526 CALL
ssytrs( uplo, n, nrhs, afac, lda, iwork, x,
532 $ CALL
alaerh( path,
'SSYTRS', info, 0, uplo, n,
533 $ n, -1, -1, nrhs, imat, nfail,
536 CALL
slacpy(
'Full', n, nrhs, b, lda, work, lda )
540 CALL
spot02( uplo, n, nrhs, a, lda, x, lda, work,
541 $ lda, rwork, result( 3 ) )
550 CALL
slarhs( path, xtype, uplo,
' ', n, n, kl, ku,
551 $ nrhs, a, lda, xact, lda, b, lda,
553 CALL
slacpy(
'Full', n, nrhs, b, lda, x, lda )
556 CALL
ssytrs2( uplo, n, nrhs, afac, lda, iwork, x,
562 $ CALL
alaerh( path,
'SSYTRS2', info, 0, uplo, n,
563 $ n, -1, -1, nrhs, imat, nfail,
566 CALL
slacpy(
'Full', n, nrhs, b, lda, work, lda )
570 CALL
spot02( uplo, n, nrhs, a, lda, x, lda, work,
571 $ lda, rwork, result( 4 ) )
576 CALL
sget04( n, nrhs, x, lda, xact, lda, rcondc,
583 CALL
ssyrfs( uplo, n, nrhs, a, lda, afac, lda,
584 $ iwork, b, lda, x, lda, rwork,
585 $ rwork( nrhs+1 ), work, iwork( n+1 ),
591 $ CALL
alaerh( path,
'SSYRFS', info, 0, uplo, n,
592 $ n, -1, -1, nrhs, imat, nfail,
595 CALL
sget04( n, nrhs, x, lda, xact, lda, rcondc,
597 CALL
spot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
598 $ xact, lda, rwork, rwork( nrhs+1 ),
605 IF( result( k ).GE.thresh )
THEN
606 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
607 $ CALL
alahd( nout, path )
608 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
609 $ imat, k, result( k )
620 anorm =
slansy(
'1', uplo, n, a, lda, rwork )
622 CALL
ssycon( uplo, n, afac, lda, iwork, anorm, rcond,
623 $ work, iwork( n+1 ), info )
628 $ CALL
alaerh( path,
'SSYCON', info, 0, uplo, n, n,
629 $ -1, -1, -1, imat, nfail, nerrs, nout )
633 result( 9 ) =
sget06( rcond, rcondc )
638 IF( result( 9 ).GE.thresh )
THEN
639 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
640 $ CALL
alahd( nout, path )
641 WRITE( nout, fmt = 9997 )uplo, n, imat, 9,
654 CALL
alasum( path, nout, nfail, nrun, nerrs )
656 9999 format(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
657 $ i2,
', test ', i2,
', ratio =', g12.5 )
658 9998 format(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
659 $ i2,
', test(', i2,
') =', g12.5 )
660 9997 format(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
661 $
', test(', i2,
') =', g12.5 )