85 parameter ( nmax = 132 )
87 parameter ( maxin = 12 )
89 parameter ( maxrhs = 16 )
91 parameter ( matmax = 30 )
93 parameter ( nin = 5, nout = 6 )
95 parameter ( ldamax = nmax )
98 LOGICAL FATAL, TSTDRV, TSTERR
104 INTEGER I, IC, K, LDA, NM, NMATS,
106 $ vers_major, vers_minor, vers_patch
107 DOUBLE PRECISION EPS, S1, S2, THRESH
111 LOGICAL DOTYPE( matmax )
112 INTEGER IWORK( nmax ), MVAL( maxin ), NSVAL( maxin )
113 DOUBLE PRECISION RWORK(nmax)
114 COMPLEX*16 A( ldamax*nmax, 2 ), B( nmax*maxrhs, 2 ),
115 $ work( nmax*maxrhs*2 )
116 COMPLEX SWORK(nmax*(nmax+maxrhs))
119 DOUBLE PRECISION DLAMCH, DSECND
120 LOGICAL LSAME, LSAMEN
122 EXTERNAL dlamch, dsecnd, lsame, lsamen, slamch
134 COMMON / infoc / infot, nunit, ok, lerr
135 COMMON / srnamc / srnamt
138 DATA intstr /
'0123456789' /
152 CALL ilaver( vers_major, vers_minor, vers_patch )
153 WRITE( nout, fmt = 9994 ) vers_major, vers_minor, vers_patch
157 READ( nin, fmt = * )nm
159 WRITE( nout, fmt = 9996 )
' NM ', nm, 1
162 ELSE IF( nm.GT.maxin )
THEN
163 WRITE( nout, fmt = 9995 )
' NM ', nm, maxin
167 READ( nin, fmt = * )( mval( i ), i = 1, nm )
169 IF( mval( i ).LT.0 )
THEN
170 WRITE( nout, fmt = 9996 )
' M ', mval( i ), 0
172 ELSE IF( mval( i ).GT.nmax )
THEN
173 WRITE( nout, fmt = 9995 )
' M ', mval( i ), nmax
178 $
WRITE( nout, fmt = 9993 )
'M ', ( mval( i ), i = 1, nm )
182 READ( nin, fmt = * )nns
184 WRITE( nout, fmt = 9996 )
' NNS', nns, 1
187 ELSE IF( nns.GT.maxin )
THEN
188 WRITE( nout, fmt = 9995 )
' NNS', nns, maxin
192 READ( nin, fmt = * )( nsval( i ), i = 1, nns )
194 IF( nsval( i ).LT.0 )
THEN
195 WRITE( nout, fmt = 9996 )
'NRHS', nsval( i ), 0
197 ELSE IF( nsval( i ).GT.maxrhs )
THEN
198 WRITE( nout, fmt = 9995 )
'NRHS', nsval( i ), maxrhs
203 $
WRITE( nout, fmt = 9993 )
'NRHS', ( nsval( i ), i = 1, nns )
207 READ( nin, fmt = * )thresh
208 WRITE( nout, fmt = 9992 )thresh
212 READ( nin, fmt = * )tstdrv
216 READ( nin, fmt = * )tsterr
219 WRITE( nout, fmt = 9999 )
225 seps = slamch(
'Underflow threshold' )
226 WRITE( nout, fmt = 9991 )
'(single precision) underflow', seps
227 seps = slamch(
'Overflow threshold' )
228 WRITE( nout, fmt = 9991 )
'(single precision) overflow ', seps
229 seps = slamch(
'Epsilon' )
230 WRITE( nout, fmt = 9991 )
'(single precision) precision', seps
231 WRITE( nout, fmt = * )
233 eps = dlamch(
'Underflow threshold' )
234 WRITE( nout, fmt = 9991 )
'(double precision) underflow', eps
235 eps = dlamch(
'Overflow threshold' )
236 WRITE( nout, fmt = 9991 )
'(double precision) overflow ', eps
237 eps = dlamch(
'Epsilon' )
238 WRITE( nout, fmt = 9991 )
'(double precision) precision', eps
239 WRITE( nout, fmt = * )
245 READ( nin, fmt =
'(A72)', end = 140 )aline
255 IF( aline( i: i ).EQ.
' ' )
261 IF( c1.EQ.intstr( k: k ) )
THEN
268 nmats = nmats*10 + ic
281 IF( .NOT.lsame( c1,
'Zomplex precision' ) )
THEN
282 WRITE( nout, fmt = 9990 )path
284 ELSE IF( nmats.LE.0 )
THEN
288 WRITE( nout, fmt = 9990 )
'ZCGESV'
291 ELSE IF( lsamen( 2, c2,
'GE' ) )
THEN
296 CALL alareq(
'ZGE', nmats, dotype, ntypes, nin, nout )
304 CALL zdrvab( dotype, nm, mval, nns,
305 $ nsval, thresh, lda, a( 1, 1 ),
306 $ a( 1, 2 ), b( 1, 1 ), b( 1, 2 ),
307 $ work, rwork, swork, iwork, nout )
309 WRITE( nout, fmt = 9989 )
'ZCGESV'
312 ELSE IF( lsamen( 2, c2,
'PO' ) )
THEN
317 CALL alareq(
'DPO', nmats, dotype, ntypes, nin, nout )
324 CALL zdrvac( dotype, nm, mval, nns, nsval,
325 $ thresh, lda, a( 1, 1 ), a( 1, 2 ),
326 $ b( 1, 1 ), b( 1, 2 ),
327 $ work, rwork, swork, nout )
329 WRITE( nout, fmt = 9989 )
'ZCPOSV'
345 WRITE( nout, fmt = 9998 )
346 WRITE( nout, fmt = 9997 )s2 - s1
348 9999
FORMAT( /
' Execution not attempted due to input errors' )
349 9998
FORMAT( /
' End of tests' )
350 9997
FORMAT(
' Total time used = ', f12.2,
' seconds', / )
351 9996
FORMAT(
' Invalid input value: ', a4,
'=', i6,
'; must be >=',
353 9995
FORMAT(
' Invalid input value: ', a4,
'=', i6,
'; must be <=',
355 9994
FORMAT(
' Tests of the COMPLEX*16 LAPACK ZCGESV/ZCPOSV routines ',
356 $ /
' LAPACK VERSION ', i1,
'.', i1,
'.', i1,
357 $ / /
' The following parameter values will be used:' )
358 9993
FORMAT( 4x, a4,
': ', 10i6, / 11x, 10i6 )
359 9992
FORMAT( /
' Routines pass computational tests if test ratio is ',
360 $
'less than', f8.2, / )
361 9991
FORMAT(
' Relative machine ', a,
' is taken to be', d16.6 )
362 9990
FORMAT( / 1x, a6,
' routines were not tested' )
363 9989
FORMAT( / 1x, a6,
' driver routines were not tested' )
subroutine zerrab(NUNIT)
ZERRAB
subroutine alareq(PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT)
ALAREQ
subroutine zerrac(NUNIT)
ZERRAC
subroutine zdrvac(DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX, A, AFAC, B, X, WORK, RWORK, SWORK, NOUT)
ZDRVAC
subroutine zdrvab(DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX, A, AFAC, B, X, WORK, RWORK, SWORK, IWORK, NOUT)
ZDRVAB
subroutine ilaver(VERS_MAJOR, VERS_MINOR, VERS_PATCH)
ILAVER returns the LAPACK version.