3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * SUBROUTINE ZCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
12 * THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
13 * BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
15 * .. Scalar Arguments ..
16 * INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
17 * DOUBLE PRECISION THRESH
19 * .. Array Arguments ..
20 * INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
21 * DOUBLE PRECISION RWORK( * )
22 * COMPLEX*16 A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
23 * $ BF( * ), BT( * ), BWK( * ), BZ( * ), TAUA( * ),
24 * $ TAUB( * ), WORK( * )
34 *> ZGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
35 *> ZGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
44 *> The number of values of M contained in the vector MVAL.
49 *> MVAL is INTEGER array, dimension (NM)
50 *> The values of the matrix row(column) dimension M.
56 *> The number of values of P contained in the vector PVAL.
61 *> PVAL is INTEGER array, dimension (NP)
62 *> The values of the matrix row(column) dimension P.
68 *> The number of values of N contained in the vector NVAL.
73 *> NVAL is INTEGER array, dimension (NN)
74 *> The values of the matrix column(row) dimension N.
80 *> The number of matrix types to be tested for each combination
81 *> of matrix dimensions. If NMATS >= NTYPES (the maximum
82 *> number of matrix types), then all the different types are
83 *> generated for testing. If NMATS < NTYPES, another input line
84 *> is read to get the numbers of the matrix types to be used.
87 *> \param[in,out] ISEED
89 *> ISEED is INTEGER array, dimension (4)
90 *> On entry, the seed of the random number generator. The array
91 *> elements should be between 0 and 4095, otherwise they will be
92 *> reduced mod 4096, and ISEED(4) must be odd.
93 *> On exit, the next seed in the random number sequence after
94 *> all the test matrices have been generated.
99 *> THRESH is DOUBLE PRECISION
100 *> The threshold value for the test ratios. A result is
101 *> included in the output file if RESULT >= THRESH. To have
102 *> every test ratio printed, use THRESH = 0.
108 *> The maximum value permitted for M or N, used in dimensioning
114 *> A is COMPLEX*16 array, dimension (NMAX*NMAX)
119 *> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
124 *> AQ is COMPLEX*16 array, dimension (NMAX*NMAX)
129 *> AR is COMPLEX*16 array, dimension (NMAX*NMAX)
134 *> TAUA is COMPLEX*16 array, dimension (NMAX)
139 *> B is COMPLEX*16 array, dimension (NMAX*NMAX)
144 *> BF is COMPLEX*16 array, dimension (NMAX*NMAX)
149 *> BZ is COMPLEX*16 array, dimension (NMAX*NMAX)
154 *> BT is COMPLEX*16 array, dimension (NMAX*NMAX)
159 *> BWK is COMPLEX*16 array, dimension (NMAX*NMAX)
164 *> TAUB is COMPLEX*16 array, dimension (NMAX)
169 *> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
174 *> RWORK is DOUBLE PRECISION array, dimension (NMAX)
180 *> The unit number for input.
186 *> The unit number for output.
192 *> = 0 : successful exit
193 *> > 0 : If ZLATMS returns an error code, the absolute value
194 *> of it is returned.
200 *> \author Univ. of Tennessee
201 *> \author Univ. of California Berkeley
202 *> \author Univ. of Colorado Denver
205 *> \date November 2011
207 *> \ingroup complex16_eig
209 * =====================================================================
210 SUBROUTINE ZCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
211 $ THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
212 $ BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
214 * -- LAPACK test routine (version 3.4.0) --
215 * -- LAPACK is a software package provided by Univ. of Tennessee, --
216 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
219 * .. Scalar Arguments ..
220 INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
221 DOUBLE PRECISION THRESH
223 * .. Array Arguments ..
224 INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
225 DOUBLE PRECISION RWORK( * )
226 COMPLEX*16 A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
227 $ BF( * ), BT( * ), BWK( * ), BZ( * ), TAUA( * ),
228 $ TAUB( * ), WORK( * )
231 * =====================================================================
235 PARAMETER ( NTESTS = 7 )
237 PARAMETER ( NTYPES = 8 )
239 * .. Local Scalars ..
241 CHARACTER DISTA, DISTB, TYPE
243 INTEGER I, IINFO, IM, IMAT, IN, IP, KLA, KLB, KUA, KUB,
244 $ LDA, LDB, LWORK, M, MODEA, MODEB, N, NFAIL,
246 DOUBLE PRECISION ANORM, BNORM, CNDNMA, CNDNMB
249 LOGICAL DOTYPE( NTYPES )
250 DOUBLE PRECISION RESULT( NTESTS )
252 * .. External Subroutines ..
253 EXTERNAL ALAHDG, ALAREQ, ALASUM, DLATB9, ZGQRTS, ZGRQTS,
256 * .. Intrinsic Functions ..
259 * .. Executable Statements ..
261 * Initialize constants.
268 CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
273 * Do for each value of M in MVAL.
278 * Do for each value of P in PVAL.
283 * Do for each value of N in NVAL.
288 DO 30 IMAT = 1, NTYPES
290 * Do the tests only if DOTYPE( IMAT ) is true.
292 IF( .NOT.DOTYPE( IMAT ) )
297 * Set up parameters with DLATB9 and generate test
298 * matrices A and B with ZLATMS.
300 CALL DLATB9( 'GRQ', IMAT, M, P, N, TYPE, KLA, KUA,
301 $ KLB, KUB, ANORM, BNORM, MODEA, MODEB,
302 $ CNDNMA, CNDNMB, DISTA, DISTB )
304 CALL ZLATMS( M, N, DISTA, ISEED, TYPE, RWORK, MODEA,
305 $ CNDNMA, ANORM, KLA, KUA, 'No packing', A,
307 IF( IINFO.NE.0 ) THEN
308 WRITE( NOUT, FMT = 9999 )IINFO
313 CALL ZLATMS( P, N, DISTB, ISEED, TYPE, RWORK, MODEB,
314 $ CNDNMB, BNORM, KLB, KUB, 'No packing', B,
316 IF( IINFO.NE.0 ) THEN
317 WRITE( NOUT, FMT = 9999 )IINFO
324 CALL ZGRQTS( M, P, N, A, AF, AQ, AR, LDA, TAUA, B, BF,
325 $ BZ, BT, BWK, LDB, TAUB, WORK, LWORK,
328 * Print information about the tests that did not
329 * pass the threshold.
332 IF( RESULT( I ).GE.THRESH ) THEN
333 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
335 CALL ALAHDG( NOUT, 'GRQ' )
337 WRITE( NOUT, FMT = 9998 )M, P, N, IMAT, I,
346 * Set up parameters with DLATB9 and generate test
347 * matrices A and B with ZLATMS.
349 CALL DLATB9( 'GQR', IMAT, M, P, N, TYPE, KLA, KUA,
350 $ KLB, KUB, ANORM, BNORM, MODEA, MODEB,
351 $ CNDNMA, CNDNMB, DISTA, DISTB )
353 CALL ZLATMS( N, M, DISTA, ISEED, TYPE, RWORK, MODEA,
354 $ CNDNMA, ANORM, KLA, KUA, 'No packing', A,
356 IF( IINFO.NE.0 ) THEN
357 WRITE( NOUT, FMT = 9999 )IINFO
362 CALL ZLATMS( N, P, DISTB, ISEED, TYPE, RWORK, MODEA,
363 $ CNDNMA, BNORM, KLB, KUB, 'No packing', B,
365 IF( IINFO.NE.0 ) THEN
366 WRITE( NOUT, FMT = 9999 )IINFO
373 CALL ZGQRTS( N, M, P, A, AF, AQ, AR, LDA, TAUA, B, BF,
374 $ BZ, BT, BWK, LDB, TAUB, WORK, LWORK,
377 * Print information about the tests that did not
378 * pass the threshold.
381 IF( RESULT( I ).GE.THRESH ) THEN
382 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
384 CALL ALAHDG( NOUT, PATH )
386 WRITE( NOUT, FMT = 9997 )N, M, P, IMAT, I,
398 * Print a summary of the results.
400 CALL ALASUM( PATH, NOUT, NFAIL, NRUN, 0 )
402 9999 FORMAT( ' ZLATMS in ZCKGQR: INFO = ', I5 )
403 9998 FORMAT( ' M=', I4, ' P=', I4, ', N=', I4, ', type ', I2,
404 $ ', test ', I2, ', ratio=', G13.6 )
405 9997 FORMAT( ' N=', I4, ' M=', I4, ', P=', I4, ', type ', I2,
406 $ ', test ', I2, ', ratio=', G13.6 )