LAPACK  3.4.2
LAPACK: Linear Algebra PACKage
 All Files Functions Groups
zerrls.f
Go to the documentation of this file.
1 *> \brief \b ZERRLS
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 ZERRLS( 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 *> ZERRLS tests the error exits for the COMPLEX*16 least squares
25 *> driver routines (ZGELS, CGELSS, CGELSX, CGELSY, CGELSD).
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 complex16_lin
54 *
55 * =====================================================================
56  SUBROUTINE zerrls( 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  CHARACTER*2 c2
76  INTEGER info, irnk
77  DOUBLE PRECISION rcond
78 * ..
79 * .. Local Arrays ..
80  INTEGER ip( nmax )
81  DOUBLE PRECISION rw( nmax ), s( nmax )
82  COMPLEX*16 a( nmax, nmax ), b( nmax, nmax ), w( nmax )
83 * ..
84 * .. External Functions ..
85  LOGICAL lsamen
86  EXTERNAL lsamen
87 * ..
88 * .. External Subroutines ..
89  EXTERNAL alaesm, chkxer, zgels, zgelsd, zgelss, zgelsx,
90  $ zgelsy
91 * ..
92 * .. Scalars in Common ..
93  LOGICAL lerr, ok
94  CHARACTER*32 srnamt
95  INTEGER infot, nout
96 * ..
97 * .. Common blocks ..
98  common / infoc / infot, nout, ok, lerr
99  common / srnamc / srnamt
100 * ..
101 * .. Executable Statements ..
102 *
103  nout = nunit
104  c2 = path( 2: 3 )
105  a( 1, 1 ) = ( 1.0d+0, 0.0d+0 )
106  a( 1, 2 ) = ( 2.0d+0, 0.0d+0 )
107  a( 2, 2 ) = ( 3.0d+0, 0.0d+0 )
108  a( 2, 1 ) = ( 4.0d+0, 0.0d+0 )
109  ok = .true.
110  WRITE( nout, fmt = * )
111 *
112 * Test error exits for the least squares driver routines.
113 *
114  IF( lsamen( 2, c2, 'LS' ) ) THEN
115 *
116 * ZGELS
117 *
118  srnamt = 'ZGELS '
119  infot = 1
120  CALL zgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
121  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
122  infot = 2
123  CALL zgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
124  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
125  infot = 3
126  CALL zgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
127  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
128  infot = 4
129  CALL zgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
130  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
131  infot = 6
132  CALL zgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
133  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
134  infot = 8
135  CALL zgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
136  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
137  infot = 10
138  CALL zgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
139  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
140 *
141 * ZGELSS
142 *
143  srnamt = 'ZGELSS'
144  infot = 1
145  CALL zgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
146  $ info )
147  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
148  infot = 2
149  CALL zgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
150  $ info )
151  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
152  infot = 3
153  CALL zgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
154  $ info )
155  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
156  infot = 5
157  CALL zgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, rw,
158  $ info )
159  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
160  infot = 7
161  CALL zgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, rw,
162  $ info )
163  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
164 *
165 * ZGELSX
166 *
167  srnamt = 'ZGELSX'
168  infot = 1
169  CALL zgelsx( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, rw,
170  $ info )
171  CALL chkxer( 'ZGELSX', infot, nout, lerr, ok )
172  infot = 2
173  CALL zgelsx( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, rw,
174  $ info )
175  CALL chkxer( 'ZGELSX', infot, nout, lerr, ok )
176  infot = 3
177  CALL zgelsx( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, rw,
178  $ info )
179  CALL chkxer( 'ZGELSX', infot, nout, lerr, ok )
180  infot = 5
181  CALL zgelsx( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, rw,
182  $ info )
183  CALL chkxer( 'ZGELSX', infot, nout, lerr, ok )
184  infot = 7
185  CALL zgelsx( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, rw,
186  $ info )
187  CALL chkxer( 'ZGELSX', infot, nout, lerr, ok )
188 *
189 * ZGELSY
190 *
191  srnamt = 'ZGELSY'
192  infot = 1
193  CALL zgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
194  $ info )
195  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
196  infot = 2
197  CALL zgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
198  $ info )
199  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
200  infot = 3
201  CALL zgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
202  $ info )
203  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
204  infot = 5
205  CALL zgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10, rw,
206  $ info )
207  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
208  infot = 7
209  CALL zgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10, rw,
210  $ info )
211  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
212  infot = 12
213  CALL zgelsy( 0, 3, 0, a, 1, b, 3, ip, rcond, irnk, w, 1, rw,
214  $ info )
215  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
216 *
217 * ZGELSD
218 *
219  srnamt = 'ZGELSD'
220  infot = 1
221  CALL zgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
222  $ ip, info )
223  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
224  infot = 2
225  CALL zgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
226  $ ip, info )
227  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
228  infot = 3
229  CALL zgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
230  $ ip, info )
231  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
232  infot = 5
233  CALL zgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10, rw,
234  $ ip, info )
235  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
236  infot = 7
237  CALL zgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10, rw,
238  $ ip, info )
239  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
240  infot = 12
241  CALL zgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1, rw, ip,
242  $ info )
243  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
244  END IF
245 *
246 * Print a summary line.
247 *
248  CALL alaesm( path, ok, nout )
249 *
250  return
251 *
252 * End of ZERRLS
253 *
254  END