LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ cckglm()

subroutine cckglm ( integer  NN,
integer, dimension( * )  NVAL,
integer, dimension( * )  MVAL,
integer, dimension( * )  PVAL,
integer  NMATS,
integer, dimension( 4 )  ISEED,
real  THRESH,
integer  NMAX,
complex, dimension( * )  A,
complex, dimension( * )  AF,
complex, dimension( * )  B,
complex, dimension( * )  BF,
complex, dimension( * )  X,
complex, dimension( * )  WORK,
real, dimension( * )  RWORK,
integer  NIN,
integer  NOUT,
integer  INFO 
)

CCKGLM

Purpose:
 CCKGLM tests CGGGLM - 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]NVAL
          NVAL is INTEGER array, dimension (NN)
          The values of the matrix row dimension N.
[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]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 COMPLEX array, dimension (NMAX*NMAX)
[out]AF
          AF is COMPLEX array, dimension (NMAX*NMAX)
[out]B
          B is COMPLEX array, dimension (NMAX*NMAX)
[out]BF
          BF is COMPLEX array, dimension (NMAX*NMAX)
[out]X
          X is COMPLEX array, dimension (4*NMAX)
[out]RWORK
          RWORK is REAL array, dimension (NMAX)
[out]WORK
          WORK is COMPLEX 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 CLATMS returns an error code, the absolute value
                 of it is returned.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 165 of file cckglm.f.

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