150 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK,
151 $ RWORK, IWORK, NOUT )
159 INTEGER NMAX, NN, NOUT, NRHS
164 INTEGER IWORK( * ), NVAL( * )
166 COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
167 $ work( * ), x( * ), xact( * )
174 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
175 INTEGER NTYPES, NTESTS
176 parameter( ntypes = 11, ntests = 3 )
178 parameter( nfact = 2 )
182 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
183 CHARACTER*3 MATPATH, PATH
184 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
185 $ izero, j, k, kl, ku, lda, lwork, mode, n,
186 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
187 REAL AINVNM, ANORM, CNDNUM, RCONDC
190 CHARACTER FACTS( NFACT ), UPLOS( 2 )
191 INTEGER ISEED( 4 ), ISEEDY( 4 )
192 REAL RESULT( NTESTS )
211 COMMON / infoc / infot, nunit, ok, lerr
212 COMMON / srnamc / srnamt
218 DATA iseedy / 1988, 1989, 1990, 1991 /
219 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
227 path( 1: 1 ) =
'Complex precision'
232 matpath( 1: 1 ) =
'Complex precision'
233 matpath( 2: 3 ) =
'SY'
239 iseed( i ) = iseedy( i )
241 lwork = max( 2*nmax, nmax*nrhs )
246 $
CALL cerrvx( path, nout )
267 DO 170 imat = 1, nimat
271 IF( .NOT.dotype( imat ) )
276 zerot = imat.GE.3 .AND. imat.LE.6
277 IF( zerot .AND. n.LT.imat-2 )
283 uplo = uplos( iuplo )
285 IF( imat.NE.ntypes )
THEN
292 CALL clatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
293 $ mode, cndnum, dist )
298 CALL clatms( n, n, dist, iseed,
TYPE, rwork, mode,
299 $ cndnum, anorm, kl, ku, uplo, a, lda,
305 CALL alaerh( path,
'CLATMS', info, 0, uplo, n, n,
306 $ -1, -1, -1, imat, nfail, nerrs, nout )
316 ELSE IF( imat.EQ.4 )
THEN
326 IF( iuplo.EQ.1 )
THEN
327 ioff = ( izero-1 )*lda
328 DO 20 i = 1, izero - 1
338 DO 40 i = 1, izero - 1
348 IF( iuplo.EQ.1 )
THEN
385 CALL clatsy( uplo, n, a, lda, iseed )
388 DO 150 ifact = 1, nfact
392 fact = facts( ifact )
402 ELSE IF( ifact.EQ.1 )
THEN
406 anorm = clansy(
'1', uplo, n, a, lda, rwork )
411 CALL clacpy( uplo, n, n, a, lda, afac, lda )
417 CALL clacpy( uplo, n, n, afac, lda, ainv, lda )
418 lwork = (n+nb+1)*(nb+3)
421 ainvnm = clansy(
'1', uplo, n, ainv, lda, rwork )
425 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
428 rcondc = ( one / anorm ) / ainvnm
435 CALL clarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
436 $ nrhs, a, lda, xact, lda, b, lda, iseed,
442 IF( ifact.EQ.2 )
THEN
443 CALL clacpy( uplo, n, n, a, lda, afac, lda )
444 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
449 srnamt =
'CSYSV_ROOK'
450 CALL csysv_rook( uplo, n, nrhs, afac, lda, iwork,
451 $ x, lda, work, lwork, info )
459 IF( iwork( k ).LT.0 )
THEN
460 IF( iwork( k ).NE.-k )
THEN
464 ELSE IF( iwork( k ).NE.k )
THEN
473 CALL alaerh( path,
'CSYSV_ROOK', info, k, uplo,
474 $ n, n, -1, -1, nrhs, imat, nfail,
477 ELSE IF( info.NE.0 )
THEN
485 $ iwork, ainv, lda, rwork,
490 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
491 CALL csyt02( uplo, n, nrhs, a, lda, x, lda, work,
492 $ lda, rwork, result( 2 ) )
497 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
505 IF( result( k ).GE.thresh )
THEN
506 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
507 $
CALL aladhd( nout, path )
508 WRITE( nout, fmt = 9999 )
'CSYSV_ROOK', uplo,
509 $ n, imat, k, result( k )
525 CALL alasvm( path, nout, nfail, nrun, nerrs )
527 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
528 $
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine clarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
CLARHS
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine cdrvsy_rook(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
CDRVSY_ROOK
subroutine cerrvx(path, nunit)
CERRVX
subroutine cget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
CGET04
subroutine clatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
CLATB4
subroutine clatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
CLATMS
subroutine clatsy(uplo, n, x, ldx, iseed)
CLATSY
subroutine cpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPOT05
subroutine csyt01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
CSYT01_ROOK
subroutine csyt02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
CSYT02
subroutine csysv_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
CSYSV_ROOK computes the solution to system of linear equations A * X = B for SY matrices
subroutine csytrf_rook(uplo, n, a, lda, ipiv, work, lwork, info)
CSYTRF_ROOK
subroutine csytri_rook(uplo, n, a, lda, ipiv, work, info)
CSYTRI_ROOK
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.