151 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK,
152 $ RWORK, IWORK, NOUT )
160 INTEGER NMAX, NN, NOUT, NRHS
161 DOUBLE PRECISION THRESH
165 INTEGER IWORK( * ), NVAL( * )
166 DOUBLE PRECISION RWORK( * )
167 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
168 $ work( * ), x( * ), xact( * )
174 DOUBLE PRECISION ONE, ZERO
175 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
176 INTEGER NTYPES, NTESTS
177 parameter( ntypes = 11, ntests = 3 )
179 parameter( nfact = 2 )
183 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
184 CHARACTER*3 MATPATH, PATH
185 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
186 $ izero, j, k, kl, ku, lda, lwork, mode, n,
187 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
188 DOUBLE PRECISION AINVNM, ANORM, CNDNUM, RCONDC
191 CHARACTER FACTS( NFACT ), UPLOS( 2 )
192 INTEGER ISEED( 4 ), ISEEDY( 4 )
193 DOUBLE PRECISION RESULT( NTESTS )
197 DOUBLE PRECISION ZLANSY
212 COMMON / infoc / infot, nunit, ok, lerr
213 COMMON / srnamc / srnamt
219 DATA iseedy / 1988, 1989, 1990, 1991 /
220 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
228 path( 1: 1 ) =
'Zomplex precision'
233 matpath( 1: 1 ) =
'Zomplex precision'
234 matpath( 2: 3 ) =
'SY'
240 iseed( i ) = iseedy( i )
242 lwork = max( 2*nmax, nmax*nrhs )
247 $
CALL zerrvx( path, nout )
268 DO 170 imat = 1, nimat
272 IF( .NOT.dotype( imat ) )
277 zerot = imat.GE.3 .AND. imat.LE.6
278 IF( zerot .AND. n.LT.imat-2 )
284 uplo = uplos( iuplo )
286 IF( imat.NE.ntypes )
THEN
293 CALL zlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
294 $ mode, cndnum, dist )
299 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
300 $ cndnum, anorm, kl, ku, uplo, a, lda,
306 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
307 $ -1, -1, -1, imat, nfail, nerrs, nout )
317 ELSE IF( imat.EQ.4 )
THEN
327 IF( iuplo.EQ.1 )
THEN
328 ioff = ( izero-1 )*lda
329 DO 20 i = 1, izero - 1
339 DO 40 i = 1, izero - 1
349 IF( iuplo.EQ.1 )
THEN
383 CALL zlatsy( uplo, n, a, lda, iseed )
386 DO 150 ifact = 1, nfact
390 fact = facts( ifact )
400 ELSE IF( ifact.EQ.1 )
THEN
404 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
409 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
415 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
416 lwork = (n+nb+1)*(nb+3)
419 ainvnm = zlansy(
'1', uplo, n, ainv, lda, rwork )
423 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
426 rcondc = ( one / anorm ) / ainvnm
433 CALL zlarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
434 $ nrhs, a, lda, xact, lda, b, lda, iseed,
440 IF( ifact.EQ.2 )
THEN
441 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
442 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
447 srnamt =
'ZSYSV_ROOK'
448 CALL zsysv_rook( uplo, n, nrhs, afac, lda, iwork,
449 $ x, lda, work, lwork, info )
457 IF( iwork( k ).LT.0 )
THEN
458 IF( iwork( k ).NE.-k )
THEN
462 ELSE IF( iwork( k ).NE.k )
THEN
471 CALL alaerh( path,
'ZSYSV_ROOK', info, k, uplo,
472 $ n, n, -1, -1, nrhs, imat, nfail,
475 ELSE IF( info.NE.0 )
THEN
483 $ iwork, ainv, lda, rwork,
488 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
489 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
490 $ lda, rwork, result( 2 ) )
495 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
503 IF( result( k ).GE.thresh )
THEN
504 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
505 $
CALL aladhd( nout, path )
506 WRITE( nout, fmt = 9999 )
'ZSYSV_ROOK', uplo,
507 $ n, imat, k, result( k )
523 CALL alasvm( path, nout, nfail, nrun, nerrs )
525 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
526 $
', test ', i2,
', ratio =', g12.5 )