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 DOUBLE PRECISION 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 DOUBLE PRECISION rwork( 150*nmax+2*maxrhs ), s( 2*nmax )
151 COMPLEX*16 a( ( kdmax+1 )*nmax, 7 ), b( nmax*maxrhs, 4 ),
152 $ work( nmax, nmax+maxrhs+10 )
175 INTEGER iparms( 100 )
178 common / infoc / infot, nunit, ok, lerr
179 common / srnamc / srnamt
180 common / claenv / iparms
183 DATA threq / 2.0d0 / , 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 =
dlamch(
'Underflow threshold' )
373 WRITE( nout, fmt = 9991 )
'underflow', eps
374 eps =
dlamch(
'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,
'Zomplex 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
zchkge( 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
zdrvge( 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
zchkgb( 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
zdrvgb( 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
zchkgt( 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
zdrvgt( 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
zchkpo( 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
zdrvpo( 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
zchkps( 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
zchkpp( 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
zdrvpp( 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
zchkpb( 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
zdrvpb( 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
zchkpt( 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
zdrvpt( 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
zchkhe( 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
zdrvhe( 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
zchkhp( 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
zdrvhp( 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
zchksy( 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
zdrvsy( 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
zchksp( 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
zdrvsp( 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
zchktr( 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
zchktp( 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
zchktb( 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
zchkqr( 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
zchklq( 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
zchkql( 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
815 ELSE IF(
lsamen( 2, c2,
'RQ' ) )
THEN
820 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
823 CALL
zchkrq( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
824 $ nrhs, thresh, tsterr, nmax, a( 1, 1 ),
825 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
826 $ b( 1, 1 ), b( 1, 2 ), b( 1, 3 ), b( 1, 4 ),
827 $ work, rwork, iwork, nout )
829 WRITE( nout, fmt = 9989 )path
832 ELSE IF(
lsamen( 2, c2,
'EQ' ) )
THEN
838 CALL
zchkeq( threq, nout )
840 WRITE( nout, fmt = 9989 )path
843 ELSE IF(
lsamen( 2, c2,
'TZ' ) )
THEN
848 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
851 CALL
zchktz( dotype, nm, mval, nn, nval, thresh, tsterr,
852 $ a( 1, 1 ), a( 1, 2 ), s( 1 ),
853 $ b( 1, 1 ), work, rwork, nout )
855 WRITE( nout, fmt = 9989 )path
858 ELSE IF(
lsamen( 2, c2,
'QP' ) )
THEN
863 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
866 CALL
zchkqp( dotype, nm, mval, nn, nval, thresh, tsterr,
867 $ a( 1, 1 ), a( 1, 2 ), s( 1 ),
868 $ b( 1, 1 ), work, rwork, iwork, nout )
869 CALL
zchkq3( dotype, nm, mval, nn, nval, nnb, nbval, nxval,
870 $ thresh, a( 1, 1 ), a( 1, 2 ), s( 1 ),
871 $ b( 1, 1 ), work, rwork, iwork,
874 WRITE( nout, fmt = 9989 )path
877 ELSE IF(
lsamen( 2, c2,
'LS' ) )
THEN
882 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
885 CALL
zdrvls( dotype, nm, mval, nn, nval, nns, nsval, nnb,
886 $ nbval, nxval, thresh, tsterr, a( 1, 1 ),
887 $ a( 1, 2 ), a( 1, 3 ), a( 1, 4 ), a( 1, 5 ),
888 $ s( 1 ), s( nmax+1 ), work, rwork, iwork,
891 WRITE( nout, fmt = 9989 )path
895 ELSE IF(
lsamen( 2, c2,
'QT' ) )
THEN
900 CALL
zchkqrt( thresh, tsterr, nm, mval, nn, nval, nnb,
903 WRITE( nout, fmt = 9989 )path
906 ELSE IF(
lsamen( 2, c2,
'QX' ) )
THEN
911 CALL
zchkqrtp( 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*16 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', d16.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' )