152 SUBROUTINE cdrvsy( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
153 $ a, afac, ainv, b, x, xact, work, rwork, iwork,
163 INTEGER NMAX, NN, NOUT, NRHS
168 INTEGER IWORK( * ), NVAL( * )
170 COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
171 $ work( * ), x( * ), xact( * )
178 parameter ( one = 1.0e+0, zero = 0.0e+0 )
179 INTEGER NTYPES, NTESTS
180 parameter ( ntypes = 11, ntests = 6 )
182 parameter ( nfact = 2 )
186 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
188 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
189 $ izero, j, k, k1, kl, ku, lda, lwork, mode, n,
190 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
191 REAL AINVNM, ANORM, CNDNUM, RCOND, RCONDC
194 CHARACTER FACTS( nfact ), UPLOS( 2 )
195 INTEGER ISEED( 4 ), ISEEDY( 4 )
196 REAL RESULT( ntests )
200 EXTERNAL clansy, sget06
214 COMMON / infoc / infot, nunit, ok, lerr
215 COMMON / srnamc / srnamt
218 INTRINSIC cmplx, max, min
221 DATA iseedy / 1988, 1989, 1990, 1991 /
222 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
228 path( 1: 1 ) =
'Complex precision'
234 iseed( i ) = iseedy( i )
236 lwork = max( 2*nmax, nmax*nrhs )
241 $
CALL cerrvx( path, nout )
261 DO 170 imat = 1, nimat
265 IF( .NOT.dotype( imat ) )
270 zerot = imat.GE.3 .AND. imat.LE.6
271 IF( zerot .AND. n.LT.imat-2 )
277 uplo = uplos( iuplo )
279 IF( imat.NE.ntypes )
THEN
284 CALL clatb4( path, imat, n, n,
TYPE, KL, KU, ANORM,
285 $ mode, cndnum, dist )
288 CALL clatms( n, n, dist, iseed,
TYPE, RWORK, MODE,
289 $ cndnum, anorm, kl, ku, uplo, a, lda,
295 CALL alaerh( path,
'CLATMS', info, 0, uplo, n, n,
296 $ -1, -1, -1, imat, nfail, nerrs, nout )
306 ELSE IF( imat.EQ.4 )
THEN
316 IF( iuplo.EQ.1 )
THEN
317 ioff = ( izero-1 )*lda
318 DO 20 i = 1, izero - 1
328 DO 40 i = 1, izero - 1
338 IF( iuplo.EQ.1 )
THEN
372 CALL clatsy( uplo, n, a, lda, iseed )
375 DO 150 ifact = 1, nfact
379 fact = facts( ifact )
389 ELSE IF( ifact.EQ.1 )
THEN
393 anorm = clansy(
'1', uplo, n, a, lda, rwork )
397 CALL clacpy( uplo, n, n, a, lda, afac, lda )
398 CALL csytrf( uplo, n, afac, lda, iwork, work,
403 CALL clacpy( uplo, n, n, afac, lda, ainv, lda )
404 lwork = (n+nb+1)*(nb+3)
405 CALL csytri2( uplo, n, ainv, lda, iwork, work,
407 ainvnm = clansy(
'1', uplo, n, ainv, lda, rwork )
411 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
414 rcondc = ( one / anorm ) / ainvnm
421 CALL clarhs( path, xtype, uplo,
' ', n, n, kl, ku,
422 $ nrhs, a, lda, xact, lda, b, lda, iseed,
428 IF( ifact.EQ.2 )
THEN
429 CALL clacpy( uplo, n, n, a, lda, afac, lda )
430 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
435 CALL csysv( uplo, n, nrhs, afac, lda, iwork, x,
436 $ lda, work, lwork, info )
444 IF( iwork( k ).LT.0 )
THEN
445 IF( iwork( k ).NE.-k )
THEN
449 ELSE IF( iwork( k ).NE.k )
THEN
458 CALL alaerh( path,
'CSYSV ', info, k, uplo, n,
459 $ n, -1, -1, nrhs, imat, nfail,
462 ELSE IF( info.NE.0 )
THEN
469 CALL csyt01( uplo, n, a, lda, afac, lda, iwork,
470 $ ainv, lda, rwork, result( 1 ) )
474 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
475 CALL csyt02( uplo, n, nrhs, a, lda, x, lda, work,
476 $ lda, rwork, result( 2 ) )
480 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
488 IF( result( k ).GE.thresh )
THEN
489 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
490 $
CALL aladhd( nout, path )
491 WRITE( nout, fmt = 9999 )
'CSYSV ', uplo, n,
492 $ imat, k, result( k )
503 $
CALL claset( uplo, n, n, cmplx( zero ),
504 $ cmplx( zero ), afac, lda )
505 CALL claset(
'Full', n, nrhs, cmplx( zero ),
506 $ cmplx( zero ), x, lda )
512 CALL csysvx( fact, uplo, n, nrhs, a, lda, afac, lda,
513 $ iwork, b, lda, x, lda, rcond, rwork,
514 $ rwork( nrhs+1 ), work, lwork,
515 $ rwork( 2*nrhs+1 ), info )
523 IF( iwork( k ).LT.0 )
THEN
524 IF( iwork( k ).NE.-k )
THEN
528 ELSE IF( iwork( k ).NE.k )
THEN
537 CALL alaerh( path,
'CSYSVX', info, k, fact // uplo,
538 $ n, n, -1, -1, nrhs, imat, nfail,
544 IF( ifact.GE.2 )
THEN
549 CALL csyt01( uplo, n, a, lda, afac, lda, iwork,
550 $ ainv, lda, rwork( 2*nrhs+1 ),
559 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
560 CALL csyt02( uplo, n, nrhs, a, lda, x, lda, work,
561 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
565 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
570 CALL cpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
571 $ xact, lda, rwork, rwork( nrhs+1 ),
580 result( 6 ) = sget06( rcond, rcondc )
586 IF( result( k ).GE.thresh )
THEN
587 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
588 $
CALL aladhd( nout, path )
589 WRITE( nout, fmt = 9998 )
'CSYSVX', fact, uplo,
590 $ n, imat, k, result( k )
604 CALL alasvm( path, nout, nfail, nrun, nerrs )
606 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
607 $
', test ', i2,
', ratio =', g12.5 )
608 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
609 $
', type ', i2,
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine clatsy(UPLO, N, X, LDX, ISEED)
CLATSY
subroutine clarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
CLARHS
subroutine csyt02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
CSYT02
subroutine cdrvsy(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK, NOUT)
CDRVSY
subroutine cerrvx(PATH, NUNIT)
CERRVX
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
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...
subroutine clatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
CLATMS
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine csytrf(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
CSYTRF
subroutine csysvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK, RWORK, INFO)
CSYSVX computes the solution to system of linear equations A * X = B for SY matrices ...
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine csysv(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK, LWORK, INFO)
CSYSV computes the solution to system of linear equations A * X = B for SY matrices ...
subroutine csyt01(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
CSYT01
subroutine cpot05(UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
CPOT05
subroutine clatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
CLATB4
subroutine cget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
CGET04
subroutine csytri2(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
CSYTRI2