589 SUBROUTINE schkst( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
590 $ nounit, a, lda, ap, sd, se, d1, d2, d3, d4, d5,
591 $ wa1, wa2, wa3, wr, u, ldu, v, vp, tau, z, work,
592 $ lwork, iwork, liwork, result, info )
600 INTEGER info, lda, ldu, liwork, lwork, nounit, nsizes,
606 INTEGER iseed( 4 ), iwork( * ), nn( * )
607 REAL a( lda, * ), ap( * ), d1( * ), d2( * ),
608 $ d3( * ), d4( * ), d5( * ), result( * ),
609 $ sd( * ), se( * ), tau( * ), u( ldu, * ),
610 $ v( ldu, * ), vp( * ), wa1( * ), wa2( * ),
611 $ wa3( * ), work( * ), wr( * ), z( ldu, * )
617 REAL zero, one, two, eight, ten, hun
618 parameter( zero = 0.0e0, one = 1.0e0, two = 2.0e0,
619 $ eight = 8.0e0, ten = 10.0e0, hun = 100.0e0 )
621 parameter( half = one / two )
623 parameter( maxtyp = 21 )
625 parameter( srange = .false. )
627 parameter( srel = .false. )
630 LOGICAL badnn, tryrac
631 INTEGER i, iinfo, il, imode, itemp, itype, iu, j, jc,
632 $ jr, jsize, jtype, lgn, liwedc, log2ui, lwedc,
633 $ m, m2, m3, mtypes, n, nap, nblock, nerrs,
634 $ nmats, nmax, nsplit, ntest, ntestt
635 REAL abstol, aninv, anorm, cond, ovfl, rtovfl,
636 $ rtunfl, temp1, temp2, temp3, temp4, ulp,
637 $ ulpinv, unfl, vl, vu
640 INTEGER idumma( 1 ), ioldsd( 4 ), iseed2( 4 ),
641 $ kmagn( maxtyp ), kmode( maxtyp ),
657 INTRINSIC abs, int, log, max, min,
REAL, sqrt
660 DATA ktype / 1, 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 8,
661 $ 8, 8, 9, 9, 9, 9, 9, 10 /
662 DATA kmagn / 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1,
663 $ 2, 3, 1, 1, 1, 2, 3, 1 /
664 DATA kmode / 0, 0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
665 $ 0, 0, 4, 3, 1, 4, 4, 3 /
683 nmax = max( nmax, nn( j ) )
688 nblock =
ilaenv( 1,
'SSYTRD',
'L', nmax, -1, -1, -1 )
689 nblock = min( nmax, max( 1, nblock ) )
693 IF( nsizes.LT.0 )
THEN
695 ELSE IF( badnn )
THEN
697 ELSE IF( ntypes.LT.0 )
THEN
699 ELSE IF( lda.LT.nmax )
THEN
701 ELSE IF( ldu.LT.nmax )
THEN
703 ELSE IF( 2*max( 2, nmax )**2.GT.lwork )
THEN
708 CALL
xerbla(
'SCHKST', -info )
714 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
719 unfl =
slamch(
'Safe minimum' )
724 log2ui = int( log( ulpinv ) / log( two ) )
725 rtunfl = sqrt( unfl )
726 rtovfl = sqrt( ovfl )
731 iseed2( i ) = iseed( i )
736 DO 310 jsize = 1, nsizes
739 lgn = int( log(
REAL( N ) ) / log( two ) )
744 lwedc = 1 + 4*n + 2*n*lgn + 4*n**2
745 liwedc = 6 + 6*n + 5*n*lgn
750 nap = ( n*( n+1 ) ) / 2
751 aninv = one /
REAL( MAX( 1, N ) )
753 IF( nsizes.NE.1 )
THEN
754 mtypes = min( maxtyp, ntypes )
756 mtypes = min( maxtyp+1, ntypes )
759 DO 300 jtype = 1, mtypes
760 IF( .NOT.dotype( jtype ) )
766 ioldsd( j ) = iseed( j )
785 IF( mtypes.GT.maxtyp )
788 itype = ktype( jtype )
789 imode = kmode( jtype )
793 go to( 40, 50, 60 )kmagn( jtype )
800 anorm = ( rtovfl*ulp )*aninv
804 anorm = rtunfl*n*ulpinv
809 CALL
slaset(
'Full', lda, n, zero, zero, a, lda )
811 IF( jtype.LE.15 )
THEN
814 cond = ulpinv*aninv / ten
821 IF( itype.EQ.1 )
THEN
824 ELSE IF( itype.EQ.2 )
THEN
832 ELSE IF( itype.EQ.4 )
THEN
836 CALL
slatms( n, n,
'S', iseed,
'S', work, imode, cond,
837 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
841 ELSE IF( itype.EQ.5 )
THEN
845 CALL
slatms( n, n,
'S', iseed,
'S', work, imode, cond,
846 $ anorm, n, n,
'N', a, lda, work( n+1 ),
849 ELSE IF( itype.EQ.7 )
THEN
853 CALL
slatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
854 $
'T',
'N', work( n+1 ), 1, one,
855 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
856 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
858 ELSE IF( itype.EQ.8 )
THEN
862 CALL
slatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
863 $
'T',
'N', work( n+1 ), 1, one,
864 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
865 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
867 ELSE IF( itype.EQ.9 )
THEN
871 CALL
slatms( n, n,
'S', iseed,
'P', work, imode, cond,
872 $ anorm, n, n,
'N', a, lda, work( n+1 ),
875 ELSE IF( itype.EQ.10 )
THEN
879 CALL
slatms( n, n,
'S', iseed,
'P', work, imode, cond,
880 $ anorm, 1, 1,
'N', a, lda, work( n+1 ),
883 temp1 = abs( a( i-1, i ) ) /
884 $ sqrt( abs( a( i-1, i-1 )*a( i, i ) ) )
885 IF( temp1.GT.half )
THEN
886 a( i-1, i ) = half*sqrt( abs( a( i-1, i-1 )*a( i,
888 a( i, i-1 ) = a( i-1, i )
897 IF( iinfo.NE.0 )
THEN
898 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n, jtype,
909 CALL
slacpy(
'U', n, n, a, lda, v, ldu )
912 CALL
ssytrd(
'U', n, v, ldu, sd, se, tau, work, lwork,
915 IF( iinfo.NE.0 )
THEN
916 WRITE( nounit, fmt = 9999 )
'SSYTRD(U)', iinfo, n, jtype,
919 IF( iinfo.LT.0 )
THEN
927 CALL
slacpy(
'U', n, n, v, ldu, u, ldu )
930 CALL
sorgtr(
'U', n, u, ldu, tau, work, lwork, iinfo )
931 IF( iinfo.NE.0 )
THEN
932 WRITE( nounit, fmt = 9999 )
'SORGTR(U)', iinfo, n, jtype,
935 IF( iinfo.LT.0 )
THEN
945 CALL
ssyt21( 2,
'Upper', n, 1, a, lda, sd, se, u, ldu, v,
946 $ ldu, tau, work, result( 1 ) )
947 CALL
ssyt21( 3,
'Upper', n, 1, a, lda, sd, se, u, ldu, v,
948 $ ldu, tau, work, result( 2 ) )
953 CALL
slacpy(
'L', n, n, a, lda, v, ldu )
956 CALL
ssytrd(
'L', n, v, ldu, sd, se, tau, work, lwork,
959 IF( iinfo.NE.0 )
THEN
960 WRITE( nounit, fmt = 9999 )
'SSYTRD(L)', iinfo, n, jtype,
963 IF( iinfo.LT.0 )
THEN
971 CALL
slacpy(
'L', n, n, v, ldu, u, ldu )
974 CALL
sorgtr(
'L', n, u, ldu, tau, work, lwork, iinfo )
975 IF( iinfo.NE.0 )
THEN
976 WRITE( nounit, fmt = 9999 )
'SORGTR(L)', iinfo, n, jtype,
979 IF( iinfo.LT.0 )
THEN
987 CALL
ssyt21( 2,
'Lower', n, 1, a, lda, sd, se, u, ldu, v,
988 $ ldu, tau, work, result( 3 ) )
989 CALL
ssyt21( 3,
'Lower', n, 1, a, lda, sd, se, u, ldu, v,
990 $ ldu, tau, work, result( 4 ) )
998 ap( i ) = a( jr, jc )
1004 CALL
scopy( nap, ap, 1, vp, 1 )
1007 CALL
ssptrd(
'U', n, vp, sd, se, tau, iinfo )
1009 IF( iinfo.NE.0 )
THEN
1010 WRITE( nounit, fmt = 9999 )
'SSPTRD(U)', iinfo, n, jtype,
1013 IF( iinfo.LT.0 )
THEN
1016 result( 5 ) = ulpinv
1022 CALL
sopgtr(
'U', n, vp, tau, u, ldu, work, iinfo )
1023 IF( iinfo.NE.0 )
THEN
1024 WRITE( nounit, fmt = 9999 )
'SOPGTR(U)', iinfo, n, jtype,
1027 IF( iinfo.LT.0 )
THEN
1030 result( 6 ) = ulpinv
1037 CALL
sspt21( 2,
'Upper', n, 1, ap, sd, se, u, ldu, vp, tau,
1038 $ work, result( 5 ) )
1039 CALL
sspt21( 3,
'Upper', n, 1, ap, sd, se, u, ldu, vp, tau,
1040 $ work, result( 6 ) )
1048 ap( i ) = a( jr, jc )
1054 CALL
scopy( nap, ap, 1, vp, 1 )
1057 CALL
ssptrd(
'L', n, vp, sd, se, tau, iinfo )
1059 IF( iinfo.NE.0 )
THEN
1060 WRITE( nounit, fmt = 9999 )
'SSPTRD(L)', iinfo, n, jtype,
1063 IF( iinfo.LT.0 )
THEN
1066 result( 7 ) = ulpinv
1072 CALL
sopgtr(
'L', n, vp, tau, u, ldu, work, iinfo )
1073 IF( iinfo.NE.0 )
THEN
1074 WRITE( nounit, fmt = 9999 )
'SOPGTR(L)', iinfo, n, jtype,
1077 IF( iinfo.LT.0 )
THEN
1080 result( 8 ) = ulpinv
1085 CALL
sspt21( 2,
'Lower', n, 1, ap, sd, se, u, ldu, vp, tau,
1086 $ work, result( 7 ) )
1087 CALL
sspt21( 3,
'Lower', n, 1, ap, sd, se, u, ldu, vp, tau,
1088 $ work, result( 8 ) )
1094 CALL
scopy( n, sd, 1, d1, 1 )
1096 $ CALL
scopy( n-1, se, 1, work, 1 )
1097 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1100 CALL
ssteqr(
'V', n, d1, work, z, ldu, work( n+1 ), iinfo )
1101 IF( iinfo.NE.0 )
THEN
1102 WRITE( nounit, fmt = 9999 )
'SSTEQR(V)', iinfo, n, jtype,
1105 IF( iinfo.LT.0 )
THEN
1108 result( 9 ) = ulpinv
1115 CALL
scopy( n, sd, 1, d2, 1 )
1117 $ CALL
scopy( n-1, se, 1, work, 1 )
1120 CALL
ssteqr(
'N', n, d2, work, work( n+1 ), ldu,
1121 $ work( n+1 ), iinfo )
1122 IF( iinfo.NE.0 )
THEN
1123 WRITE( nounit, fmt = 9999 )
'SSTEQR(N)', iinfo, n, jtype,
1126 IF( iinfo.LT.0 )
THEN
1129 result( 11 ) = ulpinv
1136 CALL
scopy( n, sd, 1, d3, 1 )
1138 $ CALL
scopy( n-1, se, 1, work, 1 )
1141 CALL
ssterf( n, d3, work, iinfo )
1142 IF( iinfo.NE.0 )
THEN
1143 WRITE( nounit, fmt = 9999 )
'SSTERF', iinfo, n, jtype,
1146 IF( iinfo.LT.0 )
THEN
1149 result( 12 ) = ulpinv
1156 CALL
sstt21( n, 0, sd, se, d1, dumma, z, ldu, work,
1167 temp1 = max( temp1, abs( d1( j ) ), abs( d2( j ) ) )
1168 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1169 temp3 = max( temp3, abs( d1( j ) ), abs( d3( j ) ) )
1170 temp4 = max( temp4, abs( d1( j )-d3( j ) ) )
1173 result( 11 ) = temp2 / max( unfl, ulp*max( temp1, temp2 ) )
1174 result( 12 ) = temp4 / max( unfl, ulp*max( temp3, temp4 ) )
1180 temp1 = thresh*( half-ulp )
1182 DO 160 j = 0, log2ui
1183 CALL
sstech( n, sd, se, d1, temp1, work, iinfo )
1190 result( 13 ) = temp1
1195 IF( jtype.GT.15 )
THEN
1199 CALL
scopy( n, sd, 1, d4, 1 )
1201 $ CALL
scopy( n-1, se, 1, work, 1 )
1202 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1205 CALL
spteqr(
'V', n, d4, work, z, ldu, work( n+1 ),
1207 IF( iinfo.NE.0 )
THEN
1208 WRITE( nounit, fmt = 9999 )
'SPTEQR(V)', iinfo, n,
1211 IF( iinfo.LT.0 )
THEN
1214 result( 14 ) = ulpinv
1221 CALL
sstt21( n, 0, sd, se, d4, dumma, z, ldu, work,
1226 CALL
scopy( n, sd, 1, d5, 1 )
1228 $ CALL
scopy( n-1, se, 1, work, 1 )
1231 CALL
spteqr(
'N', n, d5, work, z, ldu, work( n+1 ),
1233 IF( iinfo.NE.0 )
THEN
1234 WRITE( nounit, fmt = 9999 )
'SPTEQR(N)', iinfo, n,
1237 IF( iinfo.LT.0 )
THEN
1240 result( 16 ) = ulpinv
1250 temp1 = max( temp1, abs( d4( j ) ), abs( d5( j ) ) )
1251 temp2 = max( temp2, abs( d4( j )-d5( j ) ) )
1254 result( 16 ) = temp2 / max( unfl,
1255 $ hun*ulp*max( temp1, temp2 ) )
1271 IF( jtype.EQ.21 )
THEN
1273 abstol = unfl + unfl
1274 CALL
sstebz(
'A',
'E', n, vl, vu, il, iu, abstol, sd, se,
1275 $ m, nsplit, wr, iwork( 1 ), iwork( n+1 ),
1276 $ work, iwork( 2*n+1 ), iinfo )
1277 IF( iinfo.NE.0 )
THEN
1278 WRITE( nounit, fmt = 9999 )
'SSTEBZ(A,rel)', iinfo, n,
1281 IF( iinfo.LT.0 )
THEN
1284 result( 17 ) = ulpinv
1291 temp2 = two*( two*n-one )*ulp*( one+eight*half**2 ) /
1296 temp1 = max( temp1, abs( d4( j )-wr( n-j+1 ) ) /
1297 $ ( abstol+abs( d4( j ) ) ) )
1300 result( 17 ) = temp1 / temp2
1308 abstol = unfl + unfl
1309 CALL
sstebz(
'A',
'E', n, vl, vu, il, iu, abstol, sd, se, m,
1310 $ nsplit, wa1, iwork( 1 ), iwork( n+1 ), work,
1311 $ iwork( 2*n+1 ), iinfo )
1312 IF( iinfo.NE.0 )
THEN
1313 WRITE( nounit, fmt = 9999 )
'SSTEBZ(A)', iinfo, n, jtype,
1316 IF( iinfo.LT.0 )
THEN
1319 result( 18 ) = ulpinv
1329 temp1 = max( temp1, abs( d3( j ) ), abs( wa1( j ) ) )
1330 temp2 = max( temp2, abs( d3( j )-wa1( j ) ) )
1333 result( 18 ) = temp2 / max( unfl, ulp*max( temp1, temp2 ) )
1343 il = 1 + ( n-1 )*int(
slarnd( 1, iseed2 ) )
1344 iu = 1 + ( n-1 )*int(
slarnd( 1, iseed2 ) )
1352 CALL
sstebz(
'I',
'E', n, vl, vu, il, iu, abstol, sd, se,
1353 $ m2, nsplit, wa2, iwork( 1 ), iwork( n+1 ),
1354 $ work, iwork( 2*n+1 ), iinfo )
1355 IF( iinfo.NE.0 )
THEN
1356 WRITE( nounit, fmt = 9999 )
'SSTEBZ(I)', iinfo, n, jtype,
1359 IF( iinfo.LT.0 )
THEN
1362 result( 19 ) = ulpinv
1372 vl = wa1( il ) - max( half*( wa1( il )-wa1( il-1 ) ),
1373 $ ulp*anorm, two*rtunfl )
1375 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1376 $ ulp*anorm, two*rtunfl )
1379 vu = wa1( iu ) + max( half*( wa1( iu+1 )-wa1( iu ) ),
1380 $ ulp*anorm, two*rtunfl )
1382 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1383 $ ulp*anorm, two*rtunfl )
1390 CALL
sstebz(
'V',
'E', n, vl, vu, il, iu, abstol, sd, se,
1391 $ m3, nsplit, wa3, iwork( 1 ), iwork( n+1 ),
1392 $ work, iwork( 2*n+1 ), iinfo )
1393 IF( iinfo.NE.0 )
THEN
1394 WRITE( nounit, fmt = 9999 )
'SSTEBZ(V)', iinfo, n, jtype,
1397 IF( iinfo.LT.0 )
THEN
1400 result( 19 ) = ulpinv
1405 IF( m3.EQ.0 .AND. n.NE.0 )
THEN
1406 result( 19 ) = ulpinv
1412 temp1 =
ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1413 temp2 =
ssxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1415 temp3 = max( abs( wa1( n ) ), abs( wa1( 1 ) ) )
1420 result( 19 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1427 CALL
sstebz(
'A',
'B', n, vl, vu, il, iu, abstol, sd, se, m,
1428 $ nsplit, wa1, iwork( 1 ), iwork( n+1 ), work,
1429 $ iwork( 2*n+1 ), iinfo )
1430 IF( iinfo.NE.0 )
THEN
1431 WRITE( nounit, fmt = 9999 )
'SSTEBZ(A,B)', iinfo, n,
1434 IF( iinfo.LT.0 )
THEN
1437 result( 20 ) = ulpinv
1438 result( 21 ) = ulpinv
1443 CALL
sstein( n, sd, se, m, wa1, iwork( 1 ), iwork( n+1 ), z,
1444 $ ldu, work, iwork( 2*n+1 ), iwork( 3*n+1 ),
1446 IF( iinfo.NE.0 )
THEN
1447 WRITE( nounit, fmt = 9999 )
'SSTEIN', iinfo, n, jtype,
1450 IF( iinfo.LT.0 )
THEN
1453 result( 20 ) = ulpinv
1454 result( 21 ) = ulpinv
1461 CALL
sstt21( n, 0, sd, se, wa1, dumma, z, ldu, work,
1468 CALL
scopy( n, sd, 1, d1, 1 )
1470 $ CALL
scopy( n-1, se, 1, work, 1 )
1471 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1474 CALL
sstedc(
'I', n, d1, work, z, ldu, work( n+1 ), lwedc-n,
1475 $ iwork, liwedc, iinfo )
1476 IF( iinfo.NE.0 )
THEN
1477 WRITE( nounit, fmt = 9999 )
'SSTEDC(I)', iinfo, n, jtype,
1480 IF( iinfo.LT.0 )
THEN
1483 result( 22 ) = ulpinv
1490 CALL
sstt21( n, 0, sd, se, d1, dumma, z, ldu, work,
1497 CALL
scopy( n, sd, 1, d1, 1 )
1499 $ CALL
scopy( n-1, se, 1, work, 1 )
1500 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1503 CALL
sstedc(
'V', n, d1, work, z, ldu, work( n+1 ), lwedc-n,
1504 $ iwork, liwedc, iinfo )
1505 IF( iinfo.NE.0 )
THEN
1506 WRITE( nounit, fmt = 9999 )
'SSTEDC(V)', iinfo, n, jtype,
1509 IF( iinfo.LT.0 )
THEN
1512 result( 24 ) = ulpinv
1519 CALL
sstt21( n, 0, sd, se, d1, dumma, z, ldu, work,
1526 CALL
scopy( n, sd, 1, d2, 1 )
1528 $ CALL
scopy( n-1, se, 1, work, 1 )
1529 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1532 CALL
sstedc(
'N', n, d2, work, z, ldu, work( n+1 ), lwedc-n,
1533 $ iwork, liwedc, iinfo )
1534 IF( iinfo.NE.0 )
THEN
1535 WRITE( nounit, fmt = 9999 )
'SSTEDC(N)', iinfo, n, jtype,
1538 IF( iinfo.LT.0 )
THEN
1541 result( 26 ) = ulpinv
1552 temp1 = max( temp1, abs( d1( j ) ), abs( d2( j ) ) )
1553 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1556 result( 26 ) = temp2 / max( unfl, ulp*max( temp1, temp2 ) )
1560 IF(
ilaenv( 10,
'SSTEMR',
'VA', 1, 0, 0, 0 ).EQ.1 .AND.
1561 $
ilaenv( 11,
'SSTEMR',
'VA', 1, 0, 0, 0 ).EQ.1 )
THEN
1572 IF( jtype.EQ.21 .AND. srel )
THEN
1574 abstol = unfl + unfl
1575 CALL
sstemr(
'V',
'A', n, sd, se, vl, vu, il, iu,
1576 $ m, wr, z, ldu, n, iwork( 1 ), tryrac,
1577 $ work, lwork, iwork( 2*n+1 ), lwork-2*n,
1579 IF( iinfo.NE.0 )
THEN
1580 WRITE( nounit, fmt = 9999 )
'SSTEMR(V,A,rel)',
1581 $ iinfo, n, jtype, ioldsd
1583 IF( iinfo.LT.0 )
THEN
1586 result( 27 ) = ulpinv
1593 temp2 = two*( two*n-one )*ulp*( one+eight*half**2 ) /
1598 temp1 = max( temp1, abs( d4( j )-wr( n-j+1 ) ) /
1599 $ ( abstol+abs( d4( j ) ) ) )
1602 result( 27 ) = temp1 / temp2
1604 il = 1 + ( n-1 )*int(
slarnd( 1, iseed2 ) )
1605 iu = 1 + ( n-1 )*int(
slarnd( 1, iseed2 ) )
1614 abstol = unfl + unfl
1615 CALL
sstemr(
'V',
'I', n, sd, se, vl, vu, il, iu,
1616 $ m, wr, z, ldu, n, iwork( 1 ), tryrac,
1617 $ work, lwork, iwork( 2*n+1 ),
1618 $ lwork-2*n, iinfo )
1620 IF( iinfo.NE.0 )
THEN
1621 WRITE( nounit, fmt = 9999 )
'SSTEMR(V,I,rel)',
1622 $ iinfo, n, jtype, ioldsd
1624 IF( iinfo.LT.0 )
THEN
1627 result( 28 ) = ulpinv
1635 temp2 = two*( two*n-one )*ulp*
1636 $ ( one+eight*half**2 ) / ( one-half )**4
1640 temp1 = max( temp1, abs( wr( j-il+1 )-d4( n-j+
1641 $ 1 ) ) / ( abstol+abs( wr( j-il+1 ) ) ) )
1644 result( 28 ) = temp1 / temp2
1657 CALL
scopy( n, sd, 1, d5, 1 )
1659 $ CALL
scopy( n-1, se, 1, work, 1 )
1660 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1664 il = 1 + ( n-1 )*int(
slarnd( 1, iseed2 ) )
1665 iu = 1 + ( n-1 )*int(
slarnd( 1, iseed2 ) )
1671 CALL
sstemr(
'V',
'I', n, d5, work, vl, vu, il, iu,
1672 $ m, d1, z, ldu, n, iwork( 1 ), tryrac,
1673 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1674 $ liwork-2*n, iinfo )
1675 IF( iinfo.NE.0 )
THEN
1676 WRITE( nounit, fmt = 9999 )
'SSTEMR(V,I)', iinfo,
1679 IF( iinfo.LT.0 )
THEN
1682 result( 29 ) = ulpinv
1689 CALL
sstt22( n, m, 0, sd, se, d1, dumma, z, ldu, work,
1696 CALL
scopy( n, sd, 1, d5, 1 )
1698 $ CALL
scopy( n-1, se, 1, work, 1 )
1701 CALL
sstemr(
'N',
'I', n, d5, work, vl, vu, il, iu,
1702 $ m, d2, z, ldu, n, iwork( 1 ), tryrac,
1703 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1704 $ liwork-2*n, iinfo )
1705 IF( iinfo.NE.0 )
THEN
1706 WRITE( nounit, fmt = 9999 )
'SSTEMR(N,I)', iinfo,
1709 IF( iinfo.LT.0 )
THEN
1712 result( 31 ) = ulpinv
1722 DO 240 j = 1, iu - il + 1
1723 temp1 = max( temp1, abs( d1( j ) ),
1725 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1728 result( 31 ) = temp2 / max( unfl,
1729 $ ulp*max( temp1, temp2 ) )
1736 CALL
scopy( n, sd, 1, d5, 1 )
1738 $ CALL
scopy( n-1, se, 1, work, 1 )
1739 CALL
slaset(
'Full', n, n, zero, one, z, ldu )
1745 vl = d2( il ) - max( half*
1746 $ ( d2( il )-d2( il-1 ) ), ulp*anorm,
1749 vl = d2( 1 ) - max( half*( d2( n )-d2( 1 ) ),
1750 $ ulp*anorm, two*rtunfl )
1753 vu = d2( iu ) + max( half*
1754 $ ( d2( iu+1 )-d2( iu ) ), ulp*anorm,
1757 vu = d2( n ) + max( half*( d2( n )-d2( 1 ) ),
1758 $ ulp*anorm, two*rtunfl )
1765 CALL
sstemr(
'V',
'V', n, d5, work, vl, vu, il, iu,
1766 $ m, d1, z, ldu, n, iwork( 1 ), tryrac,
1767 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1768 $ liwork-2*n, iinfo )
1769 IF( iinfo.NE.0 )
THEN
1770 WRITE( nounit, fmt = 9999 )
'SSTEMR(V,V)', iinfo,
1773 IF( iinfo.LT.0 )
THEN
1776 result( 32 ) = ulpinv
1783 CALL
sstt22( n, m, 0, sd, se, d1, dumma, z, ldu, work,
1790 CALL
scopy( n, sd, 1, d5, 1 )
1792 $ CALL
scopy( n-1, se, 1, work, 1 )
1795 CALL
sstemr(
'N',
'V', n, d5, work, vl, vu, il, iu,
1796 $ m, d2, z, ldu, n, iwork( 1 ), tryrac,
1797 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1798 $ liwork-2*n, iinfo )
1799 IF( iinfo.NE.0 )
THEN
1800 WRITE( nounit, fmt = 9999 )
'SSTEMR(N,V)', iinfo,
1803 IF( iinfo.LT.0 )
THEN
1806 result( 34 ) = ulpinv
1816 DO 250 j = 1, iu - il + 1
1817 temp1 = max( temp1, abs( d1( j ) ),
1819 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1822 result( 34 ) = temp2 / max( unfl,
1823 $ ulp*max( temp1, temp2 ) )
1838 CALL
scopy( n, sd, 1, d5, 1 )
1840 $ CALL
scopy( n-1, se, 1, work, 1 )
1844 CALL
sstemr(
'V',
'A', n, d5, work, vl, vu, il, iu,
1845 $ m, d1, z, ldu, n, iwork( 1 ), tryrac,
1846 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1847 $ liwork-2*n, iinfo )
1848 IF( iinfo.NE.0 )
THEN
1849 WRITE( nounit, fmt = 9999 )
'SSTEMR(V,A)', iinfo, n,
1852 IF( iinfo.LT.0 )
THEN
1855 result( 35 ) = ulpinv
1862 CALL
sstt22( n, m, 0, sd, se, d1, dumma, z, ldu, work, m,
1869 CALL
scopy( n, sd, 1, d5, 1 )
1871 $ CALL
scopy( n-1, se, 1, work, 1 )
1874 CALL
sstemr(
'N',
'A', n, d5, work, vl, vu, il, iu,
1875 $ m, d2, z, ldu, n, iwork( 1 ), tryrac,
1876 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1877 $ liwork-2*n, iinfo )
1878 IF( iinfo.NE.0 )
THEN
1879 WRITE( nounit, fmt = 9999 )
'SSTEMR(N,A)', iinfo, n,
1882 IF( iinfo.LT.0 )
THEN
1885 result( 37 ) = ulpinv
1896 temp1 = max( temp1, abs( d1( j ) ), abs( d2( j ) ) )
1897 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1900 result( 37 ) = temp2 / max( unfl,
1901 $ ulp*max( temp1, temp2 ) )
1905 ntestt = ntestt + ntest
1912 DO 290 jr = 1, ntest
1913 IF( result( jr ).GE.thresh )
THEN
1918 IF( nerrs.EQ.0 )
THEN
1919 WRITE( nounit, fmt = 9998 )
'SST'
1920 WRITE( nounit, fmt = 9997 )
1921 WRITE( nounit, fmt = 9996 )
1922 WRITE( nounit, fmt = 9995 )
'Symmetric'
1923 WRITE( nounit, fmt = 9994 )
1927 WRITE( nounit, fmt = 9988 )
1930 WRITE( nounit, fmt = 9990 )n, ioldsd, jtype, jr,
1939 CALL
slasum(
'SST', nounit, nerrs, ntestt )
1942 9999 format(
' SCHKST: ', a,
' returned INFO=', i6,
'.', / 9x,
'N=',
1943 $ i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
1945 9998 format( / 1x, a3,
' -- Real Symmetric eigenvalue problem' )
1946 9997 format(
' Matrix types (see SCHKST for details): ' )
1948 9996 format( /
' Special Matrices:',
1949 $ /
' 1=Zero matrix. ',
1950 $
' 5=Diagonal: clustered entries.',
1951 $ /
' 2=Identity matrix. ',
1952 $
' 6=Diagonal: large, evenly spaced.',
1953 $ /
' 3=Diagonal: evenly spaced entries. ',
1954 $
' 7=Diagonal: small, evenly spaced.',
1955 $ /
' 4=Diagonal: geometr. spaced entries.' )
1956 9995 format(
' Dense ', a,
' Matrices:',
1957 $ /
' 8=Evenly spaced eigenvals. ',
1958 $
' 12=Small, evenly spaced eigenvals.',
1959 $ /
' 9=Geometrically spaced eigenvals. ',
1960 $
' 13=Matrix with random O(1) entries.',
1961 $ /
' 10=Clustered eigenvalues. ',
1962 $
' 14=Matrix with large random entries.',
1963 $ /
' 11=Large, evenly spaced eigenvals. ',
1964 $
' 15=Matrix with small random entries.' )
1965 9994 format(
' 16=Positive definite, evenly spaced eigenvalues',
1966 $ /
' 17=Positive definite, geometrically spaced eigenvlaues',
1967 $ /
' 18=Positive definite, clustered eigenvalues',
1968 $ /
' 19=Positive definite, small evenly spaced eigenvalues',
1969 $ /
' 20=Positive definite, large evenly spaced eigenvalues',
1970 $ /
' 21=Diagonally dominant tridiagonal, geometrically',
1971 $
' spaced eigenvalues' )
1973 9990 format(
' N=', i5,
', seed=', 4( i4,
',' ),
' type ', i2,
1974 $
', test(', i2,
')=', g10.3 )
1976 9988 format( /
'Test performed: see SCHKST for details.', / )