172 SUBROUTINE zchksy( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
173 $ thresh, tsterr, nmax, a, afac, ainv, b, x,
174 $ xact, work, rwork, iwork, nout )
183 INTEGER nmax, nn, nnb, nns, nout
184 DOUBLE PRECISION thresh
188 INTEGER iwork( * ), nbval( * ), nsval( * ), nval( * )
189 DOUBLE PRECISION rwork( * )
190 COMPLEX*16 a( * ), afac( * ), ainv( * ), b( * ),
191 $ work( * ), x( * ), xact( * )
197 DOUBLE PRECISION zero
198 parameter( zero = 0.0d+0 )
200 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
202 parameter( ntypes = 11 )
204 parameter( ntests = 9 )
207 LOGICAL trfcon, zerot
208 CHARACTER dist, type, uplo, xtype
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 anorm, cndnum, rcond, rcondc
217 INTEGER iseed( 4 ), iseedy( 4 )
218 DOUBLE PRECISION result( ntests )
239 common / infoc / infot, nunit, ok, lerr
240 common / srnamc / srnamt
243 DATA iseedy / 1988, 1989, 1990, 1991 /
244 DATA uplos /
'U',
'L' /
250 path( 1: 1 ) =
'Zomplex precision'
256 iseed( i ) = iseedy( i )
262 $ CALL
zerrsy( path, nout )
284 DO 170 imat = 1, nimat
288 IF( .NOT.dotype( imat ) )
293 zerot = imat.GE.3 .AND. imat.LE.6
294 IF( zerot .AND. n.LT.imat-2 )
300 uplo = uplos( iuplo )
302 IF( imat.NE.ntypes )
THEN
307 CALL
zlatb4( path, imat, n, n, type, kl, ku, anorm,
308 $ mode, cndnum, dist )
313 CALL
zlatms( n, n, dist, iseed, type, rwork, mode,
314 $ cndnum, anorm, kl, ku,
'N', a, lda, work,
320 CALL
alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
321 $ -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
401 CALL
zlatsy( uplo, n, a, lda, iseed )
419 CALL
zlacpy( uplo, n, n, a, lda, afac, lda )
426 lwork = max( 2, nb )*lda
428 CALL
zsytrf( uplo, n, afac, lda, iwork, ainv, lwork,
437 IF( iwork( k ).LT.0 )
THEN
438 IF( iwork( k ).NE.-k )
THEN
442 ELSE IF( iwork( k ).NE.k )
THEN
451 $ CALL
alaerh( path,
'ZSYTRF', info, k, uplo, n, n,
452 $ -1, -1, nb, imat, nfail, nerrs, nout )
465 CALL
zsyt01( uplo, n, a, lda, afac, lda, iwork, ainv,
466 $ lda, rwork, result( 1 ) )
475 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
476 CALL
zlacpy( uplo, n, n, afac, lda, ainv, lda )
478 lwork = (n+nb+1)*(nb+3)
479 CALL
zsytri2( uplo, n, ainv, lda, iwork, work,
485 $ CALL
alaerh( path,
'ZSYTRI2', info, 0, uplo, n,
486 $ n, -1, -1, -1, imat, nfail, nerrs,
492 CALL
zsyt03( uplo, n, a, lda, ainv, lda, work, lda,
493 $ rwork, rcondc, result( 2 ) )
501 IF( result( k ).GE.thresh )
THEN
502 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
503 $ CALL
alahd( nout, path )
504 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
534 CALL
zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
535 $ nrhs, a, lda, xact, lda, b, lda,
537 CALL
zlacpy(
'Full', n, nrhs, b, lda, x, lda )
540 CALL
zsytrs( uplo, n, nrhs, afac, lda, iwork, x,
546 $ CALL
alaerh( path,
'ZSYTRS', info, 0, uplo, n,
547 $ n, -1, -1, nrhs, imat, nfail,
550 CALL
zlacpy(
'Full', n, nrhs, b, lda, work, lda )
554 CALL
zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
555 $ lda, rwork, result( 3 ) )
564 CALL
zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
565 $ nrhs, a, lda, xact, lda, b, lda,
567 CALL
zlacpy(
'Full', n, nrhs, b, lda, x, lda )
570 CALL
zsytrs2( uplo, n, nrhs, afac, lda, iwork, x,
576 $ CALL
alaerh( path,
'ZSYTRS', info, 0, uplo, n,
577 $ n, -1, -1, nrhs, imat, nfail,
580 CALL
zlacpy(
'Full', n, nrhs, b, lda, work, lda )
584 CALL
zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
585 $ lda, rwork, result( 4 ) )
591 CALL
zget04( n, nrhs, x, lda, xact, lda, rcondc,
598 CALL
zsyrfs( uplo, n, nrhs, a, lda, afac, lda,
599 $ iwork, b, lda, x, lda, rwork,
600 $ rwork( nrhs+1 ), work,
601 $ rwork( 2*nrhs+1 ), info )
606 $ CALL
alaerh( path,
'ZSYRFS', info, 0, uplo, n,
607 $ n, -1, -1, nrhs, imat, nfail,
610 CALL
zget04( n, nrhs, x, lda, xact, lda, rcondc,
612 CALL
zpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
613 $ xact, lda, rwork, rwork( nrhs+1 ),
620 IF( result( k ).GE.thresh )
THEN
621 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
622 $ CALL
alahd( nout, path )
623 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
624 $ imat, k, result( k )
635 anorm =
zlansy(
'1', uplo, n, a, lda, rwork )
637 CALL
zsycon( uplo, n, afac, lda, iwork, anorm, rcond,
643 $ CALL
alaerh( path,
'ZSYCON', info, 0, uplo, n, n,
644 $ -1, -1, -1, imat, nfail, nerrs, nout )
648 result( 9 ) =
dget06( rcond, rcondc )
653 IF( result( 9 ).GE.thresh )
THEN
654 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
655 $ CALL
alahd( nout, path )
656 WRITE( nout, fmt = 9997 )uplo, n, imat, 9,
668 CALL
alasum( path, nout, nfail, nrun, nerrs )
670 9999 format(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
671 $ i2,
', test ', i2,
', ratio =', g12.5 )
672 9998 format(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
673 $ i2,
', test(', i2,
') =', g12.5 )
674 9997 format(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
675 $
', test(', i2,
') =', g12.5 )