LAPACK  3.4.2
LAPACK: Linear Algebra PACKage
 All Files Functions Groups
derrrq.f
Go to the documentation of this file.
1 *> \brief \b DERRRQ
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 * Definition:
9 * ===========
10 *
11 * SUBROUTINE DERRRQ( PATH, NUNIT )
12 *
13 * .. Scalar Arguments ..
14 * CHARACTER*3 PATH
15 * INTEGER NUNIT
16 * ..
17 *
18 *
19 *> \par Purpose:
20 * =============
21 *>
22 *> \verbatim
23 *>
24 *> DERRRQ tests the error exits for the DOUBLE PRECISION routines
25 *> that use the RQ decomposition of a general matrix.
26 *> \endverbatim
27 *
28 * Arguments:
29 * ==========
30 *
31 *> \param[in] PATH
32 *> \verbatim
33 *> PATH is CHARACTER*3
34 *> The LAPACK path name for the routines to be tested.
35 *> \endverbatim
36 *>
37 *> \param[in] NUNIT
38 *> \verbatim
39 *> NUNIT is INTEGER
40 *> The unit number for output.
41 *> \endverbatim
42 *
43 * Authors:
44 * ========
45 *
46 *> \author Univ. of Tennessee
47 *> \author Univ. of California Berkeley
48 *> \author Univ. of Colorado Denver
49 *> \author NAG Ltd.
50 *
51 *> \date November 2011
52 *
53 *> \ingroup double_lin
54 *
55 * =====================================================================
56  SUBROUTINE derrrq( PATH, NUNIT )
57 *
58 * -- LAPACK test routine (version 3.4.0) --
59 * -- LAPACK is a software package provided by Univ. of Tennessee, --
60 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
61 * November 2011
62 *
63 * .. Scalar Arguments ..
64  CHARACTER*3 path
65  INTEGER nunit
66 * ..
67 *
68 * =====================================================================
69 *
70 * .. Parameters ..
71  INTEGER nmax
72  parameter( nmax = 2 )
73 * ..
74 * .. Local Scalars ..
75  INTEGER i, info, j
76 * ..
77 * .. Local Arrays ..
78  DOUBLE PRECISION a( nmax, nmax ), af( nmax, nmax ), b( nmax ),
79  $ w( nmax ), x( nmax )
80 * ..
81 * .. External Subroutines ..
82  EXTERNAL alaesm, chkxer, dgerq2, dgerqf, dgerqs, dorgr2,
83  $ dorgrq, dormr2, dormrq
84 * ..
85 * .. Scalars in Common ..
86  LOGICAL lerr, ok
87  CHARACTER*32 srnamt
88  INTEGER infot, nout
89 * ..
90 * .. Common blocks ..
91  common / infoc / infot, nout, ok, lerr
92  common / srnamc / srnamt
93 * ..
94 * .. Intrinsic Functions ..
95  INTRINSIC dble
96 * ..
97 * .. Executable Statements ..
98 *
99  nout = nunit
100  WRITE( nout, fmt = * )
101 *
102 * Set the variables to innocuous values.
103 *
104  DO 20 j = 1, nmax
105  DO 10 i = 1, nmax
106  a( i, j ) = 1.d0 / dble( i+j )
107  af( i, j ) = 1.d0 / dble( i+j )
108  10 continue
109  b( j ) = 0.d0
110  w( j ) = 0.d0
111  x( j ) = 0.d0
112  20 continue
113  ok = .true.
114 *
115 * Error exits for RQ factorization
116 *
117 * DGERQF
118 *
119  srnamt = 'DGERQF'
120  infot = 1
121  CALL dgerqf( -1, 0, a, 1, b, w, 1, info )
122  CALL chkxer( 'DGERQF', infot, nout, lerr, ok )
123  infot = 2
124  CALL dgerqf( 0, -1, a, 1, b, w, 1, info )
125  CALL chkxer( 'DGERQF', infot, nout, lerr, ok )
126  infot = 4
127  CALL dgerqf( 2, 1, a, 1, b, w, 2, info )
128  CALL chkxer( 'DGERQF', infot, nout, lerr, ok )
129  infot = 7
130  CALL dgerqf( 2, 1, a, 2, b, w, 1, info )
131  CALL chkxer( 'DGERQF', infot, nout, lerr, ok )
132 *
133 * DGERQ2
134 *
135  srnamt = 'DGERQ2'
136  infot = 1
137  CALL dgerq2( -1, 0, a, 1, b, w, info )
138  CALL chkxer( 'DGERQ2', infot, nout, lerr, ok )
139  infot = 2
140  CALL dgerq2( 0, -1, a, 1, b, w, info )
141  CALL chkxer( 'DGERQ2', infot, nout, lerr, ok )
142  infot = 4
143  CALL dgerq2( 2, 1, a, 1, b, w, info )
144  CALL chkxer( 'DGERQ2', infot, nout, lerr, ok )
145 *
146 * DGERQS
147 *
148  srnamt = 'DGERQS'
149  infot = 1
150  CALL dgerqs( -1, 0, 0, a, 1, x, b, 1, w, 1, info )
151  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
152  infot = 2
153  CALL dgerqs( 0, -1, 0, a, 1, x, b, 1, w, 1, info )
154  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
155  infot = 2
156  CALL dgerqs( 2, 1, 0, a, 2, x, b, 1, w, 1, info )
157  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
158  infot = 3
159  CALL dgerqs( 0, 0, -1, a, 1, x, b, 1, w, 1, info )
160  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
161  infot = 5
162  CALL dgerqs( 2, 2, 0, a, 1, x, b, 2, w, 1, info )
163  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
164  infot = 8
165  CALL dgerqs( 2, 2, 0, a, 2, x, b, 1, w, 1, info )
166  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
167  infot = 10
168  CALL dgerqs( 1, 1, 2, a, 1, x, b, 1, w, 1, info )
169  CALL chkxer( 'DGERQS', infot, nout, lerr, ok )
170 *
171 * DORGRQ
172 *
173  srnamt = 'DORGRQ'
174  infot = 1
175  CALL dorgrq( -1, 0, 0, a, 1, x, w, 1, info )
176  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
177  infot = 2
178  CALL dorgrq( 0, -1, 0, a, 1, x, w, 1, info )
179  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
180  infot = 2
181  CALL dorgrq( 2, 1, 0, a, 2, x, w, 2, info )
182  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
183  infot = 3
184  CALL dorgrq( 0, 0, -1, a, 1, x, w, 1, info )
185  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
186  infot = 3
187  CALL dorgrq( 1, 2, 2, a, 1, x, w, 1, info )
188  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
189  infot = 5
190  CALL dorgrq( 2, 2, 0, a, 1, x, w, 2, info )
191  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
192  infot = 8
193  CALL dorgrq( 2, 2, 0, a, 2, x, w, 1, info )
194  CALL chkxer( 'DORGRQ', infot, nout, lerr, ok )
195 *
196 * DORGR2
197 *
198  srnamt = 'DORGR2'
199  infot = 1
200  CALL dorgr2( -1, 0, 0, a, 1, x, w, info )
201  CALL chkxer( 'DORGR2', infot, nout, lerr, ok )
202  infot = 2
203  CALL dorgr2( 0, -1, 0, a, 1, x, w, info )
204  CALL chkxer( 'DORGR2', infot, nout, lerr, ok )
205  infot = 2
206  CALL dorgr2( 2, 1, 0, a, 2, x, w, info )
207  CALL chkxer( 'DORGR2', infot, nout, lerr, ok )
208  infot = 3
209  CALL dorgr2( 0, 0, -1, a, 1, x, w, info )
210  CALL chkxer( 'DORGR2', infot, nout, lerr, ok )
211  infot = 3
212  CALL dorgr2( 1, 2, 2, a, 2, x, w, info )
213  CALL chkxer( 'DORGR2', infot, nout, lerr, ok )
214  infot = 5
215  CALL dorgr2( 2, 2, 0, a, 1, x, w, info )
216  CALL chkxer( 'DORGR2', infot, nout, lerr, ok )
217 *
218 * DORMRQ
219 *
220  srnamt = 'DORMRQ'
221  infot = 1
222  CALL dormrq( '/', 'N', 0, 0, 0, a, 1, x, af, 1, w, 1, info )
223  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
224  infot = 2
225  CALL dormrq( 'L', '/', 0, 0, 0, a, 1, x, af, 1, w, 1, info )
226  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
227  infot = 3
228  CALL dormrq( 'L', 'N', -1, 0, 0, a, 1, x, af, 1, w, 1, info )
229  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
230  infot = 4
231  CALL dormrq( 'L', 'N', 0, -1, 0, a, 1, x, af, 1, w, 1, info )
232  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
233  infot = 5
234  CALL dormrq( 'L', 'N', 0, 0, -1, a, 1, x, af, 1, w, 1, info )
235  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
236  infot = 5
237  CALL dormrq( 'L', 'N', 0, 1, 1, a, 1, x, af, 1, w, 1, info )
238  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
239  infot = 5
240  CALL dormrq( 'R', 'N', 1, 0, 1, a, 1, x, af, 1, w, 1, info )
241  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
242  infot = 7
243  CALL dormrq( 'L', 'N', 2, 1, 2, a, 1, x, af, 2, w, 1, info )
244  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
245  infot = 7
246  CALL dormrq( 'R', 'N', 1, 2, 2, a, 1, x, af, 1, w, 1, info )
247  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
248  infot = 10
249  CALL dormrq( 'L', 'N', 2, 1, 0, a, 1, x, af, 1, w, 1, info )
250  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
251  infot = 12
252  CALL dormrq( 'L', 'N', 1, 2, 0, a, 1, x, af, 1, w, 1, info )
253  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
254  infot = 12
255  CALL dormrq( 'R', 'N', 2, 1, 0, a, 1, x, af, 2, w, 1, info )
256  CALL chkxer( 'DORMRQ', infot, nout, lerr, ok )
257 *
258 * DORMR2
259 *
260  srnamt = 'DORMR2'
261  infot = 1
262  CALL dormr2( '/', 'N', 0, 0, 0, a, 1, x, af, 1, w, info )
263  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
264  infot = 2
265  CALL dormr2( 'L', '/', 0, 0, 0, a, 1, x, af, 1, w, info )
266  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
267  infot = 3
268  CALL dormr2( 'L', 'N', -1, 0, 0, a, 1, x, af, 1, w, info )
269  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
270  infot = 4
271  CALL dormr2( 'L', 'N', 0, -1, 0, a, 1, x, af, 1, w, info )
272  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
273  infot = 5
274  CALL dormr2( 'L', 'N', 0, 0, -1, a, 1, x, af, 1, w, info )
275  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
276  infot = 5
277  CALL dormr2( 'L', 'N', 0, 1, 1, a, 1, x, af, 1, w, info )
278  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
279  infot = 5
280  CALL dormr2( 'R', 'N', 1, 0, 1, a, 1, x, af, 1, w, info )
281  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
282  infot = 7
283  CALL dormr2( 'L', 'N', 2, 1, 2, a, 1, x, af, 2, w, info )
284  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
285  infot = 7
286  CALL dormr2( 'R', 'N', 1, 2, 2, a, 1, x, af, 1, w, info )
287  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
288  infot = 10
289  CALL dormr2( 'L', 'N', 2, 1, 0, a, 1, x, af, 1, w, info )
290  CALL chkxer( 'DORMR2', infot, nout, lerr, ok )
291 *
292 * Print a summary line.
293 *
294  CALL alaesm( path, ok, nout )
295 *
296  return
297 *
298 * End of DERRRQ
299 *
300  END