 LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine sckglm ( integer NN, integer, dimension( * ) MVAL, integer, dimension( * ) PVAL, integer, dimension( * ) NVAL, integer NMATS, integer, dimension( 4 ) ISEED, real THRESH, integer NMAX, real, dimension( * ) A, real, dimension( * ) AF, real, dimension( * ) B, real, dimension( * ) BF, real, dimension( * ) X, real, dimension( * ) WORK, real, dimension( * ) RWORK, integer NIN, integer NOUT, integer INFO )

SCKGLM

Purpose:
``` SCKGLM tests SGGGLM - subroutine for solving generalized linear
model problem.```
Parameters
 [in] NN ``` NN is INTEGER The number of values of N, M and P contained in the vectors NVAL, MVAL and PVAL.``` [in] MVAL ``` MVAL is INTEGER array, dimension (NN) The values of the matrix column dimension M.``` [in] PVAL ``` PVAL is INTEGER array, dimension (NN) The values of the matrix column dimension P.``` [in] NVAL ``` NVAL is INTEGER array, dimension (NN) The values of the matrix row dimension N.``` [in] NMATS ``` NMATS is INTEGER The number of matrix types to be tested for each combination of matrix dimensions. If NMATS >= NTYPES (the maximum number of matrix types), then all the different types are generated for testing. If NMATS < NTYPES, another input line is read to get the numbers of the matrix types to be used.``` [in,out] ISEED ``` ISEED is INTEGER array, dimension (4) On entry, the seed of the random number generator. The array elements should be between 0 and 4095, otherwise they will be reduced mod 4096, and ISEED(4) must be odd. On exit, the next seed in the random number sequence after all the test matrices have been generated.``` [in] THRESH ``` THRESH is REAL The threshold value for the test ratios. A result is included in the output file if RESID >= THRESH. To have every test ratio printed, use THRESH = 0.``` [in] NMAX ``` NMAX is INTEGER The maximum value permitted for M or N, used in dimensioning the work arrays.``` [out] A ` A is REAL array, dimension (NMAX*NMAX)` [out] AF ` AF is REAL array, dimension (NMAX*NMAX)` [out] B ` B is REAL array, dimension (NMAX*NMAX)` [out] BF ` BF is REAL array, dimension (NMAX*NMAX)` [out] X ` X is REAL array, dimension (4*NMAX)` [out] RWORK ` RWORK is REAL array, dimension (NMAX)` [out] WORK ` WORK is REAL array, dimension (NMAX*NMAX)` [in] NIN ``` NIN is INTEGER The unit number for input.``` [in] NOUT ``` NOUT is INTEGER The unit number for output.``` [out] INFO ``` INFO is INTEGER = 0 : successful exit > 0 : If SLATMS returns an error code, the absolute value of it is returned.```
Date
November 2011

Definition at line 169 of file sckglm.f.

169 *
170 * -- LAPACK test routine (version 3.4.0) --
171 * -- LAPACK is a software package provided by Univ. of Tennessee, --
172 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
173 * November 2011
174 *
175 * .. Scalar Arguments ..
176  INTEGER info, nin, nmats, nmax, nn, nout
177  REAL thresh
178 * ..
179 * .. Array Arguments ..
180  INTEGER iseed( 4 ), mval( * ), nval( * ), pval( * )
181  REAL a( * ), af( * ), b( * ), bf( * ), rwork( * ),
182  \$ work( * ), x( * )
183 * ..
184 *
185 * =====================================================================
186 *
187 * .. Parameters ..
188  INTEGER ntypes
189  parameter ( ntypes = 8 )
190 * ..
191 * .. Local Scalars ..
192  LOGICAL firstt
193  CHARACTER dista, distb, type
194  CHARACTER*3 path
195  INTEGER i, iinfo, ik, imat, kla, klb, kua, kub, lda,
196  \$ ldb, lwork, m, modea, modeb, n, nfail, nrun, p
197  REAL anorm, bnorm, cndnma, cndnmb, resid
198 * ..
199 * .. Local Arrays ..
200  LOGICAL dotype( ntypes )
201 * ..
202 * .. External Functions ..
203  REAL slarnd
204  EXTERNAL slarnd
205 * ..
206 * .. External Subroutines ..
207  EXTERNAL alahdg, alareq, alasum, sglmts, slatb9, slatms
208 * ..
209 * .. Intrinsic Functions ..
210  INTRINSIC abs
211 * ..
212 * .. Executable Statements ..
213 *
214 * Initialize constants.
215 *
216  path( 1: 3 ) = 'GLM'
217  info = 0
218  nrun = 0
219  nfail = 0
220  firstt = .true.
221  CALL alareq( path, nmats, dotype, ntypes, nin, nout )
222  lda = nmax
223  ldb = nmax
224  lwork = nmax*nmax
225 *
226 * Check for valid input values.
227 *
228  DO 10 ik = 1, nn
229  m = mval( ik )
230  p = pval( ik )
231  n = nval( ik )
232  IF( m.GT.n .OR. n.GT.m+p ) THEN
233  IF( firstt ) THEN
234  WRITE( nout, fmt = * )
235  firstt = .false.
236  END IF
237  WRITE( nout, fmt = 9997 )m, p, n
238  END IF
239  10 CONTINUE
240  firstt = .true.
241 *
242 * Do for each value of M in MVAL.
243 *
244  DO 40 ik = 1, nn
245  m = mval( ik )
246  p = pval( ik )
247  n = nval( ik )
248  IF( m.GT.n .OR. n.GT.m+p )
249  \$ GO TO 40
250 *
251  DO 30 imat = 1, ntypes
252 *
253 * Do the tests only if DOTYPE( IMAT ) is true.
254 *
255  IF( .NOT.dotype( imat ) )
256  \$ GO TO 30
257 *
258 * Set up parameters with SLATB9 and generate test
259 * matrices A and B with SLATMS.
260 *
261  CALL slatb9( path, imat, m, p, n, TYPE, kla, kua, klb, kub,
262  \$ anorm, bnorm, modea, modeb, cndnma, cndnmb,
263  \$ dista, distb )
264 *
265  CALL slatms( n, m, dista, iseed, TYPE, rwork, modea, cndnma,
266  \$ anorm, kla, kua, 'No packing', a, lda, work,
267  \$ iinfo )
268  IF( iinfo.NE.0 ) THEN
269  WRITE( nout, fmt = 9999 )iinfo
270  info = abs( iinfo )
271  GO TO 30
272  END IF
273 *
274  CALL slatms( n, p, distb, iseed, TYPE, rwork, modeb, cndnmb,
275  \$ bnorm, klb, kub, 'No packing', b, ldb, work,
276  \$ iinfo )
277  IF( iinfo.NE.0 ) THEN
278  WRITE( nout, fmt = 9999 )iinfo
279  info = abs( iinfo )
280  GO TO 30
281  END IF
282 *
283 * Generate random left hand side vector of GLM
284 *
285  DO 20 i = 1, n
286  x( i ) = slarnd( 2, iseed )
287  20 CONTINUE
288 *
289  CALL sglmts( n, m, p, a, af, lda, b, bf, ldb, x,
290  \$ x( nmax+1 ), x( 2*nmax+1 ), x( 3*nmax+1 ),
291  \$ work, lwork, rwork, resid )
292 *
293 * Print information about the tests that did not
294 * pass the threshold.
295 *
296  IF( resid.GE.thresh ) THEN
297  IF( nfail.EQ.0 .AND. firstt ) THEN
298  firstt = .false.
299  CALL alahdg( nout, path )
300  END IF
301  WRITE( nout, fmt = 9998 )n, m, p, imat, 1, resid
302  nfail = nfail + 1
303  END IF
304  nrun = nrun + 1
305 *
306  30 CONTINUE
307  40 CONTINUE
308 *
309 * Print a summary of the results.
310 *
311  CALL alasum( path, nout, nfail, nrun, 0 )
312 *
313  9999 FORMAT( ' SLATMS in SCKGLM INFO = ', i5 )
314  9998 FORMAT( ' N=', i4, ' M=', i4, ', P=', i4, ', type ', i2,
315  \$ ', test ', i2, ', ratio=', g13.6 )
316  9997 FORMAT( ' *** Invalid input for GLM: M = ', i6, ', P = ', i6,
317  \$ ', N = ', i6, ';', / ' must satisfy M <= N <= M+P ',
318  \$ '(this set of values will be skipped)' )
319  RETURN
320 *
321 * End of SCKGLM
322 *
subroutine alareq(PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT)
ALAREQ
Definition: alareq.f:92
subroutine slatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
SLATMS
Definition: slatms.f:323
subroutine slatb9(PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB, ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB, DISTA, DISTB)
SLATB9
Definition: slatb9.f:172
real function slarnd(IDIST, ISEED)
SLARND
Definition: slarnd.f:75
subroutine sglmts(N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U, WORK, LWORK, RWORK, RESULT)
SGLMTS
Definition: sglmts.f:151
subroutine alahdg(IOUNIT, PATH)
ALAHDG
Definition: alahdg.f:64
subroutine alasum(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASUM
Definition: alasum.f:75

Here is the call graph for this function:

Here is the caller graph for this function: