LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
serrls.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine serrls (PATH, NUNIT)
 SERRLS More...
 

Function/Subroutine Documentation

subroutine serrls ( character*3  PATH,
integer  NUNIT 
)

SERRLS

Purpose:
 SERRLS tests the error exits for the REAL least squares
 driver routines (SGELS, SGELSS, SGELSX, 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
November 2011

Definition at line 57 of file serrls.f.

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  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, sgelsx,
90  $ sgelsy
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  WRITE( nout, fmt = * )
105  c2 = path( 2: 3 )
106  a( 1, 1 ) = 1.0e+0
107  a( 1, 2 ) = 2.0e+0
108  a( 2, 2 ) = 3.0e+0
109  a( 2, 1 ) = 4.0e+0
110  ok = .true.
111 *
112  IF( lsamen( 2, c2, 'LS' ) ) THEN
113 *
114 * Test error exits for the least squares driver routines.
115 *
116 * SGELS
117 *
118  srnamt = 'SGELS '
119  infot = 1
120  CALL sgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
121  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
122  infot = 2
123  CALL sgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
124  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
125  infot = 3
126  CALL sgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
127  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
128  infot = 4
129  CALL sgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
130  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
131  infot = 6
132  CALL sgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
133  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
134  infot = 8
135  CALL sgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
136  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
137  infot = 10
138  CALL sgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
139  CALL chkxer( 'SGELS ', infot, nout, lerr, ok )
140 *
141 * SGELSS
142 *
143  srnamt = 'SGELSS'
144  infot = 1
145  CALL sgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, info )
146  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
147  infot = 2
148  CALL sgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, info )
149  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
150  infot = 3
151  CALL sgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, info )
152  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
153  infot = 5
154  CALL sgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, info )
155  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
156  infot = 7
157  CALL sgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, info )
158  CALL chkxer( 'SGELSS', infot, nout, lerr, ok )
159 *
160 * SGELSX
161 *
162  srnamt = 'SGELSX'
163  infot = 1
164  CALL sgelsx( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, info )
165  CALL chkxer( 'SGELSX', infot, nout, lerr, ok )
166  infot = 2
167  CALL sgelsx( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, info )
168  CALL chkxer( 'SGELSX', infot, nout, lerr, ok )
169  infot = 3
170  CALL sgelsx( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, info )
171  CALL chkxer( 'SGELSX', infot, nout, lerr, ok )
172  infot = 5
173  CALL sgelsx( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, info )
174  CALL chkxer( 'SGELSX', infot, nout, lerr, ok )
175  infot = 7
176  CALL sgelsx( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, info )
177  CALL chkxer( 'SGELSX', infot, nout, lerr, ok )
178 *
179 * SGELSY
180 *
181  srnamt = 'SGELSY'
182  infot = 1
183  CALL sgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10,
184  $ info )
185  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
186  infot = 2
187  CALL sgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10,
188  $ info )
189  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
190  infot = 3
191  CALL sgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10,
192  $ info )
193  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
194  infot = 5
195  CALL sgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10,
196  $ info )
197  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
198  infot = 7
199  CALL sgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10,
200  $ info )
201  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
202  infot = 12
203  CALL sgelsy( 2, 2, 1, a, 2, b, 2, ip, rcond, irnk, w, 1, info )
204  CALL chkxer( 'SGELSY', infot, nout, lerr, ok )
205 *
206 * SGELSD
207 *
208  srnamt = 'SGELSD'
209  infot = 1
210  CALL sgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10,
211  $ ip, info )
212  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
213  infot = 2
214  CALL sgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10,
215  $ ip, info )
216  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
217  infot = 3
218  CALL sgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10,
219  $ ip, info )
220  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
221  infot = 5
222  CALL sgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10,
223  $ ip, info )
224  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
225  infot = 7
226  CALL sgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10,
227  $ ip, info )
228  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
229  infot = 12
230  CALL sgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1, ip,
231  $ info )
232  CALL chkxer( 'SGELSD', infot, nout, lerr, ok )
233  END IF
234 *
235 * Print a summary line.
236 *
237  CALL alaesm( path, ok, nout )
238 *
239  RETURN
240 *
241 * End of SERRLS
242 *
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 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 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
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3199
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
logical function lsamen(N, CA, CB)
LSAMEN
Definition: lsamen.f:76
subroutine sgelsx(M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, INFO)
SGELSX solves overdetermined or underdetermined systems for GE matrices
Definition: sgelsx.f:180
subroutine alaesm(PATH, OK, NOUT)
ALAESM
Definition: alaesm.f:65

Here is the call graph for this function:

Here is the caller graph for this function: