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

Go to the source code of this file.

Functions/Subroutines

subroutine derrls (PATH, NUNIT)
 DERRLS More...
 

Function/Subroutine Documentation

subroutine derrls ( character*3  PATH,
integer  NUNIT 
)

DERRLS

Purpose:
 DERRLS tests the error exits for the DOUBLE PRECISION least squares
 driver routines (DGELS, 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 derrls.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  DOUBLE PRECISION rcond
78 * ..
79 * .. Local Arrays ..
80  INTEGER ip( nmax )
81  DOUBLE PRECISION 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, dgels, dgelsd, dgelss, dgelsx,
90  $ dgelsy
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.0d+0
107  a( 1, 2 ) = 2.0d+0
108  a( 2, 2 ) = 3.0d+0
109  a( 2, 1 ) = 4.0d+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 * DGELS
117 *
118  srnamt = 'DGELS '
119  infot = 1
120  CALL dgels( '/', 0, 0, 0, a, 1, b, 1, w, 1, info )
121  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
122  infot = 2
123  CALL dgels( 'N', -1, 0, 0, a, 1, b, 1, w, 1, info )
124  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
125  infot = 3
126  CALL dgels( 'N', 0, -1, 0, a, 1, b, 1, w, 1, info )
127  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
128  infot = 4
129  CALL dgels( 'N', 0, 0, -1, a, 1, b, 1, w, 1, info )
130  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
131  infot = 6
132  CALL dgels( 'N', 2, 0, 0, a, 1, b, 2, w, 2, info )
133  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
134  infot = 8
135  CALL dgels( 'N', 2, 0, 0, a, 2, b, 1, w, 2, info )
136  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
137  infot = 10
138  CALL dgels( 'N', 1, 1, 0, a, 1, b, 1, w, 1, info )
139  CALL chkxer( 'DGELS ', infot, nout, lerr, ok )
140 *
141 * DGELSS
142 *
143  srnamt = 'DGELSS'
144  infot = 1
145  CALL dgelss( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 1, info )
146  CALL chkxer( 'DGELSS', infot, nout, lerr, ok )
147  infot = 2
148  CALL dgelss( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 1, info )
149  CALL chkxer( 'DGELSS', infot, nout, lerr, ok )
150  infot = 3
151  CALL dgelss( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 1, info )
152  CALL chkxer( 'DGELSS', infot, nout, lerr, ok )
153  infot = 5
154  CALL dgelss( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 2, info )
155  CALL chkxer( 'DGELSS', infot, nout, lerr, ok )
156  infot = 7
157  CALL dgelss( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 2, info )
158  CALL chkxer( 'DGELSS', infot, nout, lerr, ok )
159 *
160 * DGELSX
161 *
162  srnamt = 'DGELSX'
163  infot = 1
164  CALL dgelsx( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, info )
165  CALL chkxer( 'DGELSX', infot, nout, lerr, ok )
166  infot = 2
167  CALL dgelsx( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, info )
168  CALL chkxer( 'DGELSX', infot, nout, lerr, ok )
169  infot = 3
170  CALL dgelsx( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, info )
171  CALL chkxer( 'DGELSX', infot, nout, lerr, ok )
172  infot = 5
173  CALL dgelsx( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, info )
174  CALL chkxer( 'DGELSX', infot, nout, lerr, ok )
175  infot = 7
176  CALL dgelsx( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, info )
177  CALL chkxer( 'DGELSX', infot, nout, lerr, ok )
178 *
179 * DGELSY
180 *
181  srnamt = 'DGELSY'
182  infot = 1
183  CALL dgelsy( -1, 0, 0, a, 1, b, 1, ip, rcond, irnk, w, 10,
184  $ info )
185  CALL chkxer( 'DGELSY', infot, nout, lerr, ok )
186  infot = 2
187  CALL dgelsy( 0, -1, 0, a, 1, b, 1, ip, rcond, irnk, w, 10,
188  $ info )
189  CALL chkxer( 'DGELSY', infot, nout, lerr, ok )
190  infot = 3
191  CALL dgelsy( 0, 0, -1, a, 1, b, 1, ip, rcond, irnk, w, 10,
192  $ info )
193  CALL chkxer( 'DGELSY', infot, nout, lerr, ok )
194  infot = 5
195  CALL dgelsy( 2, 0, 0, a, 1, b, 2, ip, rcond, irnk, w, 10,
196  $ info )
197  CALL chkxer( 'DGELSY', infot, nout, lerr, ok )
198  infot = 7
199  CALL dgelsy( 2, 0, 0, a, 2, b, 1, ip, rcond, irnk, w, 10,
200  $ info )
201  CALL chkxer( 'DGELSY', infot, nout, lerr, ok )
202  infot = 12
203  CALL dgelsy( 2, 2, 1, a, 2, b, 2, ip, rcond, irnk, w, 1, info )
204  CALL chkxer( 'DGELSY', infot, nout, lerr, ok )
205 *
206 * DGELSD
207 *
208  srnamt = 'DGELSD'
209  infot = 1
210  CALL dgelsd( -1, 0, 0, a, 1, b, 1, s, rcond, irnk, w, 10, ip,
211  $ info )
212  CALL chkxer( 'DGELSD', infot, nout, lerr, ok )
213  infot = 2
214  CALL dgelsd( 0, -1, 0, a, 1, b, 1, s, rcond, irnk, w, 10, ip,
215  $ info )
216  CALL chkxer( 'DGELSD', infot, nout, lerr, ok )
217  infot = 3
218  CALL dgelsd( 0, 0, -1, a, 1, b, 1, s, rcond, irnk, w, 10, ip,
219  $ info )
220  CALL chkxer( 'DGELSD', infot, nout, lerr, ok )
221  infot = 5
222  CALL dgelsd( 2, 0, 0, a, 1, b, 2, s, rcond, irnk, w, 10, ip,
223  $ info )
224  CALL chkxer( 'DGELSD', infot, nout, lerr, ok )
225  infot = 7
226  CALL dgelsd( 2, 0, 0, a, 2, b, 1, s, rcond, irnk, w, 10, ip,
227  $ info )
228  CALL chkxer( 'DGELSD', infot, nout, lerr, ok )
229  infot = 12
230  CALL dgelsd( 2, 2, 1, a, 2, b, 2, s, rcond, irnk, w, 1, ip,
231  $ info )
232  CALL chkxer( 'DGELSD', 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 DERRLS
242 *
subroutine dgelsx(M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, INFO)
DGELSX solves overdetermined or underdetermined systems for GE matrices
Definition: dgelsx.f:180
subroutine dgels(TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, INFO)
DGELS solves overdetermined or underdetermined systems for GE matrices
Definition: dgels.f:185
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3199
subroutine dgelsy(M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, LWORK, INFO)
DGELSY solves overdetermined or underdetermined systems for GE matrices
Definition: dgelsy.f:206
subroutine dgelss(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, INFO)
DGELSS solves overdetermined or underdetermined systems for GE matrices
Definition: dgelss.f:174
logical function lsamen(N, CA, CB)
LSAMEN
Definition: lsamen.f:76
subroutine alaesm(PATH, OK, NOUT)
ALAESM
Definition: alaesm.f:65
subroutine dgelsd(M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, IWORK, INFO)
DGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices ...
Definition: dgelsd.f:211

Here is the call graph for this function:

Here is the caller graph for this function: