LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ cerrls()

subroutine cerrls ( character*3  PATH,
integer  NUNIT 
)

CERRLS

Purpose:
 CERRLS tests the error exits for the COMPLEX least squares
 driver routines (CGELS, 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 cerrls.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  REAL RCOND
75 * ..
76 * .. Local Arrays ..
77  INTEGER IP( NMAX )
78  REAL RW( NMAX ), S( NMAX )
79  COMPLEX 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, cgels, cgelsd, cgelss, cgelsy, chkxer
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.0e+0, 0.0e+0 )
102  a( 1, 2 ) = ( 2.0e+0, 0.0e+0 )
103  a( 2, 2 ) = ( 3.0e+0, 0.0e+0 )
104  a( 2, 1 ) = ( 4.0e+0, 0.0e+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 * CGELS
113 *
114  srnamt = 'CGELS '
115  infot = 1
116  CALL cgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
117  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
118  infot = 2
119  CALL cgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
120  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
121  infot = 3
122  CALL cgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
123  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
124  infot = 4
125  CALL cgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
126  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
127  infot = 6
128  CALL cgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
129  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
130  infot = 8
131  CALL cgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
132  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
133  infot = 10
134  CALL cgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
135  CALL chkxer( 'CGELS ', infot, nout, lerr, ok )
136 *
137 * CGELSS
138 *
139  srnamt = 'CGELSS'
140  infot = 1
141  CALL cgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
142  $ info )
143  CALL chkxer( 'CGELSS', infot, nout, lerr, ok )
144  infot = 2
145  CALL cgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
146  $ info )
147  CALL chkxer( 'CGELSS', infot, nout, lerr, ok )
148  infot = 3
149  CALL cgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, rw,
150  $ info )
151  CALL chkxer( 'CGELSS', infot, nout, lerr, ok )
152  infot = 5
153  CALL cgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, rw,
154  $ info )
155  CALL chkxer( 'CGELSS', infot, nout, lerr, ok )
156  infot = 7
157  CALL cgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, rw,
158  $ info )
159  CALL chkxer( 'CGELSS', infot, nout, lerr, ok )
160 *
161 * CGELSY
162 *
163  srnamt = 'CGELSY'
164  infot = 1
165  CALL cgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
166  $ info )
167  CALL chkxer( 'CGELSY', infot, nout, lerr, ok )
168  infot = 2
169  CALL cgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
170  $ info )
171  CALL chkxer( 'CGELSY', infot, nout, lerr, ok )
172  infot = 3
173  CALL cgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10, rw,
174  $ info )
175  CALL chkxer( 'CGELSY', infot, nout, lerr, ok )
176  infot = 5
177  CALL cgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10, rw,
178  $ info )
179  CALL chkxer( 'CGELSY', infot, nout, lerr, ok )
180  infot = 7
181  CALL cgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10, rw,
182  $ info )
183  CALL chkxer( 'CGELSY', infot, nout, lerr, ok )
184  infot = 12
185  CALL cgelsy( 0, 3, 0, a, 1, b, 3, ip, rcond, irnk, w, 1, rw,
186  $ info )
187  CALL chkxer( 'CGELSY', infot, nout, lerr, ok )
188 *
189 * CGELSD
190 *
191  srnamt = 'CGELSD'
192  infot = 1
193  CALL cgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10,
194  $ rw, ip, info )
195  CALL chkxer( 'CGELSD', infot, nout, lerr, ok )
196  infot = 2
197  CALL cgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10,
198  $ rw, ip, info )
199  CALL chkxer( 'CGELSD', infot, nout, lerr, ok )
200  infot = 3
201  CALL cgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10,
202  $ rw, ip, info )
203  CALL chkxer( 'CGELSD', infot, nout, lerr, ok )
204  infot = 5
205  CALL cgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10,
206  $ rw, ip, info )
207  CALL chkxer( 'CGELSD', infot, nout, lerr, ok )
208  infot = 7
209  CALL cgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10,
210  $ rw, ip, info )
211  CALL chkxer( 'CGELSD', infot, nout, lerr, ok )
212  infot = 12
213  CALL cgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1,
214  $ rw, ip, info )
215  CALL chkxer( 'CGELSD', 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 CERRLS
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 cgels(TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, INFO)
CGELS solves overdetermined or underdetermined systems for GE matrices
Definition: cgels.f:182
subroutine cgelss(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, RWORK, INFO)
CGELSS solves overdetermined or underdetermined systems for GE matrices
Definition: cgelss.f:178
subroutine cgelsy(M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, LWORK, RWORK, INFO)
CGELSY solves overdetermined or underdetermined systems for GE matrices
Definition: cgelsy.f:210
subroutine cgelsd(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, RWORK, IWORK, INFO)
CGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices
Definition: cgelsd.f:225
Here is the call graph for this function:
Here is the caller graph for this function: