00001 SUBROUTINE SCKGLM( 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 NTYPES
00093 PARAMETER ( NTYPES = 8 )
00094
00095
00096 LOGICAL FIRSTT
00097 CHARACTER DISTA, DISTB, TYPE
00098 CHARACTER*3 PATH
00099 INTEGER I, IINFO, IK, IMAT, KLA, KLB, KUA, KUB, LDA,
00100 $ LDB, LWORK, M, MODEA, MODEB, N, NFAIL, NRUN, P
00101 REAL ANORM, BNORM, CNDNMA, CNDNMB, RESID
00102
00103
00104 LOGICAL DOTYPE( NTYPES )
00105
00106
00107 REAL SLARND
00108 EXTERNAL SLARND
00109
00110
00111 EXTERNAL ALAHDG, ALAREQ, ALASUM, SGLMTS, SLATB9, SLATMS
00112
00113
00114 INTRINSIC ABS
00115
00116
00117
00118
00119
00120 PATH( 1: 3 ) = 'GLM'
00121 INFO = 0
00122 NRUN = 0
00123 NFAIL = 0
00124 FIRSTT = .TRUE.
00125 CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00126 LDA = NMAX
00127 LDB = NMAX
00128 LWORK = NMAX*NMAX
00129
00130
00131
00132 DO 10 IK = 1, NN
00133 M = MVAL( IK )
00134 P = PVAL( IK )
00135 N = NVAL( IK )
00136 IF( M.GT.N .OR. N.GT.M+P ) THEN
00137 IF( FIRSTT ) THEN
00138 WRITE( NOUT, FMT = * )
00139 FIRSTT = .FALSE.
00140 END IF
00141 WRITE( NOUT, FMT = 9997 )M, P, N
00142 END IF
00143 10 CONTINUE
00144 FIRSTT = .TRUE.
00145
00146
00147
00148 DO 40 IK = 1, NN
00149 M = MVAL( IK )
00150 P = PVAL( IK )
00151 N = NVAL( IK )
00152 IF( M.GT.N .OR. N.GT.M+P )
00153 $ GO TO 40
00154
00155 DO 30 IMAT = 1, NTYPES
00156
00157
00158
00159 IF( .NOT.DOTYPE( IMAT ) )
00160 $ GO TO 30
00161
00162
00163
00164
00165 CALL SLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB,
00166 $ ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB,
00167 $ DISTA, DISTB )
00168
00169 CALL SLATMS( N, M, DISTA, ISEED, TYPE, RWORK, MODEA, CNDNMA,
00170 $ ANORM, KLA, KUA, 'No packing', A, LDA, WORK,
00171 $ IINFO )
00172 IF( IINFO.NE.0 ) THEN
00173 WRITE( NOUT, FMT = 9999 )IINFO
00174 INFO = ABS( IINFO )
00175 GO TO 30
00176 END IF
00177
00178 CALL SLATMS( N, P, DISTB, ISEED, TYPE, RWORK, MODEB, CNDNMB,
00179 $ BNORM, KLB, KUB, 'No packing', B, LDB, WORK,
00180 $ IINFO )
00181 IF( IINFO.NE.0 ) THEN
00182 WRITE( NOUT, FMT = 9999 )IINFO
00183 INFO = ABS( IINFO )
00184 GO TO 30
00185 END IF
00186
00187
00188
00189 DO 20 I = 1, N
00190 X( I ) = SLARND( 2, ISEED )
00191 20 CONTINUE
00192
00193 CALL SGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, X,
00194 $ X( NMAX+1 ), X( 2*NMAX+1 ), X( 3*NMAX+1 ),
00195 $ WORK, LWORK, RWORK, RESID )
00196
00197
00198
00199
00200 IF( RESID.GE.THRESH ) THEN
00201 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
00202 FIRSTT = .FALSE.
00203 CALL ALAHDG( NOUT, PATH )
00204 END IF
00205 WRITE( NOUT, FMT = 9998 )N, M, P, IMAT, 1, RESID
00206 NFAIL = NFAIL + 1
00207 END IF
00208 NRUN = NRUN + 1
00209
00210 30 CONTINUE
00211 40 CONTINUE
00212
00213
00214
00215 CALL ALASUM( PATH, NOUT, NFAIL, NRUN, 0 )
00216
00217 9999 FORMAT( ' SLATMS in SCKGLM INFO = ', I5 )
00218 9998 FORMAT( ' N=', I4, ' M=', I4, ', P=', I4, ', type ', I2,
00219 $ ', test ', I2, ', ratio=', G13.6 )
00220 9997 FORMAT( ' *** Invalid input for GLM: M = ', I6, ', P = ', I6,
00221 $ ', N = ', I6, ';', / ' must satisfy M <= N <= M+P ',
00222 $ '(this set of values will be skipped)' )
00223 RETURN
00224
00225
00226
00227 END