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 COMPLEX*16 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, dcmplx
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 ) = dcmplx( 1.d0 / dble( i+j ),
104 $ -1.d0 / dble( i+j ) )
105 af( i, j ) = dcmplx( 1.d0 / dble( i+j ),
106 $ -1.d0 / dble( i+j ) )
107 10 CONTINUE
108 b( j ) = 0.d0
109 w( j ) = 0.d0
110 x( j ) = 0.d0
111 20 CONTINUE
112 ok = .true.
113
114
115
116
117
118 srnamt = 'ZGELQF'
119 infot = 1
120 CALL zgelqf( -1, 0, a, 1, b, w, 1, info )
121 CALL chkxer(
'ZGELQF', infot, nout, lerr, ok )
122 infot = 2
123 CALL zgelqf( 0, -1, a, 1, b, w, 1, info )
124 CALL chkxer(
'ZGELQF', infot, nout, lerr, ok )
125 infot = 4
126 CALL zgelqf( 2, 1, a, 1, b, w, 2, info )
127 CALL chkxer(
'ZGELQF', infot, nout, lerr, ok )
128 infot = 7
129 CALL zgelqf( 2, 1, a, 2, b, w, 1, info )
130 CALL chkxer(
'ZGELQF', infot, nout, lerr, ok )
131
132
133
134 srnamt = 'ZGELQ2'
135 infot = 1
136 CALL zgelq2( -1, 0, a, 1, b, w, info )
137 CALL chkxer(
'ZGELQ2', infot, nout, lerr, ok )
138 infot = 2
139 CALL zgelq2( 0, -1, a, 1, b, w, info )
140 CALL chkxer(
'ZGELQ2', infot, nout, lerr, ok )
141 infot = 4
142 CALL zgelq2( 2, 1, a, 1, b, w, info )
143 CALL chkxer(
'ZGELQ2', infot, nout, lerr, ok )
144
145
146
147 srnamt = 'ZUNGLQ'
148 infot = 1
149 CALL zunglq( -1, 0, 0, a, 1, x, w, 1, info )
150 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
151 infot = 2
152 CALL zunglq( 0, -1, 0, a, 1, x, w, 1, info )
153 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
154 infot = 2
155 CALL zunglq( 2, 1, 0, a, 2, x, w, 2, info )
156 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
157 infot = 3
158 CALL zunglq( 0, 0, -1, a, 1, x, w, 1, info )
159 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
160 infot = 3
161 CALL zunglq( 1, 1, 2, a, 1, x, w, 1, info )
162 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
163 infot = 5
164 CALL zunglq( 2, 2, 0, a, 1, x, w, 2, info )
165 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
166 infot = 8
167 CALL zunglq( 2, 2, 0, a, 2, x, w, 1, info )
168 CALL chkxer(
'ZUNGLQ', infot, nout, lerr, ok )
169
170
171
172 srnamt = 'ZUNGL2'
173 infot = 1
174 CALL zungl2( -1, 0, 0, a, 1, x, w, info )
175 CALL chkxer(
'ZUNGL2', infot, nout, lerr, ok )
176 infot = 2
177 CALL zungl2( 0, -1, 0, a, 1, x, w, info )
178 CALL chkxer(
'ZUNGL2', infot, nout, lerr, ok )
179 infot = 2
180 CALL zungl2( 2, 1, 0, a, 2, x, w, info )
181 CALL chkxer(
'ZUNGL2', infot, nout, lerr, ok )
182 infot = 3
183 CALL zungl2( 0, 0, -1, a, 1, x, w, info )
184 CALL chkxer(
'ZUNGL2', infot, nout, lerr, ok )
185 infot = 3
186 CALL zungl2( 1, 1, 2, a, 1, x, w, info )
187 CALL chkxer(
'ZUNGL2', infot, nout, lerr, ok )
188 infot = 5
189 CALL zungl2( 2, 2, 0, a, 1, x, w, info )
190 CALL chkxer(
'ZUNGL2', infot, nout, lerr, ok )
191
192
193
194 srnamt = 'ZUNMLQ'
195 infot = 1
196 CALL zunmlq(
'/',
'N', 0, 0, 0, a, 1, x, af, 1, w, 1, info )
197 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
198 infot = 2
199 CALL zunmlq(
'L',
'/', 0, 0, 0, a, 1, x, af, 1, w, 1, info )
200 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
201 infot = 3
202 CALL zunmlq(
'L',
'N', -1, 0, 0, a, 1, x, af, 1, w, 1, info )
203 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
204 infot = 4
205 CALL zunmlq(
'L',
'N', 0, -1, 0, a, 1, x, af, 1, w, 1, info )
206 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
207 infot = 5
208 CALL zunmlq(
'L',
'N', 0, 0, -1, a, 1, x, af, 1, w, 1, info )
209 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
210 infot = 5
211 CALL zunmlq(
'L',
'N', 0, 1, 1, a, 1, x, af, 1, w, 1, info )
212 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
213 infot = 5
214 CALL zunmlq(
'R',
'N', 1, 0, 1, a, 1, x, af, 1, w, 1, info )
215 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
216 infot = 7
217 CALL zunmlq(
'L',
'N', 2, 0, 2, a, 1, x, af, 2, w, 1, info )
218 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
219 infot = 7
220 CALL zunmlq(
'R',
'N', 0, 2, 2, a, 1, x, af, 1, w, 1, info )
221 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
222 infot = 10
223 CALL zunmlq(
'L',
'N', 2, 1, 0, a, 2, x, af, 1, w, 1, info )
224 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
225 infot = 12
226 CALL zunmlq(
'L',
'N', 1, 2, 0, a, 1, x, af, 1, w, 1, info )
227 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
228 infot = 12
229 CALL zunmlq(
'R',
'N', 2, 1, 0, a, 1, x, af, 2, w, 1, info )
230 CALL chkxer(
'ZUNMLQ', infot, nout, lerr, ok )
231
232
233
234 srnamt = 'ZUNML2'
235 infot = 1
236 CALL zunml2(
'/',
'N', 0, 0, 0, a, 1, x, af, 1, w, info )
237 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
238 infot = 2
239 CALL zunml2(
'L',
'/', 0, 0, 0, a, 1, x, af, 1, w, info )
240 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
241 infot = 3
242 CALL zunml2(
'L',
'N', -1, 0, 0, a, 1, x, af, 1, w, info )
243 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
244 infot = 4
245 CALL zunml2(
'L',
'N', 0, -1, 0, a, 1, x, af, 1, w, info )
246 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
247 infot = 5
248 CALL zunml2(
'L',
'N', 0, 0, -1, a, 1, x, af, 1, w, info )
249 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
250 infot = 5
251 CALL zunml2(
'L',
'N', 0, 1, 1, a, 1, x, af, 1, w, info )
252 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
253 infot = 5
254 CALL zunml2(
'R',
'N', 1, 0, 1, a, 1, x, af, 1, w, info )
255 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
256 infot = 7
257 CALL zunml2(
'L',
'N', 2, 1, 2, a, 1, x, af, 2, w, info )
258 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
259 infot = 7
260 CALL zunml2(
'R',
'N', 1, 2, 2, a, 1, x, af, 1, w, info )
261 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
262 infot = 10
263 CALL zunml2(
'L',
'N', 2, 1, 0, a, 2, x, af, 1, w, info )
264 CALL chkxer(
'ZUNML2', infot, nout, lerr, ok )
265
266
267
268 CALL alaesm( path, ok, nout )
269
270 RETURN
271
272
273
subroutine alaesm(path, ok, nout)
ALAESM
subroutine chkxer(srnamt, infot, nout, lerr, ok)
subroutine zgelq2(m, n, a, lda, tau, work, info)
ZGELQ2 computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine zgelqf(m, n, a, lda, tau, work, lwork, info)
ZGELQF
subroutine zungl2(m, n, k, a, lda, tau, work, info)
ZUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (u...
subroutine zunglq(m, n, k, a, lda, tau, work, lwork, info)
ZUNGLQ
subroutine zunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
ZUNML2 multiplies a general matrix by the unitary matrix from a LQ factorization determined by cgelqf...
subroutine zunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMLQ