00001 SUBROUTINE SCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
00002 $ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
00003 $ INFO )
00004
00005
00006
00007
00008
00009
00010 INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
00011 REAL THRESH
00012
00013
00014 INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
00015 REAL A( * ), AF( * ), B( * ), BF( * ), RWORK( * ),
00016 $ WORK( * ), X( * )
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 INTEGER NTESTS
00093 PARAMETER ( NTESTS = 7 )
00094 INTEGER NTYPES
00095 PARAMETER ( NTYPES = 8 )
00096
00097
00098 LOGICAL FIRSTT
00099 CHARACTER DISTA, DISTB, TYPE
00100 CHARACTER*3 PATH
00101 INTEGER I, IINFO, IK, IMAT, KLA, KLB, KUA, KUB, LDA,
00102 $ LDB, LWORK, M, MODEA, MODEB, N, NFAIL, NRUN,
00103 $ NT, P
00104 REAL ANORM, BNORM, CNDNMA, CNDNMB
00105
00106
00107 LOGICAL DOTYPE( NTYPES )
00108 REAL RESULT( NTESTS )
00109
00110
00111 EXTERNAL ALAHDG, ALAREQ, ALASUM, SLARHS, SLATB9, SLATMS,
00112 $ SLSETS
00113
00114
00115 INTRINSIC ABS, MAX
00116
00117
00118
00119
00120
00121 PATH( 1: 3 ) = 'LSE'
00122 INFO = 0
00123 NRUN = 0
00124 NFAIL = 0
00125 FIRSTT = .TRUE.
00126 CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00127 LDA = NMAX
00128 LDB = NMAX
00129 LWORK = NMAX*NMAX
00130
00131
00132
00133 DO 10 IK = 1, NN
00134 M = MVAL( IK )
00135 P = PVAL( IK )
00136 N = NVAL( IK )
00137 IF( P.GT.N .OR. N.GT.M+P ) THEN
00138 IF( FIRSTT ) THEN
00139 WRITE( NOUT, FMT = * )
00140 FIRSTT = .FALSE.
00141 END IF
00142 WRITE( NOUT, FMT = 9997 )M, P, N
00143 END IF
00144 10 CONTINUE
00145 FIRSTT = .TRUE.
00146
00147
00148
00149 DO 40 IK = 1, NN
00150 M = MVAL( IK )
00151 P = PVAL( IK )
00152 N = NVAL( IK )
00153 IF( P.GT.N .OR. N.GT.M+P )
00154 $ GO TO 40
00155
00156 DO 30 IMAT = 1, NTYPES
00157
00158
00159
00160 IF( .NOT.DOTYPE( IMAT ) )
00161 $ GO TO 30
00162
00163
00164
00165
00166 CALL SLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB,
00167 $ ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB,
00168 $ DISTA, DISTB )
00169
00170 CALL SLATMS( M, N, DISTA, ISEED, TYPE, RWORK, MODEA, CNDNMA,
00171 $ ANORM, KLA, KUA, 'No packing', A, LDA, WORK,
00172 $ IINFO )
00173 IF( IINFO.NE.0 ) THEN
00174 WRITE( NOUT, FMT = 9999 )IINFO
00175 INFO = ABS( IINFO )
00176 GO TO 30
00177 END IF
00178
00179 CALL SLATMS( P, N, DISTB, ISEED, TYPE, RWORK, MODEB, CNDNMB,
00180 $ BNORM, KLB, KUB, 'No packing', B, LDB, WORK,
00181 $ IINFO )
00182 IF( IINFO.NE.0 ) THEN
00183 WRITE( NOUT, FMT = 9999 )IINFO
00184 INFO = ABS( IINFO )
00185 GO TO 30
00186 END IF
00187
00188
00189
00190 CALL SLARHS( 'SGE', 'New solution', 'Upper', 'N', M, N,
00191 $ MAX( M-1, 0 ), MAX( N-1, 0 ), 1, A, LDA,
00192 $ X( 4*NMAX+1 ), MAX( N, 1 ), X, MAX( M, 1 ),
00193 $ ISEED, IINFO )
00194
00195 CALL SLARHS( 'SGE', 'Computed', 'Upper', 'N', P, N,
00196 $ MAX( P-1, 0 ), MAX( N-1, 0 ), 1, B, LDB,
00197 $ X( 4*NMAX+1 ), MAX( N, 1 ), X( 2*NMAX+1 ),
00198 $ MAX( P, 1 ), ISEED, IINFO )
00199
00200 NT = 2
00201
00202 CALL SLSETS( M, P, N, A, AF, LDA, B, BF, LDB, X,
00203 $ X( NMAX+1 ), X( 2*NMAX+1 ), X( 3*NMAX+1 ),
00204 $ X( 4*NMAX+1 ), WORK, LWORK, RWORK,
00205 $ RESULT( 1 ) )
00206
00207
00208
00209
00210 DO 20 I = 1, NT
00211 IF( RESULT( I ).GE.THRESH ) THEN
00212 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
00213 FIRSTT = .FALSE.
00214 CALL ALAHDG( NOUT, PATH )
00215 END IF
00216 WRITE( NOUT, FMT = 9998 )M, P, N, IMAT, I,
00217 $ RESULT( I )
00218 NFAIL = NFAIL + 1
00219 END IF
00220 20 CONTINUE
00221 NRUN = NRUN + NT
00222
00223 30 CONTINUE
00224 40 CONTINUE
00225
00226
00227
00228 CALL ALASUM( PATH, NOUT, NFAIL, NRUN, 0 )
00229
00230 9999 FORMAT( ' SLATMS in SCKLSE INFO = ', I5 )
00231 9998 FORMAT( ' M=', I4, ' P=', I4, ', N=', I4, ', type ', I2,
00232 $ ', test ', I2, ', ratio=', G13.6 )
00233 9997 FORMAT( ' *** Invalid input for LSE: M = ', I6, ', P = ', I6,
00234 $ ', N = ', I6, ';', / ' must satisfy P <= N <= P+M ',
00235 $ '(this set of values will be skipped)' )
00236 RETURN
00237
00238
00239
00240 END