PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
serrls.f
Go to the documentation of this file.
1  SUBROUTINE serrls( PATH, NUNIT )
2 *
3  include 'plasmaf.h'
4 *
5 * -- LAPACK test routine (version 3.1) --
6 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
7 * November 2006
8 *
9 * .. Scalar Arguments ..
10  CHARACTER*3 path
11  INTEGER nunit
12 * ..
13 *
14 * Purpose
15 * =======
16 *
17 * SERRLS tests the error exits for the REAL least squares
18 * driver routines (SGELS, SGELSS, SGELSX, SGELSY, SGELSD).
19 *
20 * Arguments
21 * =========
22 *
23 * PATH (input) CHARACTER*3
24 * The LAPACK path name for the routines to be tested.
25 *
26 * NUNIT (input) INTEGER
27 * The unit number for output.
28 *
29 * =====================================================================
30 *
31 * .. Parameters ..
32  INTEGER nmax
33  parameter( nmax = 2 )
34 * ..
35 * .. Local Scalars ..
36  CHARACTER*2 c2
37  INTEGER info, irnk
38  REAL rcond
39  INTEGER ht( 2 )
40 * ..
41 * .. Local Arrays ..
42  INTEGER ip( nmax )
43  REAL a( nmax, nmax ), b( nmax, nmax ), s( nmax ),
44  $ w( nmax )
45 * ..
46 * .. External Functions ..
47  LOGICAL lsamen
48  EXTERNAL lsamen
49 * ..
50 * .. External Subroutines ..
51  EXTERNAL alaesm, chkxer, sgels, sgelsd, sgelss, sgelsx,
52  $ sgelsy
53 * ..
54 * .. Scalars in Common ..
55  LOGICAL lerr, ok
56  CHARACTER*32 srnamt
57  INTEGER infot, nout
58 * ..
59 * .. Common blocks ..
60  common / infoc / infot, nout, ok, lerr
61  common / srnamc / srnamt
62 * ..
63 * .. Executable Statements ..
64 *
65  nout = nunit
66  WRITE( nout, fmt = * )
67  c2 = path( 2: 3 )
68  a( 1, 1 ) = 1.0e+0
69  a( 1, 2 ) = 2.0e+0
70  a( 2, 2 ) = 3.0e+0
71  a( 2, 1 ) = 4.0e+0
72  ok = .true.
73 *
74 * Disable PLASMA warnings/errors
75 *
76  CALL plasma_disable( plasma_warnings, info )
77  CALL plasma_disable( plasma_errors, info )
78 *
79  IF( lsamen( 2, c2, 'LS' ) ) THEN
80 *
81 * Test error exits for the least squares driver routines.
82 *
83 * SGELS
84 *
85  CALL plasma_alloc_workspace_sgels( 2, 2, ht, info )
86 *
87  srnamt = 'SGELS '
88  infot = 103
89  CALL plasma_sgels( '/', 0, 0, 0, a, 1, ht, b, 1, info )
90  CALL chkxer( 'SGELS ', infot, nout, info, ok )
91  infot = 2
92  CALL plasma_sgels( plasmanotrans, -1, 0, 0, a, 1, ht,
93  $ b, 1, info )
94  CALL chkxer( 'SGELS ', infot, nout, info, ok )
95  infot = 3
96  CALL plasma_sgels( plasmanotrans, 0, -1, 0, a, 1, ht,
97  $ b, 1, info )
98  CALL chkxer( 'SGELS ', infot, nout, info, ok )
99  infot = 4
100  CALL plasma_sgels( plasmanotrans, 0, 0, -1, a, 1, ht,
101  $ b, 1, info )
102  CALL chkxer( 'SGELS ', infot, nout, info, ok )
103  infot = 6
104  CALL plasma_sgels( plasmanotrans, 2, 0, 0, a, 1, ht,
105  $ b, 2, info )
106  CALL chkxer( 'SGELS ', infot, nout, info, ok )
107  infot = 9
108  CALL plasma_sgels( plasmanotrans, 2, 0, 0, a, 2, ht,
109  $ b, 1, info )
110  CALL chkxer( 'SGELS ', infot, nout, info, ok )
111 *
112  CALL plasma_dealloc_handle( ht, info )
113 *
114  END IF
115 *
116 * Print a summary line.
117 *
118  CALL alaesm( path, ok, nout )
119 *
120 * Enable PLASMA warnings/errors
121 *
122  CALL plasma_enable( plasma_warnings, info )
123  CALL plasma_enable( plasma_errors, info )
124 *
125  return
126 *
127 * End of SERRLS
128 *
129  END