LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ dckgqr()

subroutine dckgqr ( integer  NM,
integer, dimension( * )  MVAL,
integer  NP,
integer, dimension( * )  PVAL,
integer  NN,
integer, dimension( * )  NVAL,
integer  NMATS,
integer, dimension( 4 )  ISEED,
double precision  THRESH,
integer  NMAX,
double precision, dimension( * )  A,
double precision, dimension( * )  AF,
double precision, dimension( * )  AQ,
double precision, dimension( * )  AR,
double precision, dimension( * )  TAUA,
double precision, dimension( * )  B,
double precision, dimension( * )  BF,
double precision, dimension( * )  BZ,
double precision, dimension( * )  BT,
double precision, dimension( * )  BWK,
double precision, dimension( * )  TAUB,
double precision, dimension( * )  WORK,
double precision, dimension( * )  RWORK,
integer  NIN,
integer  NOUT,
integer  INFO 
)

DCKGQR

Purpose:
 DCKGQR tests
 DGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
 DGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
Parameters
[in]NM
          NM is INTEGER
          The number of values of M contained in the vector MVAL.
[in]MVAL
          MVAL is INTEGER array, dimension (NM)
          The values of the matrix row(column) dimension M.
[in]NP
          NP is INTEGER
          The number of values of P contained in the vector PVAL.
[in]PVAL
          PVAL is INTEGER array, dimension (NP)
          The values of the matrix row(column) dimension P.
[in]NN
          NN is INTEGER
          The number of values of N contained in the vector NVAL.
[in]NVAL
          NVAL is INTEGER array, dimension (NN)
          The values of the matrix column(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 DOUBLE PRECISION
          The threshold value for the test ratios.  A result is
          included in the output file if RESULT >= 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 DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]AF
          AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]AQ
          AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]AR
          AR is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]TAUA
          TAUA is DOUBLE PRECISION array, dimension (NMAX)
[out]B
          B is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]BF
          BF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]BZ
          BZ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]BT
          BT is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]BWK
          BWK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]TAUB
          TAUB is DOUBLE PRECISION array, dimension (NMAX)
[out]WORK
          WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
[out]RWORK
          RWORK is DOUBLE PRECISION array, dimension (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 DLATMS 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.
Date
December 2016

Definition at line 212 of file dckgqr.f.

212 *
213 * -- LAPACK test routine (version 3.7.0) --
214 * -- LAPACK is a software package provided by Univ. of Tennessee, --
215 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
216 * December 2016
217 *
218 * .. Scalar Arguments ..
219  INTEGER info, nin, nm, nmats, nmax, nn, nout, np
220  DOUBLE PRECISION thresh
221 * ..
222 * .. Array Arguments ..
223  INTEGER iseed( 4 ), mval( * ), nval( * ), pval( * )
224  DOUBLE PRECISION a( * ), af( * ), aq( * ), ar( * ), b( * ),
225  $ bf( * ), bt( * ), bwk( * ), bz( * ),
226  $ rwork( * ), taua( * ), taub( * ), work( * )
227 * ..
228 *
229 * =====================================================================
230 *
231 * .. Parameters ..
232  INTEGER ntests
233  parameter( ntests = 7 )
234  INTEGER ntypes
235  parameter( ntypes = 8 )
236 * ..
237 * .. Local Scalars ..
238  LOGICAL firstt
239  CHARACTER dista, distb, type
240  CHARACTER*3 path
241  INTEGER i, iinfo, im, imat, in, ip, kla, klb, kua, kub,
242  $ lda, ldb, lwork, m, modea, modeb, n, nfail,
243  $ nrun, nt, p
244  DOUBLE PRECISION anorm, bnorm, cndnma, cndnmb
245 * ..
246 * .. Local Arrays ..
247  LOGICAL dotype( ntypes )
248  DOUBLE PRECISION result( ntests )
249 * ..
250 * .. External Subroutines ..
251  EXTERNAL alahdg, alareq, alasum, dgqrts, dgrqts, dlatb9,
252  $ dlatms
253 * ..
254 * .. Intrinsic Functions ..
255  INTRINSIC abs
256 * ..
257 * .. Executable Statements ..
258 *
259 * Initialize constants.
260 *
261  path( 1: 3 ) = 'GQR'
262  info = 0
263  nrun = 0
264  nfail = 0
265  firstt = .true.
266  CALL alareq( path, nmats, dotype, ntypes, nin, nout )
267  lda = nmax
268  ldb = nmax
269  lwork = nmax*nmax
270 *
271 * Do for each value of M in MVAL.
272 *
273  DO 60 im = 1, nm
274  m = mval( im )
275 *
276 * Do for each value of P in PVAL.
277 *
278  DO 50 ip = 1, np
279  p = pval( ip )
280 *
281 * Do for each value of N in NVAL.
282 *
283  DO 40 in = 1, nn
284  n = nval( in )
285 *
286  DO 30 imat = 1, ntypes
287 *
288 * Do the tests only if DOTYPE( IMAT ) is true.
289 *
290  IF( .NOT.dotype( imat ) )
291  $ GO TO 30
292 *
293 * Test DGGRQF
294 *
295 * Set up parameters with DLATB9 and generate test
296 * matrices A and B with DLATMS.
297 *
298  CALL dlatb9( 'GRQ', imat, m, p, n, TYPE, kla, kua,
299  $ klb, kub, anorm, bnorm, modea, modeb,
300  $ cndnma, cndnmb, dista, distb )
301 *
302 * Generate M by N matrix A
303 *
304  CALL dlatms( m, n, dista, iseed, TYPE, rwork, modea,
305  $ cndnma, anorm, kla, kua, 'No packing', a,
306  $ lda, work, iinfo )
307  IF( iinfo.NE.0 ) THEN
308  WRITE( nout, fmt = 9999 )iinfo
309  info = abs( iinfo )
310  GO TO 30
311  END IF
312 *
313 * Generate P by N matrix B
314 *
315  CALL dlatms( p, n, distb, iseed, TYPE, rwork, modeb,
316  $ cndnmb, bnorm, klb, kub, 'No packing', b,
317  $ ldb, work, iinfo )
318  IF( iinfo.NE.0 ) THEN
319  WRITE( nout, fmt = 9999 )iinfo
320  info = abs( iinfo )
321  GO TO 30
322  END IF
323 *
324  nt = 4
325 *
326  CALL dgrqts( m, p, n, a, af, aq, ar, lda, taua, b, bf,
327  $ bz, bt, bwk, ldb, taub, work, lwork,
328  $ rwork, result )
329 *
330 * Print information about the tests that did not
331 * pass the threshold.
332 *
333  DO 10 i = 1, nt
334  IF( result( i ).GE.thresh ) THEN
335  IF( nfail.EQ.0 .AND. firstt ) THEN
336  firstt = .false.
337  CALL alahdg( nout, 'GRQ' )
338  END IF
339  WRITE( nout, fmt = 9998 )m, p, n, imat, i,
340  $ result( i )
341  nfail = nfail + 1
342  END IF
343  10 CONTINUE
344  nrun = nrun + nt
345 *
346 * Test DGGQRF
347 *
348 * Set up parameters with DLATB9 and generate test
349 * matrices A and B with DLATMS.
350 *
351  CALL dlatb9( 'GQR', imat, m, p, n, TYPE, kla, kua,
352  $ klb, kub, anorm, bnorm, modea, modeb,
353  $ cndnma, cndnmb, dista, distb )
354 *
355 * Generate N-by-M matrix A
356 *
357  CALL dlatms( n, m, dista, iseed, TYPE, rwork, modea,
358  $ cndnma, anorm, kla, kua, 'No packing', a,
359  $ lda, work, iinfo )
360  IF( iinfo.NE.0 ) THEN
361  WRITE( nout, fmt = 9999 )iinfo
362  info = abs( iinfo )
363  GO TO 30
364  END IF
365 *
366 * Generate N-by-P matrix B
367 *
368  CALL dlatms( n, p, distb, iseed, TYPE, rwork, modea,
369  $ cndnma, bnorm, klb, kub, 'No packing', b,
370  $ ldb, work, iinfo )
371  IF( iinfo.NE.0 ) THEN
372  WRITE( nout, fmt = 9999 )iinfo
373  info = abs( iinfo )
374  GO TO 30
375  END IF
376 *
377  nt = 4
378 *
379  CALL dgqrts( n, m, p, a, af, aq, ar, lda, taua, b, bf,
380  $ bz, bt, bwk, ldb, taub, work, lwork,
381  $ rwork, result )
382 *
383 * Print information about the tests that did not
384 * pass the threshold.
385 *
386  DO 20 i = 1, nt
387  IF( result( i ).GE.thresh ) THEN
388  IF( nfail.EQ.0 .AND. firstt ) THEN
389  firstt = .false.
390  CALL alahdg( nout, path )
391  END IF
392  WRITE( nout, fmt = 9997 )n, m, p, imat, i,
393  $ result( i )
394  nfail = nfail + 1
395  END IF
396  20 CONTINUE
397  nrun = nrun + nt
398 *
399  30 CONTINUE
400  40 CONTINUE
401  50 CONTINUE
402  60 CONTINUE
403 *
404 * Print a summary of the results.
405 *
406  CALL alasum( path, nout, nfail, nrun, 0 )
407 *
408  9999 FORMAT( ' DLATMS in DCKGQR: INFO = ', i5 )
409  9998 FORMAT( ' M=', i4, ' P=', i4, ', N=', i4, ', type ', i2,
410  $ ', test ', i2, ', ratio=', g13.6 )
411  9997 FORMAT( ' N=', i4, ' M=', i4, ', P=', i4, ', type ', i2,
412  $ ', test ', i2, ', ratio=', g13.6 )
413  RETURN
414 *
415 * End of DCKGQR
416 *
subroutine dlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
DLATMS
Definition: dlatms.f:323
subroutine alareq(PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT)
ALAREQ
Definition: alareq.f:92
subroutine dlatb9(PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB, ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB, DISTA, DISTB)
DLATB9
Definition: dlatb9.f:172
subroutine dgrqts(M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T, BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT)
DGRQTS
Definition: dgrqts.f:178
subroutine dgqrts(N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T, BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT)
DGQRTS
Definition: dgqrts.f:178
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: