1 SUBROUTINE cdrvge( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
2 $ a, afac, asav, b, bsav, x, xact, s, work,
13 INTEGER nmax, nn, nout, nrhs
18 INTEGER iwork( * ), nval( * )
19 REAL rwork( * ), s( * )
20 COMPLEX a( * ), afac( * ), asav( * ), b( * ),
21 $ bsav( * ), work( * ), x( * ), xact( * )
89 parameter( one = 1.0e+0, zero = 0.0e+0 )
91 parameter( ntypes = 11 )
93 parameter( ntests = 7 )
95 parameter( ntran = 1 )
98 LOGICAL equil, nofact, prefac, trfcon, zerot
99 CHARACTER dist, equed, fact,
trans, type, xtype
101 INTEGER hl( 2 ), hpiv( 2 )
102 INTEGER plasma_trans, ib
103 INTEGER i, iequed, ifact, imat, in, info, ioff, itran,
104 $ izero, k, k1, kl, ku, lda, lwork, mode, n, nb,
105 $ nbmin, nerrs, nfact, nfail, nimat, nrun, nt
106 REAL ainvnm, amax, anorm, anormi, anormo, cndnum,
107 $ colcnd, rcond, rcondc, rcondi, rcondo, roldc,
108 $ roldi, roldo, rowcnd, rpvgrw
111 CHARACTER equeds( 4 ), facts( 3 ), transs( ntran )
112 INTEGER iseed( 4 ), iseedy( 4 ), plasma_transs( ntran )
113 REAL rdum( 1 ), result( ntests )
117 REAL clange, clantr,
sget06, slamch
118 EXTERNAL lsame, clange, clantr,
sget06, slamch
127 INTRINSIC abs, cmplx,
max
135 common / infoc / infot, nunit, ok, lerr
136 common / srnamc / srnamt
139 DATA iseedy / 1988, 1989, 1990, 1991 /
142 DATA plasma_transs / plasmanotrans /
143 DATA facts /
'F',
'N',
'E' /
144 DATA equeds /
'N',
'R',
'C',
'B' /
150 path( 1: 1 ) =
'Complex precision'
158 iseed( i ) = iseedy( i )
164 $ CALL
cerrvx( path, nout )
175 CALL
plasma_set( plasma_inner_block_size, ib, info )
193 DO 80 imat = 1, nimat
197 IF( .NOT.dotype( imat ) )
202 zerot = imat.GE.5 .AND. imat.LE.7
203 IF( zerot .AND. n.LT.imat-4 )
209 CALL
clatb4( path, imat, n, n, type, kl, ku, anorm, mode,
211 rcondc = one / cndnum
214 CALL
clatms( n, n, dist, iseed, type, rwork, mode, cndnum,
215 $ anorm, kl, ku,
'No packing', a, lda, work,
221 CALL
alaerh( path,
'CLATMS', info, 0,
' ', n, n, -1, -1,
222 $ -1, imat, nfail, nerrs, nout )
232 ELSE IF( imat.EQ.6 )
THEN
237 ioff = ( izero-1 )*lda
243 CALL
claset(
'Full', n, n-izero+1, cmplx( zero ),
244 $ cmplx( zero ), a( ioff+1 ), lda )
252 CALL clacpy(
'Full', n, n, a, lda, asav, lda )
255 equed = equeds( iequed )
256 IF( iequed.EQ.1 )
THEN
262 DO 60 ifact = 1, nfact
263 fact = facts( ifact )
264 prefac = lsame( fact,
'F' )
265 nofact = lsame( fact,
'N' )
266 equil = lsame( fact,
'E' )
274 ELSE IF( .NOT.nofact )
THEN
281 CALL clacpy(
'Full', n, n, asav, lda, afac, lda )
282 IF( equil .OR. iequed.GT.1 )
THEN
287 CALL
cgeequ( n, n, afac, lda, s, s( n+1 ),
288 $ rowcnd, colcnd, amax, info )
289 IF( info.EQ.0 .AND. n.GT.0 )
THEN
290 IF( lsame( equed,
'R' ) )
THEN
293 ELSE IF( lsame( equed,
'C' ) )
THEN
296 ELSE IF( lsame( equed,
'B' ) )
THEN
303 CALL
claqge( n, n, afac, lda, s, s( n+1 ),
304 $ rowcnd, colcnd, amax, equed )
318 anormo = clange(
'1', n, n, afac, lda, rwork )
319 anormi = clange(
'I', n, n, afac, lda, rwork )
329 DO 50 itran = 1, ntran
333 trans = transs( itran )
334 plasma_trans = plasma_transs( itran )
335 IF( itran.EQ.1 )
THEN
343 CALL clacpy(
'Full', n, n, asav, lda, a, lda )
349 $ ku, nrhs, a, lda, xact, lda, b, lda,
352 CALL clacpy(
'Full', n, nrhs, b, lda, bsav, lda )
354 IF( nofact .AND. itran.EQ.1 )
THEN
361 CALL clacpy(
'Full', n, n, a, lda, afac, lda )
362 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
368 $ iwork, x, lda, info )
373 $ CALL
alaerh( path,
'CGESV ', info, izero,
374 $
' ', n, n, -1, -1, nrhs, imat,
375 $ nfail, nerrs, nout )
377 IF( izero.EQ.0 )
THEN
381 CALL clacpy(
'Full', n, nrhs, b, lda, work,
383 CALL
cget02(
'No transpose', n, n, nrhs, a,
384 $ lda, x, lda, work, lda, rwork,
389 CALL
cget04( n, nrhs, x, lda, xact, lda,
390 $ rcondc, result( 2 ) )
398 IF( result( k ).GE.thresh )
THEN
399 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
400 $ CALL
aladhd( nout, path )
401 WRITE( nout, fmt = 9999 )
'CGESV ', n,
402 $ imat, k, result( k )
422 CALL
alasvm( path, nout, nfail, nrun, nerrs )
424 9999
format( 1x, a,
', N =', i5,
', type ', i2,
', test(', i2,
') =',
426 9998
format( 1x, a,
', FACT=''', a1,
''', TRANS=''', a1,
''', N=', i5,
427 $
', type ', i2,
', test(', i1,
')=', g12.5 )
428 9997
format( 1x, a,
', FACT=''', a1,
''', TRANS=''', a1,
''', N=', i5,
429 $
', EQUED=''', a1,
''', type ', i2,
', test(', i1,
')=',