120 parameter( nmax = 132 )
122 parameter( maxin = 12 )
124 parameter( maxrhs = 16 )
126 parameter( matmax = 30 )
128 parameter( nin = 5, nout = 6 )
130 parameter( kdmax = nmax+( nmax+1 ) / 4 )
133 LOGICAL fatal, tstchk, tstdrv, tsterr
139 INTEGER i, ic, j, k, la, lafac, lda, nb, nm, nmats, nn,
140 $ nnb, nnb2, nns, nrhs, ntypes, nrank,
141 $ vers_major, vers_minor, vers_patch
142 REAL eps, s1, s2, threq, thresh
145 LOGICAL dotype( matmax )
146 INTEGER iwork( 25*nmax ), mval( maxin ),
147 $ nbval( maxin ), nbval2( maxin ),
148 $ nsval( maxin ), nval( maxin ), nxval( maxin ),
149 $ rankval( maxin ), piv( nmax )
150 REAL rwork( 150*nmax+2*maxrhs ), s( 2*nmax )
151 COMPLEX a( ( kdmax+1 )*nmax, 7 ), b( nmax*maxrhs, 4 ),
152 $ work( nmax, nmax+maxrhs+10 )
175 INTEGER iparms( 100 )
178 common / claenv / iparms
179 common / infoc / infot, nunit, ok, lerr
180 common / srnamc / srnamt
183 DATA threq / 2.0 / , intstr /
'0123456789' /
197 CALL
ilaver( vers_major, vers_minor, vers_patch )
198 WRITE( nout, fmt = 9994 ) vers_major, vers_minor, vers_patch
202 READ( nin, fmt = * )nm
204 WRITE( nout, fmt = 9996 )
' NM ', nm, 1
207 ELSE IF( nm.GT.maxin )
THEN
208 WRITE( nout, fmt = 9995 )
' NM ', nm, maxin
212 READ( nin, fmt = * )( mval( i ), i = 1, nm )
214 IF( mval( i ).LT.0 )
THEN
215 WRITE( nout, fmt = 9996 )
' M ', mval( i ), 0
217 ELSE IF( mval( i ).GT.nmax )
THEN
218 WRITE( nout, fmt = 9995 )
' M ', mval( i ), nmax
223 $
WRITE( nout, fmt = 9993 )
'M ', ( mval( i ), i = 1, nm )
227 READ( nin, fmt = * )nn
229 WRITE( nout, fmt = 9996 )
' NN ', nn, 1
232 ELSE IF( nn.GT.maxin )
THEN
233 WRITE( nout, fmt = 9995 )
' NN ', nn, maxin
237 READ( nin, fmt = * )( nval( i ), i = 1, nn )
239 IF( nval( i ).LT.0 )
THEN
240 WRITE( nout, fmt = 9996 )
' N ', nval( i ), 0
242 ELSE IF( nval( i ).GT.nmax )
THEN
243 WRITE( nout, fmt = 9995 )
' N ', nval( i ), nmax
248 $
WRITE( nout, fmt = 9993 )
'N ', ( nval( i ), i = 1, nn )
252 READ( nin, fmt = * )nns
254 WRITE( nout, fmt = 9996 )
' NNS', nns, 1
257 ELSE IF( nns.GT.maxin )
THEN
258 WRITE( nout, fmt = 9995 )
' NNS', nns, maxin
262 READ( nin, fmt = * )( nsval( i ), i = 1, nns )
264 IF( nsval( i ).LT.0 )
THEN
265 WRITE( nout, fmt = 9996 )
'NRHS', nsval( i ), 0
267 ELSE IF( nsval( i ).GT.maxrhs )
THEN
268 WRITE( nout, fmt = 9995 )
'NRHS', nsval( i ), maxrhs
273 $
WRITE( nout, fmt = 9993 )
'NRHS', ( nsval( i ), i = 1, nns )
277 READ( nin, fmt = * )nnb
279 WRITE( nout, fmt = 9996 )
'NNB ', nnb, 1
282 ELSE IF( nnb.GT.maxin )
THEN
283 WRITE( nout, fmt = 9995 )
'NNB ', nnb, maxin
287 READ( nin, fmt = * )( nbval( i ), i = 1, nnb )
289 IF( nbval( i ).LT.0 )
THEN
290 WRITE( nout, fmt = 9996 )
' NB ', nbval( i ), 0
295 $
WRITE( nout, fmt = 9993 )
'NB ', ( nbval( i ), i = 1, nnb )
303 IF( nb.EQ.nbval2( j ) )
312 READ( nin, fmt = * )( nxval( i ), i = 1, nnb )
314 IF( nxval( i ).LT.0 )
THEN
315 WRITE( nout, fmt = 9996 )
' NX ', nxval( i ), 0
320 $
WRITE( nout, fmt = 9993 )
'NX ', ( nxval( i ), i = 1, nnb )
324 READ( nin, fmt = * )nrank
326 WRITE( nout, fmt = 9996 )
' NRANK ', nrank, 1
329 ELSE IF( nn.GT.maxin )
THEN
330 WRITE( nout, fmt = 9995 )
' NRANK ', nrank, maxin
334 READ( nin, fmt = * )( rankval( i ), i = 1, nrank )
336 IF( rankval( i ).LT.0 )
THEN
337 WRITE( nout, fmt = 9996 )
' RANK ', rankval( i ), 0
339 ELSE IF( rankval( i ).GT.100 )
THEN
340 WRITE( nout, fmt = 9995 )
' RANK ', rankval( i ), 100
345 $
WRITE( nout, fmt = 9993 )
'RANK % OF N',
346 $ ( rankval( i ), i = 1, nrank )
350 READ( nin, fmt = * )thresh
351 WRITE( nout, fmt = 9992 )thresh
355 READ( nin, fmt = * )tstchk
359 READ( nin, fmt = * )tstdrv
363 READ( nin, fmt = * )tsterr
366 WRITE( nout, fmt = 9999 )
372 eps =
slamch(
'Underflow threshold' )
373 WRITE( nout, fmt = 9991 )
'underflow', eps
374 eps =
slamch(
'Overflow threshold' )
375 WRITE( nout, fmt = 9991 )
'overflow ', eps
377 WRITE( nout, fmt = 9991 )
'precision', eps
378 WRITE( nout, fmt = * )
385 READ( nin, fmt =
'(A72)',
END = 140 )aline
393 IF( aline( i: i ).EQ.
' ' )
399 IF( c1.EQ.intstr( k: k ) )
THEN
406 nmats = nmats*10 + ic
417 IF( .NOT.
lsame( c1,
'Complex precision' ) )
THEN
418 WRITE( nout, fmt = 9990 )path
420 ELSE IF( nmats.LE.0 )
THEN
424 WRITE( nout, fmt = 9989 )path
426 ELSE IF(
lsamen( 2, c2,
'GE' ) )
THEN
431 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
434 CALL
cchkge( dotype, nm, mval, nn, nval, nnb2, nbval2, nns,
435 $ nsval, thresh, tsterr, lda, a( 1, 1 ),
436 $ a( 1, 2 ), a( 1, 3 ), b( 1, 1 ), b( 1, 2 ),
437 $ b( 1, 3 ), work, rwork, iwork, nout )
439 WRITE( nout, fmt = 9989 )path
443 CALL
cdrvge( dotype, nn, nval, nrhs, thresh, tsterr, lda,
444 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
445 $ b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s, work,
446 $ rwork, iwork, nout )
448 WRITE( nout, fmt = 9988 )path
451 ELSE IF(
lsamen( 2, c2,
'GB' ) )
THEN
455 la = ( 2*kdmax+1 )*nmax
456 lafac = ( 3*kdmax+1 )*nmax
458 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
461 CALL
cchkgb( dotype, nm, mval, nn, nval, nnb2, nbval2, nns,
462 $ nsval, thresh, tsterr, a( 1, 1 ), la,
463 $ a( 1, 3 ), lafac, b( 1, 1 ), b( 1, 2 ),
464 $ b( 1, 3 ), work, rwork, iwork, nout )
466 WRITE( nout, fmt = 9989 )path
470 CALL
cdrvgb( dotype, nn, nval, nrhs, thresh, tsterr,
471 $ a( 1, 1 ), la, a( 1, 3 ), lafac, a( 1, 6 ),
472 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s,
473 $ work, rwork, iwork, nout )
475 WRITE( nout, fmt = 9988 )path
478 ELSE IF(
lsamen( 2, c2,
'GT' ) )
THEN
483 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
486 CALL
cchkgt( dotype, nn, nval, nns, nsval, thresh, tsterr,
487 $ a( 1, 1 ), a( 1, 2 ), b( 1, 1 ), b( 1, 2 ),
488 $ b( 1, 3 ), work, rwork, iwork, nout )
490 WRITE( nout, fmt = 9989 )path
494 CALL
cdrvgt( dotype, nn, nval, nrhs, thresh, tsterr,
495 $ a( 1, 1 ), a( 1, 2 ), b( 1, 1 ), b( 1, 2 ),
496 $ b( 1, 3 ), work, rwork, iwork, nout )
498 WRITE( nout, fmt = 9988 )path
501 ELSE IF(
lsamen( 2, c2,
'PO' ) )
THEN
506 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
509 CALL
cchkpo( dotype, nn, nval, nnb2, nbval2, nns, nsval,
510 $ thresh, tsterr, lda, a( 1, 1 ), a( 1, 2 ),
511 $ a( 1, 3 ), b( 1, 1 ), b( 1, 2 ), b( 1, 3 ),
512 $ work, rwork, nout )
514 WRITE( nout, fmt = 9989 )path
518 CALL
cdrvpo( dotype, nn, nval, nrhs, thresh, tsterr, lda,
519 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
520 $ b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s, work,
523 WRITE( nout, fmt = 9988 )path
526 ELSE IF(
lsamen( 2, c2,
'PS' ) )
THEN
532 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
535 CALL
cchkps( dotype, nn, nval, nnb2, nbval2, nrank,
536 $ rankval, thresh, tsterr, lda, a( 1, 1 ),
537 $ a( 1, 2 ), a( 1, 3 ), piv, work, rwork,
540 WRITE( nout, fmt = 9989 )path
543 ELSE IF(
lsamen( 2, c2,
'PP' ) )
THEN
548 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
551 CALL
cchkpp( dotype, nn, nval, nns, nsval, thresh, tsterr,
552 $ lda, a( 1, 1 ), a( 1, 2 ), a( 1, 3 ),
553 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), work, rwork,
556 WRITE( nout, fmt = 9989 )path
560 CALL
cdrvpp( dotype, nn, nval, nrhs, thresh, tsterr, lda,
561 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
562 $ b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s, work,
565 WRITE( nout, fmt = 9988 )path
568 ELSE IF(
lsamen( 2, c2,
'PB' ) )
THEN
573 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
576 CALL
cchkpb( dotype, nn, nval, nnb2, nbval2, nns, nsval,
577 $ thresh, tsterr, lda, a( 1, 1 ), a( 1, 2 ),
578 $ a( 1, 3 ), b( 1, 1 ), b( 1, 2 ), b( 1, 3 ),
579 $ work, rwork, nout )
581 WRITE( nout, fmt = 9989 )path
585 CALL
cdrvpb( dotype, nn, nval, nrhs, thresh, tsterr, lda,
586 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
587 $ b( 1, 2 ), b( 1, 3 ), b( 1, 4 ), s, work,
590 WRITE( nout, fmt = 9988 )path
593 ELSE IF(
lsamen( 2, c2,
'PT' ) )
THEN
598 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
601 CALL
cchkpt( dotype, nn, nval, nns, nsval, thresh, tsterr,
602 $ a( 1, 1 ), s, a( 1, 2 ), b( 1, 1 ), b( 1, 2 ),
603 $ b( 1, 3 ), work, rwork, nout )
605 WRITE( nout, fmt = 9989 )path
609 CALL
cdrvpt( dotype, nn, nval, nrhs, thresh, tsterr,
610 $ a( 1, 1 ), s, a( 1, 2 ), b( 1, 1 ), b( 1, 2 ),
611 $ b( 1, 3 ), work, rwork, nout )
613 WRITE( nout, fmt = 9988 )path
616 ELSE IF(
lsamen( 2, c2,
'HE' ) )
THEN
621 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
624 CALL
cchkhe( dotype, nn, nval, nnb2, nbval2, nns, nsval,
625 $ thresh, tsterr, lda, a( 1, 1 ), a( 1, 2 ),
626 $ a( 1, 3 ), b( 1, 1 ), b( 1, 2 ), b( 1, 3 ),
627 $ work, rwork, iwork, nout )
629 WRITE( nout, fmt = 9989 )path
633 CALL
cdrvhe( dotype, nn, nval, nrhs, thresh, tsterr, lda,
634 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
635 $ b( 1, 2 ), b( 1, 3 ), work, rwork, iwork,
638 WRITE( nout, fmt = 9988 )path
641 ELSE IF(
lsamen( 2, c2,
'HP' ) )
THEN
646 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
649 CALL
cchkhp( dotype, nn, nval, nns, nsval, thresh, tsterr,
650 $ lda, a( 1, 1 ), a( 1, 2 ), a( 1, 3 ),
651 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), work, rwork,
654 WRITE( nout, fmt = 9989 )path
658 CALL
cdrvhp( dotype, nn, nval, nrhs, thresh, tsterr, lda,
659 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
660 $ b( 1, 2 ), b( 1, 3 ), work, rwork, iwork,
663 WRITE( nout, fmt = 9988 )path
666 ELSE IF(
lsamen( 2, c2,
'SY' ) )
THEN
672 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
675 CALL
cchksy( dotype, nn, nval, nnb2, nbval2, nns, nsval,
676 $ thresh, tsterr, lda, a( 1, 1 ), a( 1, 2 ),
677 $ a( 1, 3 ), b( 1, 1 ), b( 1, 2 ), b( 1, 3 ),
678 $ work, rwork, iwork, nout )
680 WRITE( nout, fmt = 9989 )path
684 CALL
cdrvsy( dotype, nn, nval, nrhs, thresh, tsterr, lda,
685 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
686 $ b( 1, 2 ), b( 1, 3 ), work, rwork, iwork,
689 WRITE( nout, fmt = 9988 )path
692 ELSE IF(
lsamen( 2, c2,
'SP' ) )
THEN
698 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
701 CALL
cchksp( dotype, nn, nval, nns, nsval, thresh, tsterr,
702 $ lda, a( 1, 1 ), a( 1, 2 ), a( 1, 3 ),
703 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), work, rwork,
706 WRITE( nout, fmt = 9989 )path
710 CALL
cdrvsp( dotype, nn, nval, nrhs, thresh, tsterr, lda,
711 $ a( 1, 1 ), a( 1, 2 ), a( 1, 3 ), b( 1, 1 ),
712 $ b( 1, 2 ), b( 1, 3 ), work, rwork, iwork,
715 WRITE( nout, fmt = 9988 )path
718 ELSE IF(
lsamen( 2, c2,
'TR' ) )
THEN
723 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
726 CALL
cchktr( dotype, nn, nval, nnb2, nbval2, nns, nsval,
727 $ thresh, tsterr, lda, a( 1, 1 ), a( 1, 2 ),
728 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), work, rwork,
731 WRITE( nout, fmt = 9989 )path
734 ELSE IF(
lsamen( 2, c2,
'TP' ) )
THEN
739 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
742 CALL
cchktp( dotype, nn, nval, nns, nsval, thresh, tsterr,
743 $ lda, a( 1, 1 ), a( 1, 2 ), b( 1, 1 ),
744 $ b( 1, 2 ), b( 1, 3 ), work, rwork, nout )
746 WRITE( nout, fmt = 9989 )path
749 ELSE IF(
lsamen( 2, c2,
'TB' ) )
THEN
754 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
757 CALL
cchktb( dotype, nn, nval, nns, nsval, thresh, tsterr,
758 $ lda, a( 1, 1 ), a( 1, 2 ), b( 1, 1 ),
759 $ b( 1, 2 ), b( 1, 3 ), work, rwork, nout )
761 WRITE( nout, fmt = 9989 )path
764 ELSE IF(
lsamen( 2, c2,
'QR' ) )
THEN
769 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
772 CALL
cchkqr( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
773 $ nrhs, thresh, tsterr, nmax, a( 1, 1 ),
774 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
775 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
776 $ work, rwork, iwork, nout )
778 WRITE( nout, fmt = 9989 )path
781 ELSE IF(
lsamen( 2, c2,
'LQ' ) )
THEN
786 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
789 CALL
cchklq( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
790 $ nrhs, thresh, tsterr, nmax, a( 1, 1 ),
791 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
792 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
793 $ work, rwork, nout )
795 WRITE( nout, fmt = 9989 )path
798 ELSE IF(
lsamen( 2, c2,
'QL' ) )
THEN
803 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
806 CALL
cchkql( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
807 $ nrhs, thresh, tsterr, nmax, a( 1, 1 ),
808 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
809 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
810 $ work, rwork, nout )
812 WRITE( nout, fmt = 9989 )path
816 ELSE IF(
lsamen( 2, c2,
'RQ' ) )
THEN
821 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
824 CALL
cchkrq( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
825 $ nrhs, thresh, tsterr, nmax, a( 1, 1 ),
826 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
827 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
828 $ work, rwork, iwork, nout )
830 WRITE( nout, fmt = 9989 )path
833 ELSE IF(
lsamen( 2, c2,
'EQ' ) )
THEN
839 CALL
cchkeq( threq, nout )
841 WRITE( nout, fmt = 9989 )path
844 ELSE IF(
lsamen( 2, c2,
'TZ' ) )
THEN
849 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
852 CALL
cchktz( dotype, nm, mval, nn, nval, thresh, tsterr,
853 $ a( 1, 1 ), a( 1, 2 ), s( 1 ),
854 $ b( 1, 1 ), work, rwork, nout )
856 WRITE( nout, fmt = 9989 )path
859 ELSE IF(
lsamen( 2, c2,
'QP' ) )
THEN
864 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
867 CALL
cchkqp( dotype, nm, mval, nn, nval, thresh, tsterr,
868 $ a( 1, 1 ), a( 1, 2 ), s( 1 ),
869 $ b( 1, 1 ), work, rwork, iwork, nout )
870 CALL
cchkq3( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
871 $ thresh, a( 1, 1 ), a( 1, 2 ), s( 1 ),
872 $ b( 1, 1 ), work, rwork, iwork, nout )
874 WRITE( nout, fmt = 9989 )path
878 ELSE IF(
lsamen( 2, c2,
'LS' ) )
THEN
883 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
886 CALL
cdrvls( dotype, nm, mval, nn, nval, nns, nsval, nnb,
887 $ nbval, nxval, thresh, tsterr, a( 1, 1 ),
888 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
889 $ s( 1 ), s( nmax+1 ), work, rwork, iwork,
892 WRITE( nout, fmt = 9989 )path
895 ELSE IF(
lsamen( 2, c2,
'QT' ) )
THEN
900 CALL
cchkqrt( thresh, tsterr, nm, mval, nn, nval, nnb,
903 WRITE( nout, fmt = 9989 )path
906 ELSE IF(
lsamen( 2, c2,
'QX' ) )
THEN
911 CALL
cchkqrtp( thresh, tsterr, nm, mval, nn, nval, nnb,
914 WRITE( nout, fmt = 9989 )path
919 WRITE( nout, fmt = 9990 )path
931 WRITE( nout, fmt = 9998 )
932 WRITE( nout, fmt = 9997 )s2 - s1
934 9999 format( /
' Execution not attempted due to input errors' )
935 9998 format( /
' End of tests' )
936 9997 format(
' Total time used = ', f12.2,
' seconds', / )
937 9996 format(
' Invalid input value: ', a4,
'=', i6,
'; must be >=',
939 9995 format(
' Invalid input value: ', a4,
'=', i6,
'; must be <=',
941 9994 format(
' Tests of the COMPLEX LAPACK routines ',
942 $ /
' LAPACK VERSION ', i1,
'.', i1,
'.', i1,
943 $ / /
' The following parameter values will be used:' )
944 9993 format( 4x, a4,
': ', 10i6, / 11x, 10i6 )
945 9992 format( /
' Routines pass computational tests if test ratio is ',
946 $
'less than', f8.2, / )
947 9991 format(
' Relative machine ', a,
' is taken to be', e16.6 )
948 9990 format( / 1x, a3,
': Unrecognized path name' )
949 9989 format( / 1x, a3,
' routines were not tested' )
950 9988 format( / 1x, a3,
' driver routines were not tested' )