55
56
57
58
59
60
61 CHARACTER*3 PATH
62 INTEGER NUNIT
63
64
65
66
67
68 INTEGER NMAX
69 parameter( nmax = 2 )
70
71
72 INTEGER I, INFO, J
73
74
75 DOUBLE PRECISION A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
76 $ W( NMAX ), X( NMAX )
77
78
81
82
83 LOGICAL LERR, OK
84 CHARACTER*32 SRNAMT
85 INTEGER INFOT, NOUT
86
87
88 COMMON / infoc / infot, nout, ok, lerr
89 COMMON / srnamc / srnamt
90
91
92 INTRINSIC dble
93
94
95
96 nout = nunit
97 WRITE( nout, fmt = * )
98
99
100
101 DO 20 j = 1, nmax
102 DO 10 i = 1, nmax
103 a( i, j ) = 1.d0 / dble( i+j )
104 af( i, j ) = 1.d0 / dble( i+j )
105 10 CONTINUE
106 b( j ) = 0.d0
107 w( j ) = 0.d0
108 x( j ) = 0.d0
109 20 CONTINUE
110 ok = .true.
111
112
113
114
115
116 srnamt = 'DGELQF'
117 infot = 1
118 CALL dgelqf( -1, 0, a, 1, b, w, 1, info )
119 CALL chkxer(
'DGELQF', infot, nout, lerr, ok )
120 infot = 2
121 CALL dgelqf( 0, -1, a, 1, b, w, 1, info )
122 CALL chkxer(
'DGELQF', infot, nout, lerr, ok )
123 infot = 4
124 CALL dgelqf( 2, 1, a, 1, b, w, 2, info )
125 CALL chkxer(
'DGELQF', infot, nout, lerr, ok )
126 infot = 7
127 CALL dgelqf( 2, 1, a, 2, b, w, 1, info )
128 CALL chkxer(
'DGELQF', infot, nout, lerr, ok )
129
130
131
132 srnamt = 'DGELQ2'
133 infot = 1
134 CALL dgelq2( -1, 0, a, 1, b, w, info )
135 CALL chkxer(
'DGELQ2', infot, nout, lerr, ok )
136 infot = 2
137 CALL dgelq2( 0, -1, a, 1, b, w, info )
138 CALL chkxer(
'DGELQ2', infot, nout, lerr, ok )
139 infot = 4
140 CALL dgelq2( 2, 1, a, 1, b, w, info )
141 CALL chkxer(
'DGELQ2', infot, nout, lerr, ok )
142
143
144
145 srnamt = 'DGELQS'
146 infot = 1
147 CALL dgelqs( -1, 0, 0, a, 1, x, b, 1, w, 1, info )
148 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
149 infot = 2
150 CALL dgelqs( 0, -1, 0, a, 1, x, b, 1, w, 1, info )
151 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
152 infot = 2
153 CALL dgelqs( 2, 1, 0, a, 2, x, b, 1, w, 1, info )
154 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
155 infot = 3
156 CALL dgelqs( 0, 0, -1, a, 1, x, b, 1, w, 1, info )
157 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
158 infot = 5
159 CALL dgelqs( 2, 2, 0, a, 1, x, b, 2, w, 1, info )
160 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
161 infot = 8
162 CALL dgelqs( 1, 2, 0, a, 1, x, b, 1, w, 1, info )
163 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
164 infot = 10
165 CALL dgelqs( 1, 1, 2, a, 1, x, b, 1, w, 1, info )
166 CALL chkxer(
'DGELQS', infot, nout, lerr, ok )
167
168
169
170 srnamt = 'DORGLQ'
171 infot = 1
172 CALL dorglq( -1, 0, 0, a, 1, x, w, 1, info )
173 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
174 infot = 2
175 CALL dorglq( 0, -1, 0, a, 1, x, w, 1, info )
176 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
177 infot = 2
178 CALL dorglq( 2, 1, 0, a, 2, x, w, 2, info )
179 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
180 infot = 3
181 CALL dorglq( 0, 0, -1, a, 1, x, w, 1, info )
182 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
183 infot = 3
184 CALL dorglq( 1, 1, 2, a, 1, x, w, 1, info )
185 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
186 infot = 5
187 CALL dorglq( 2, 2, 0, a, 1, x, w, 2, info )
188 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
189 infot = 8
190 CALL dorglq( 2, 2, 0, a, 2, x, w, 1, info )
191 CALL chkxer(
'DORGLQ', infot, nout, lerr, ok )
192
193
194
195 srnamt = 'DORGL2'
196 infot = 1
197 CALL dorgl2( -1, 0, 0, a, 1, x, w, info )
198 CALL chkxer(
'DORGL2', infot, nout, lerr, ok )
199 infot = 2
200 CALL dorgl2( 0, -1, 0, a, 1, x, w, info )
201 CALL chkxer(
'DORGL2', infot, nout, lerr, ok )
202 infot = 2
203 CALL dorgl2( 2, 1, 0, a, 2, x, w, info )
204 CALL chkxer(
'DORGL2', infot, nout, lerr, ok )
205 infot = 3
206 CALL dorgl2( 0, 0, -1, a, 1, x, w, info )
207 CALL chkxer(
'DORGL2', infot, nout, lerr, ok )
208 infot = 3
209 CALL dorgl2( 1, 1, 2, a, 1, x, w, info )
210 CALL chkxer(
'DORGL2', infot, nout, lerr, ok )
211 infot = 5
212 CALL dorgl2( 2, 2, 0, a, 1, x, w, info )
213 CALL chkxer(
'DORGL2', infot, nout, lerr, ok )
214
215
216
217 srnamt = 'DORMLQ'
218 infot = 1
219 CALL dormlq(
'/',
'N', 0, 0, 0, a, 1, x, af, 1, w, 1, info )
220 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
221 infot = 2
222 CALL dormlq(
'L',
'/', 0, 0, 0, a, 1, x, af, 1, w, 1, info )
223 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
224 infot = 3
225 CALL dormlq(
'L',
'N', -1, 0, 0, a, 1, x, af, 1, w, 1, info )
226 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
227 infot = 4
228 CALL dormlq(
'L',
'N', 0, -1, 0, a, 1, x, af, 1, w, 1, info )
229 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
230 infot = 5
231 CALL dormlq(
'L',
'N', 0, 0, -1, a, 1, x, af, 1, w, 1, info )
232 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
233 infot = 5
234 CALL dormlq(
'L',
'N', 0, 1, 1, a, 1, x, af, 1, w, 1, info )
235 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
236 infot = 5
237 CALL dormlq(
'R',
'N', 1, 0, 1, a, 1, x, af, 1, w, 1, info )
238 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
239 infot = 7
240 CALL dormlq(
'L',
'N', 2, 0, 2, a, 1, x, af, 2, w, 1, info )
241 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
242 infot = 7
243 CALL dormlq(
'R',
'N', 0, 2, 2, a, 1, x, af, 1, w, 1, info )
244 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
245 infot = 10
246 CALL dormlq(
'L',
'N', 2, 1, 0, a, 2, x, af, 1, w, 1, info )
247 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
248 infot = 12
249 CALL dormlq(
'L',
'N', 1, 2, 0, a, 1, x, af, 1, w, 1, info )
250 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
251 infot = 12
252 CALL dormlq(
'R',
'N', 2, 1, 0, a, 1, x, af, 2, w, 1, info )
253 CALL chkxer(
'DORMLQ', infot, nout, lerr, ok )
254
255
256
257 srnamt = 'DORML2'
258 infot = 1
259 CALL dorml2(
'/',
'N', 0, 0, 0, a, 1, x, af, 1, w, info )
260 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
261 infot = 2
262 CALL dorml2(
'L',
'/', 0, 0, 0, a, 1, x, af, 1, w, info )
263 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
264 infot = 3
265 CALL dorml2(
'L',
'N', -1, 0, 0, a, 1, x, af, 1, w, info )
266 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
267 infot = 4
268 CALL dorml2(
'L',
'N', 0, -1, 0, a, 1, x, af, 1, w, info )
269 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
270 infot = 5
271 CALL dorml2(
'L',
'N', 0, 0, -1, a, 1, x, af, 1, w, info )
272 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
273 infot = 5
274 CALL dorml2(
'L',
'N', 0, 1, 1, a, 1, x, af, 1, w, info )
275 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
276 infot = 5
277 CALL dorml2(
'R',
'N', 1, 0, 1, a, 1, x, af, 1, w, info )
278 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
279 infot = 7
280 CALL dorml2(
'L',
'N', 2, 1, 2, a, 1, x, af, 2, w, info )
281 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
282 infot = 7
283 CALL dorml2(
'R',
'N', 1, 2, 2, a, 1, x, af, 1, w, info )
284 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
285 infot = 10
286 CALL dorml2(
'L',
'N', 2, 1, 0, a, 2, x, af, 1, w, info )
287 CALL chkxer(
'DORML2', infot, nout, lerr, ok )
288
289
290
291 CALL alaesm( path, ok, nout )
292
293 RETURN
294
295
296
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
subroutine alaesm(PATH, OK, NOUT)
ALAESM
subroutine dgelqs(M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK, INFO)
DGELQS
subroutine dgelq2(M, N, A, LDA, TAU, WORK, INFO)
DGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine dgelqf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
DGELQF
subroutine dorglq(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
DORGLQ
subroutine dormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
DORMLQ
subroutine dorgl2(M, N, K, A, LDA, TAU, WORK, INFO)
DORGL2
subroutine dorml2(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO)
DORML2 multiplies a general matrix by the orthogonal matrix from a LQ factorization determined by sge...