LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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, 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 2015
52 *
53 *> \ingroup complex16_lin
54 *
55 * =====================================================================
56  SUBROUTINE zerrls( PATH, NUNIT )
57 *
58 * -- LAPACK test routine (version 3.6.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 2015
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, zgelsy
90 * ..
91 * .. Scalars in Common ..
92  LOGICAL LERR, OK
93  CHARACTER*32 SRNAMT
94  INTEGER INFOT, NOUT
95 * ..
96 * .. Common blocks ..
97  COMMON / infoc / infot, nout, ok, lerr
98  COMMON / srnamc / srnamt
99 * ..
100 * .. Executable Statements ..
101 *
102  nout = nunit
103  c2 = path( 2: 3 )
104  a( 1, 1 ) = ( 1.0d+0, 0.0d+0 )
105  a( 1, 2 ) = ( 2.0d+0, 0.0d+0 )
106  a( 2, 2 ) = ( 3.0d+0, 0.0d+0 )
107  a( 2, 1 ) = ( 4.0d+0, 0.0d+0 )
108  ok = .true.
109  WRITE( nout, fmt = * )
110 *
111 * Test error exits for the least squares driver routines.
112 *
113  IF( lsamen( 2, c2, 'LS' ) ) THEN
114 *
115 * ZGELS
116 *
117  srnamt = 'ZGELS '
118  infot = 1
119  CALL zgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
120  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
121  infot = 2
122  CALL zgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
123  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
124  infot = 3
125  CALL zgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
126  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
127  infot = 4
128  CALL zgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
129  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
130  infot = 6
131  CALL zgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
132  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
133  infot = 8
134  CALL zgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
135  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
136  infot = 10
137  CALL zgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
138  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
139 *
140 * ZGELSS
141 *
142  srnamt = 'ZGELSS'
143  infot = 1
144  CALL zgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
145  $ info )
146  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
147  infot = 2
148  CALL zgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
149  $ info )
150  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
151  infot = 3
152  CALL zgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
153  $ info )
154  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
155  infot = 5
156  CALL zgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, rw,
157  $ info )
158  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
159  infot = 7
160  CALL zgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, rw,
161  $ info )
162  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
163 *
164 * ZGELSY
165 *
166  srnamt = 'ZGELSY'
167  infot = 1
168  CALL zgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
169  $ info )
170  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
171  infot = 2
172  CALL zgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
173  $ info )
174  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
175  infot = 3
176  CALL zgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
177  $ info )
178  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
179  infot = 5
180  CALL zgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10, rw,
181  $ info )
182  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
183  infot = 7
184  CALL zgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10, rw,
185  $ info )
186  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
187  infot = 12
188  CALL zgelsy( 0, 3, 0, a, 1, b, 3, ip, rcond, irnk, w, 1, rw,
189  $ info )
190  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
191 *
192 * ZGELSD
193 *
194  srnamt = 'ZGELSD'
195  infot = 1
196  CALL zgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
197  $ ip, info )
198  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
199  infot = 2
200  CALL zgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
201  $ ip, info )
202  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
203  infot = 3
204  CALL zgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
205  $ ip, info )
206  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
207  infot = 5
208  CALL zgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10, rw,
209  $ ip, info )
210  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
211  infot = 7
212  CALL zgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10, rw,
213  $ ip, info )
214  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
215  infot = 12
216  CALL zgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1, rw, ip,
217  $ info )
218  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
219  END IF
220 *
221 * Print a summary line.
222 *
223  CALL alaesm( path, ok, nout )
224 *
225  RETURN
226 *
227 * End of ZERRLS
228 *
229  END
subroutine zgels(TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, INFO)
ZGELS solves overdetermined or underdetermined systems for GE matrices
Definition: zgels.f:184
subroutine zgelsy(M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, LWORK, RWORK, INFO)
ZGELSY solves overdetermined or underdetermined systems for GE matrices
Definition: zgelsy.f:212
subroutine zgelss(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, RWORK, INFO)
ZGELSS solves overdetermined or underdetermined systems for GE matrices
Definition: zgelss.f:180
subroutine alaesm(PATH, OK, NOUT)
ALAESM
Definition: alaesm.f:65
subroutine zgelsd(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, RWORK, IWORK, INFO)
ZGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices ...
Definition: zgelsd.f:227
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3199
subroutine zerrls(PATH, NUNIT)
ZERRLS
Definition: zerrls.f:57