86 parameter( npmax = 16 )
88 parameter( nmax = 1000 )
90 parameter( maxin = 12 )
92 parameter( maxrhs = 16 )
94 parameter( matmax = 30 )
96 parameter( nin = 5, nout = 6 )
98 parameter( kdmax = nmax+( nmax+1 ) / 4 )
101 LOGICAL fatal, tstchk, tstdrv, tsterr
107 INTEGER i, ib, ic, j, k, la, lafac, lda, nb, nm, nmats,
108 $ nn, nnb, nnb2, nnp, nns, np, sched, nrhs,
109 $ ntypes, nrank, vers_major, vers_minor,
111 DOUBLE PRECISION eps, s1, s2, threq, thresh
114 LOGICAL dotype( matmax )
115 INTEGER ibval(maxin), iwork( 25*nmax ), mval( maxin ),
116 $ nbval( maxin ), nbval2( maxin ),
117 $ npval( maxin), nsval( maxin ),
118 $ nval( maxin ), nxval( maxin ),
119 $ rankval( maxin ), piv( nmax )
120 DOUBLE PRECISION a( ( kdmax+1 )*nmax, 7 ), b( nmax*maxrhs, 4 ),
121 $ rwork( 5*nmax+2*maxrhs ), s( 2*nmax ),
122 $ work( nmax, nmax+maxrhs+30 )
126 DOUBLE PRECISION dlamch, dsecnd
127 EXTERNAL lsame,
lsamen, dlamch, dsecnd
143 INTEGER iparms( 100 )
146 common / infoc / infot, nunit, ok, lerr
147 common / srnamc / srnamt
148 common / claenv / iparms
151 DATA threq / 2.0d0 / , intstr /
'0123456789' /
161 CALL plasma_version( vers_major, vers_minor, vers_patch, info)
162 WRITE( nout, fmt = 9994 ) vers_major, vers_minor, vers_patch
170 READ( nin, fmt = * )nnp
172 WRITE( nout, fmt = 9996 )
' NNP ', nnp, 1
175 ELSE IF( nnp.GT.maxin )
THEN
176 WRITE( nout, fmt = 9995 )
' NNP ', nnp, maxin
180 READ( nin, fmt = * )( npval( i ), i = 1, nnp )
182 IF( npval( i ).LT.0 )
THEN
183 WRITE( nout, fmt = 9996 )
' NP ', npval( i ), 0
185 ELSE IF( npval( i ).GT.npmax )
THEN
186 WRITE( nout, fmt = 9995 )
' NP ', npval( i ), npmax
191 $
WRITE( nout, fmt = 9993 )
'NP ', ( npval( i ), i = 1, nnp )
195 READ( nin, fmt = * )sched
196 IF (( sched .LT. 0 ) .OR. (sched .GT. 1))
THEN
197 WRITE( nout, fmt = 9987 )
' SCHED ', sched
204 READ( nin, fmt = * )nm
206 WRITE( nout, fmt = 9996 )
' NM ', nm, 1
209 ELSE IF( nm.GT.maxin )
THEN
210 WRITE( nout, fmt = 9995 )
' NM ', nm, maxin
214 READ( nin, fmt = * )( mval( i ), i = 1, nm )
216 IF( mval( i ).LT.0 )
THEN
217 WRITE( nout, fmt = 9996 )
' M ', mval( i ), 0
219 ELSE IF( mval( i ).GT.nmax )
THEN
220 WRITE( nout, fmt = 9995 )
' M ', mval( i ), nmax
225 $
WRITE( nout, fmt = 9993 )
'M ', ( mval( i ), i = 1, nm )
229 READ( nin, fmt = * )nn
231 WRITE( nout, fmt = 9996 )
' NN ', nn, 1
234 ELSE IF( nn.GT.maxin )
THEN
235 WRITE( nout, fmt = 9995 )
' NN ', nn, maxin
239 READ( nin, fmt = * )( nval( i ), i = 1, nn )
241 IF( nval( i ).LT.0 )
THEN
242 WRITE( nout, fmt = 9996 )
' N ', nval( i ), 0
244 ELSE IF( nval( i ).GT.nmax )
THEN
245 WRITE( nout, fmt = 9995 )
' N ', nval( i ), nmax
250 $
WRITE( nout, fmt = 9993 )
'N ', ( nval( i ), i = 1, nn )
254 READ( nin, fmt = * )nns
256 WRITE( nout, fmt = 9996 )
' NNS', nns, 1
259 ELSE IF( nns.GT.maxin )
THEN
260 WRITE( nout, fmt = 9995 )
' NNS', nns, maxin
264 READ( nin, fmt = * )( nsval( i ), i = 1, nns )
266 IF( nsval( i ).LT.0 )
THEN
267 WRITE( nout, fmt = 9996 )
'NRHS', nsval( i ), 0
269 ELSE IF( nsval( i ).GT.maxrhs )
THEN
270 WRITE( nout, fmt = 9995 )
'NRHS', nsval( i ), maxrhs
275 $
WRITE( nout, fmt = 9993 )
'NRHS', ( nsval( i ), i = 1, nns )
279 READ( nin, fmt = * )nnb
281 WRITE( nout, fmt = 9996 )
'NNB ', nnb, 1
284 ELSE IF( nnb.GT.maxin )
THEN
285 WRITE( nout, fmt = 9995 )
'NNB ', nnb, maxin
289 READ( nin, fmt = * )( nbval( i ), i = 1, nnb )
291 IF( nbval( i ).LT.0 )
THEN
292 WRITE( nout, fmt = 9996 )
' NB ', nbval( i ), 0
297 $
WRITE( nout, fmt = 9993 )
'NB ', ( nbval( i ), i = 1, nnb )
301 READ( nin, fmt = * )( ibval( i ), i = 1, nnb )
303 IF( ibval( i ).LT.0 )
THEN
304 WRITE( nout, fmt = 9996 )
' NB ', ibval( i ), 0
309 $
WRITE( nout, fmt = 9993 )
'IB ', ( ibval( i ), i = 1, nnb )
317 IF( nb.EQ.nbval2( j ) )
326 READ( nin, fmt = * )( nxval( i ), i = 1, nnb )
328 IF( nxval( i ).LT.0 )
THEN
329 WRITE( nout, fmt = 9996 )
' NX ', nxval( i ), 0
334 $
WRITE( nout, fmt = 9993 )
'NX ', ( nxval( i ), i = 1, nnb )
338 READ( nin, fmt = * )nrank
340 WRITE( nout, fmt = 9996 )
' NRANK ', nrank, 1
343 ELSE IF( nn.GT.maxin )
THEN
344 WRITE( nout, fmt = 9995 )
' NRANK ', nrank, maxin
348 READ( nin, fmt = * )( rankval( i ), i = 1, nrank )
350 IF( rankval( i ).LT.0 )
THEN
351 WRITE( nout, fmt = 9996 )
' RANK ', rankval( i ), 0
353 ELSE IF( rankval( i ).GT.100 )
THEN
354 WRITE( nout, fmt = 9995 )
' RANK ', rankval( i ), 100
359 $
WRITE( nout, fmt = 9993 )
'RANK % OF N',
360 $ ( rankval( i ), i = 1, nrank )
364 READ( nin, fmt = * )thresh
365 WRITE( nout, fmt = 9992 )thresh
369 READ( nin, fmt = * )tstchk
373 READ( nin, fmt = * )tstdrv
377 READ( nin, fmt = * )tsterr
380 WRITE( nout, fmt = 9999 )
386 eps = dlamch(
'Underflow threshold' )
387 WRITE( nout, fmt = 9991 )
'underflow', eps
388 eps = dlamch(
'Overflow threshold' )
389 WRITE( nout, fmt = 9991 )
'overflow ', eps
390 eps = dlamch(
'Epsilon' )
391 WRITE( nout, fmt = 9991 )
'precision', eps
392 WRITE( nout, fmt = * )
398 IF( sched .EQ. 1 )
THEN
400 $ plasma_dynamic_scheduling, info )
403 $ plasma_static_scheduling, info )
413 READ( nin, fmt =
'(A72)',
END = 140 )aline
423 IF( aline( i: i ).EQ.
' ' )
429 IF( c1.EQ.intstr( k: k ) )
THEN
436 nmats = nmats*10 + ic
448 IF( .NOT.lsame( c1,
'Double precision' ) )
THEN
449 WRITE( nout, fmt = 9990 )path
451 ELSE IF( nmats.LE.0 )
THEN
455 WRITE( nout, fmt = 9989 )path
457 ELSE IF(
lsamen( 2, c2,
'GE' ) )
THEN
462 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
465 CALL
dchkge( dotype, nm, mval, nn, nval, nnb2, nbval2, nns,
466 $ ibval, nsval, thresh, tsterr, lda, a( 1, 1 ),
467 $ a( 1, 2 ), a( 1, 3 ), b( 1, 1 ), b( 1, 2 ),
468 $ b( 1, 3 ), work, rwork, iwork, nout )
470 WRITE( nout, fmt = 9989 )path
474 CALL
ddrvge( dotype, nn, nval, nrhs, thresh, tsterr, lda,
475 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
476 $ b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s, work,
477 $ rwork, iwork, nout )
479 WRITE( nout, fmt = 9988 )path
482 ELSE IF(
lsamen( 2, c2,
'PO' ) )
THEN
487 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
490 CALL
dchkpo( dotype, nn, nval, nnb2, nbval2, nns, nsval,
491 $ thresh, tsterr, lda, a( 1, 1 ), a( 1, 2 ),
492 $ a( 1, 3 ), b( 1, 1 ), b( 1, 2 ), b( 1, 3 ),
493 $ work, rwork, iwork, nout )
495 WRITE( nout, fmt = 9989 )path
499 CALL
ddrvpo( dotype, nn, nval, nrhs, thresh, tsterr, lda,
500 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
501 $ b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s, work,
502 $ rwork, iwork, nout )
504 WRITE( nout, fmt = 9988 )path
507 ELSE IF(
lsamen( 2, c2,
'QR' ) )
THEN
512 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
515 CALL
dchkqr( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
516 $ ibval, nrhs, thresh, tsterr, nmax, a( 1, 1 ),
517 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
518 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
519 $ work, rwork, iwork, nout )
521 WRITE( nout, fmt = 9989 )path
524 ELSE IF(
lsamen( 2, c2,
'LQ' ) )
THEN
529 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
532 CALL
dchklq( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
533 $ ibval, nrhs, thresh, tsterr, nmax, a( 1, 1 ),
534 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
535 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
536 $ work, rwork, iwork, nout )
538 WRITE( nout, fmt = 9989 )path
541 ELSE IF(
lsamen( 2, c2,
'LS' ) )
THEN
546 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
549 CALL
ddrvls( dotype, nm, mval, nn, nval, nns, nsval, nnb,
550 $ nbval, nxval, thresh, tsterr, a( 1, 1 ),
551 $ a( 1, 2 ), b( 1, 1 ), b( 1, 2 ), b( 1, 3 ),
552 $ rwork, rwork( nmax+1 ), ibval, work, iwork,
555 WRITE( nout, fmt = 9988 )path
560 WRITE( nout, fmt = 9990 )path
577 WRITE( nout, fmt = 9998 )
580 9999
format( /
' Execution not attempted due to input errors' )
581 9998
format( /
' End of tests' )
582 9997
format(
' Total time used = ', f12.2,
' seconds', / )
583 9996
format(
' Invalid input value: ', a4,
'=', i6,
'; must be >=',
585 9995
format(
' Invalid input value: ', a4,
'=', i6,
'; must be <=',
587 9994
format(
' Tests of the DOUBLE PRECISION PLASMA routines ',
588 $ /
' PLASMA VERSION ', i1,
'.', i1,
'.', i1,
589 $ / /
' The following parameter values will be used:' )
590 9993
format( 4x, a4,
': ', 10i6, / 11x, 10i6 )
591 9992
format( /
' Routines pass computational tests if test ratio is ',
592 $
'less than', f8.2, / )
593 9991
format(
' Relative machine ', a,
' is taken to be', d16.6 )
594 9990
format( / 1x, a3,
': Unrecognized path name' )
595 9989
format( / 1x, a3,
' routines were not tested' )
596 9988
format( / 1x, a3,
' driver routines were not tested' )
597 9987
format(
' Invalid input value: ', a6,
'=', i6,
'; must be 0 or 1')