LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ serrls()

subroutine serrls ( character*3  PATH,
integer  NUNIT 
)

SERRLS

Purpose:
 SERRLS tests the error exits for the REAL least squares
 driver routines (SGELS, SGELSS, SGELSY, SGELSD).
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.
Date
December 2016

Definition at line 57 of file serrls.f.

57 *
58 * -- LAPACK test routine (version 3.7.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 * December 2016
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  REAL rcond
78 * ..
79 * .. Local Arrays ..
80  INTEGER ip( nmax )
81  REAL a( nmax, nmax ), b( nmax, nmax ), s( nmax ),
82  $ w( nmax )
83 * ..
84 * .. External Functions ..
85  LOGICAL lsamen
86  EXTERNAL lsamen
87 * ..
88 * .. External Subroutines ..
89  EXTERNAL alaesm, chkxer, sgels, sgelsd, sgelss, sgelsy
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  WRITE( nout, fmt = * )
104  c2 = path( 2: 3 )
105  a( 1, 1 ) = 1.0e+0
106  a( 1, 2 ) = 2.0e+0
107  a( 2, 2 ) = 3.0e+0
108  a( 2, 1 ) = 4.0e+0
109  ok = .true.
110 *
111  IF( lsamen( 2, c2, 'LS' ) ) THEN
112 *
113 * Test error exits for the least squares driver routines.
114 *
115 * SGELS
116 *
117  srnamt = 'SGELS '
118  infot = 1
119  CALL sgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
120  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
121  infot = 2
122  CALL sgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
123  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
124  infot = 3
125  CALL sgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
126  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
127  infot = 4
128  CALL sgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
129  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
130  infot = 6
131  CALL sgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
132  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
133  infot = 8
134  CALL sgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
135  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
136  infot = 10
137  CALL sgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
138  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
139 *
140 * SGELSS
141 *
142  srnamt = 'SGELSS'
143  infot = 1
144  CALL sgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, info )
145  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
146  infot = 2
147  CALL sgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, info )
148  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
149  infot = 3
150  CALL sgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, info )
151  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
152  infot = 5
153  CALL sgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, info )
154  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
155  infot = 7
156  CALL sgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, info )
157  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
158 *
159 * SGELSY
160 *
161  srnamt = 'SGELSY'
162  infot = 1
163  CALL sgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10,
164  $ info )
165  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
166  infot = 2
167  CALL sgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10,
168  $ info )
169  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
170  infot = 3
171  CALL sgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10,
172  $ info )
173  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
174  infot = 5
175  CALL sgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10,
176  $ info )
177  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
178  infot = 7
179  CALL sgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10,
180  $ info )
181  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
182  infot = 12
183  CALL sgelsy( 2, 2, 1, a, 2, b, 2, ip, rcond, irnk, w, 1, info )
184  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
185 *
186 * SGELSD
187 *
188  srnamt = 'SGELSD'
189  infot = 1
190  CALL sgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10,
191  $ ip, info )
192  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
193  infot = 2
194  CALL sgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10,
195  $ ip, info )
196  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
197  infot = 3
198  CALL sgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10,
199  $ ip, info )
200  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
201  infot = 5
202  CALL sgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10,
203  $ ip, info )
204  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
205  infot = 7
206  CALL sgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10,
207  $ ip, info )
208  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
209  infot = 12
210  CALL sgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1, ip,
211  $ info )
212  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
213  END IF
214 *
215 * Print a summary line.
216 *
217  CALL alaesm( path, ok, nout )
218 *
219  RETURN
220 *
221 * End of SERRLS
222 *
subroutine sgelss(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, INFO)
SGELSS solves overdetermined or underdetermined systems for GE matrices
Definition: sgelss.f:174
subroutine sgelsd(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, IWORK, INFO)
SGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices ...
Definition: sgelsd.f:212
subroutine alaesm(PATH, OK, NOUT)
ALAESM
Definition: alaesm.f:65
subroutine sgelsy(M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, LWORK, INFO)
SGELSY solves overdetermined or underdetermined systems for GE matrices
Definition: sgelsy.f:206
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3199
logical function lsamen(N, CA, CB)
LSAMEN
Definition: lsamen.f:76
subroutine sgels(TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, INFO)
SGELS solves overdetermined or underdetermined systems for GE matrices
Definition: sgels.f:185
Here is the call graph for this function:
Here is the caller graph for this function: