LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ zerrls()

subroutine zerrls ( character*3  PATH,
integer  NUNIT 
)

ZERRLS

Purpose:
 ZERRLS tests the error exits for the COMPLEX*16 least squares
 driver routines (ZGELS, CGELSS, CGELSY, CGELSD).
Parameters
[in]PATH
          PATH is CHARACTER*3
          The LAPACK path name for the routines to be tested.
[in]NUNIT
          NUNIT is INTEGER
          The unit number for output.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 54 of file zerrls.f.

55 *
56 * -- LAPACK test routine --
57 * -- LAPACK is a software package provided by Univ. of Tennessee, --
58 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
59 *
60 * .. Scalar Arguments ..
61  CHARACTER*3 PATH
62  INTEGER NUNIT
63 * ..
64 *
65 * =====================================================================
66 *
67 * .. Parameters ..
68  INTEGER NMAX
69  parameter( nmax = 2 )
70 * ..
71 * .. Local Scalars ..
72  CHARACTER*2 C2
73  INTEGER INFO, IRNK
74  DOUBLE PRECISION RCOND
75 * ..
76 * .. Local Arrays ..
77  INTEGER IP( NMAX )
78  DOUBLE PRECISION RW( NMAX ), S( NMAX )
79  COMPLEX*16 A( NMAX, NMAX ), B( NMAX, NMAX ), W( NMAX )
80 * ..
81 * .. External Functions ..
82  LOGICAL LSAMEN
83  EXTERNAL lsamen
84 * ..
85 * .. External Subroutines ..
86  EXTERNAL alaesm, chkxer, zgels, zgelsd, zgelss, zgelsy
87 * ..
88 * .. Scalars in Common ..
89  LOGICAL LERR, OK
90  CHARACTER*32 SRNAMT
91  INTEGER INFOT, NOUT
92 * ..
93 * .. Common blocks ..
94  COMMON / infoc / infot, nout, ok, lerr
95  COMMON / srnamc / srnamt
96 * ..
97 * .. Executable Statements ..
98 *
99  nout = nunit
100  c2 = path( 2: 3 )
101  a( 1, 1 ) = ( 1.0d+0, 0.0d+0 )
102  a( 1, 2 ) = ( 2.0d+0, 0.0d+0 )
103  a( 2, 2 ) = ( 3.0d+0, 0.0d+0 )
104  a( 2, 1 ) = ( 4.0d+0, 0.0d+0 )
105  ok = .true.
106  WRITE( nout, fmt = * )
107 *
108 * Test error exits for the least squares driver routines.
109 *
110  IF( lsamen( 2, c2, 'LS' ) ) THEN
111 *
112 * ZGELS
113 *
114  srnamt = 'ZGELS '
115  infot = 1
116  CALL zgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
117  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
118  infot = 2
119  CALL zgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
120  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
121  infot = 3
122  CALL zgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
123  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
124  infot = 4
125  CALL zgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
126  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
127  infot = 6
128  CALL zgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
129  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
130  infot = 8
131  CALL zgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
132  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
133  infot = 10
134  CALL zgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
135  CALL chkxer( 'ZGELS ', infot, nout, lerr, ok )
136 *
137 * ZGELSS
138 *
139  srnamt = 'ZGELSS'
140  infot = 1
141  CALL zgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
142  $ info )
143  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
144  infot = 2
145  CALL zgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
146  $ info )
147  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
148  infot = 3
149  CALL zgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
150  $ info )
151  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
152  infot = 5
153  CALL zgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, rw,
154  $ info )
155  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
156  infot = 7
157  CALL zgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, rw,
158  $ info )
159  CALL chkxer( 'ZGELSS', infot, nout, lerr, ok )
160 *
161 * ZGELSY
162 *
163  srnamt = 'ZGELSY'
164  infot = 1
165  CALL zgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
166  $ info )
167  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
168  infot = 2
169  CALL zgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
170  $ info )
171  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
172  infot = 3
173  CALL zgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
174  $ info )
175  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
176  infot = 5
177  CALL zgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10, rw,
178  $ info )
179  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
180  infot = 7
181  CALL zgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10, rw,
182  $ info )
183  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
184  infot = 12
185  CALL zgelsy( 0, 3, 0, a, 1, b, 3, ip, rcond, irnk, w, 1, rw,
186  $ info )
187  CALL chkxer( 'ZGELSY', infot, nout, lerr, ok )
188 *
189 * ZGELSD
190 *
191  srnamt = 'ZGELSD'
192  infot = 1
193  CALL zgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
194  $ ip, info )
195  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
196  infot = 2
197  CALL zgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
198  $ ip, info )
199  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
200  infot = 3
201  CALL zgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10, rw,
202  $ ip, info )
203  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
204  infot = 5
205  CALL zgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10, rw,
206  $ ip, info )
207  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
208  infot = 7
209  CALL zgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10, rw,
210  $ ip, info )
211  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
212  infot = 12
213  CALL zgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1, rw, ip,
214  $ info )
215  CALL chkxer( 'ZGELSD', infot, nout, lerr, ok )
216  END IF
217 *
218 * Print a summary line.
219 *
220  CALL alaesm( path, ok, nout )
221 *
222  RETURN
223 *
224 * End of ZERRLS
225 *
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3196
logical function lsamen(N, CA, CB)
LSAMEN
Definition: lsamen.f:74
subroutine alaesm(PATH, OK, NOUT)
ALAESM
Definition: alaesm.f:63
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:182
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:178
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:210
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:225
Here is the call graph for this function:
Here is the caller graph for this function: