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
zerrqr.f
Go to the documentation of this file.
1  SUBROUTINE zerrqr( 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 * ZERRQR tests the error exits for the COMPLEX*16 routines
18 * that use the QR decomposition of a general matrix.
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  INTEGER i, info, j
37 * ..
38 * .. Local Arrays ..
39  COMPLEX*16 a( nmax, nmax ), af( nmax, nmax ), b( nmax ),
40  $ w( nmax ), x( nmax )
41  INTEGER ht( 2 )
42 * ..
43 * .. External Subroutines ..
44  EXTERNAL alaesm, chkxer, zgeqr2, zgeqrf, zung2r,
45  $ zungqr, zunm2r, zunmqr
46 * ..
47 * .. Scalars in Common ..
48  LOGICAL lerr, ok
49  CHARACTER*32 srnamt
50  INTEGER infot, nout
51 * ..
52 * .. Common blocks ..
53  common / infoc / infot, nout, ok, lerr
54  common / srnamc / srnamt
55 * ..
56 * .. Intrinsic Functions ..
57  INTRINSIC dble, dcmplx
58 * ..
59 * .. Executable Statements ..
60 *
61  nout = nunit
62  WRITE( nout, fmt = * )
63 *
64 * Disable PLASMA warnings/errors
65 *
66  CALL plasma_disable( plasma_warnings, info )
67  CALL plasma_disable( plasma_errors, info )
68 *
69 * Set the variables to innocuous values.
70 *
71  DO 20 j = 1, nmax
72  DO 10 i = 1, nmax
73  a( i, j ) = dcmplx( 1.d0 / dble( i+j ),
74  $ -1.d0 / dble( i+j ) )
75  af( i, j ) = dcmplx( 1.d0 / dble( i+j ),
76  $ -1.d0 / dble( i+j ) )
77  10 continue
78  b( j ) = 0.d0
79  w( j ) = 0.d0
80  x( j ) = 0.d0
81  20 continue
82  ok = .true.
83 *
84 * Allocate HT
85 *
86  CALL plasma_alloc_workspace_zgeqrf( 2, 2, ht, info )
87 *
88 *
89 * Error exits for QR factorization
90 *
91 * ZGEQRF
92 *
93  srnamt = 'ZGEQRF'
94  infot = 1
95  CALL plasma_zgeqrf( -1, 0, a, 1, ht, info )
96  CALL chkxer( 'ZGEQRF', infot, nout, info, ok )
97  infot = 2
98  CALL plasma_zgeqrf( 0, -1, a, 1, ht, info )
99  CALL chkxer( 'ZGEQRF', infot, nout, info, ok )
100  infot = 4
101  CALL plasma_zgeqrf( 2, 1, a, 1, ht, info )
102  CALL chkxer( 'ZGEQRF', infot, nout, info, ok )
103 *
104 * ZGEQRS
105 *
106  srnamt = 'ZGEQRS'
107  infot = 1
108  CALL plasma_zgeqrs( -1, 0, 0, a, 1, x, b, 1, info )
109  CALL chkxer( 'ZGEQRS', infot, nout, info, ok )
110  infot = 2
111  CALL plasma_zgeqrs( 0, -1, 0, a, 1, x, b, 1, info )
112  CALL chkxer( 'ZGEQRS', infot, nout, info, ok )
113  infot = 2
114  CALL plasma_zgeqrs( 1, 2, 0, a, 2, x, b, 2, info )
115  CALL chkxer( 'ZGEQRS', infot, nout, info, ok )
116  infot = 3
117  CALL plasma_zgeqrs( 0, 0, -1, a, 1, x, b, 1, info )
118  CALL chkxer( 'ZGEQRS', infot, nout, info, ok )
119  infot = 5
120  CALL plasma_zgeqrs( 2, 1, 0, a, 1, x, b, 2, info )
121  CALL chkxer( 'ZGEQRS', infot, nout, info, ok )
122  infot = 8
123  CALL plasma_zgeqrs( 2, 1, 0, a, 2, x, b, 1, info )
124  CALL chkxer( 'ZGEQRS', infot, nout, info, ok )
125 *
126 * ZUNGQR
127 *
128  srnamt = 'ZUNGQR'
129  infot = 1
130  CALL plasma_zungqr( -1, 0, 0, a, 1, ht, w, 1, info )
131  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
132  infot = 2
133  CALL plasma_zungqr( 0, -1, 0, a, 1, ht, w, 1, info )
134  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
135  infot = 2
136  CALL plasma_zungqr( 1, 2, 0, a, 1, ht, w, 2, info )
137  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
138  infot = 3
139  CALL plasma_zungqr( 0, 0, -1, a, 1, ht, w, 1, info )
140  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
141  infot = 3
142  CALL plasma_zungqr( 1, 1, 2, a, 1, ht, w, 1, info )
143  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
144  infot = 5
145  CALL plasma_zungqr( 2, 2, 0, a, 1, ht, w, 2, info )
146  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
147  infot = 8
148  CALL plasma_zungqr( 2, 2, 0, a, 2, ht, w, 1, info )
149  CALL chkxer( 'ZUNGQR', infot, nout, info, ok )
150 *
151 * PLASMA_ZUNMQR
152 *
153  srnamt = 'ZUNMQR'
154  infot = 1
155  CALL plasma_zunmqr( '/', plasmaconjtrans, 0, 0, 0, a, 1, ht, af,
156  $ 1, info )
157  CALL chkxer( 'ZUNMQR', infot, nout, info, ok )
158  infot = 2
159  CALL plasma_zunmqr( plasmaleft, '/', 0, 0, 0, a, 1, ht, af, 1,
160  $ info )
161  CALL chkxer( 'ZUNMQR', infot, nout, info, ok )
162  infot = 3
163  CALL plasma_zunmqr( plasmaleft, plasmaconjtrans, -1, 0, 0, a, 1,
164  $ ht, af, 1, info )
165  CALL chkxer( 'ZUNMQR', infot, nout, info, ok )
166  infot = 4
167  CALL plasma_zunmqr( plasmaleft, plasmaconjtrans, 0, -1, 0, a, 1,
168  $ ht, af, 1, info )
169  CALL chkxer( 'ZUNMQR', infot, nout, info, ok )
170  infot = 5
171  CALL plasma_zunmqr( plasmaleft, plasmaconjtrans, 0, 0, -1, a, 1,
172  $ ht, af, 1, info )
173  CALL chkxer( 'ZUNMQR', infot, nout, info, ok )
174 * INFOT = 5
175 * CALL PLASMA_ZUNMQR( PLASMALEFT, PLASMACONJTRANS, 0, 1, 1, A, 1, HT,
176 * 4 AF, 1, INFO )
177 * CALL CHKXER( 'ZUNMQR', INFOT, NOUT, INFO, OK )
178 * INFOT = 5
179 * CALL PLASMA_ZUNMQR( PLASMALEFT, PLASMACONJTRANS, 1, 0, 1, A, 1, HT,
180 * 4 AF, 1, INFO )
181 * CALL CHKXER( 'ZUNMQR', INFOT, NOUT, INFO, OK )
182 * INFOT = 7
183 * CALL PLASMA_ZUNMQR( PLASMALEFT, PLASMACONJTRANS, 2, 1, 0, A, 1, HT,
184 * 4 AF, 2, INFO )
185 * CALL CHKXER( 'ZUNMQR', INFOT, NOUT, INFO, OK )
186 * INFOT = 7
187 * CALL PLASMA_ZUNMQR( PLASMALEFT, PLASMACONJTRANS, 1, 2, 0, A, 1, HT,
188 * 4 AF, 1, INFO )
189 * CALL CHKXER( 'ZUNMQR', INFOT, NOUT, INFO, OK )
190 * INFOT = 10
191 * CALL PLASMA_ZUNMQR( PLASMALEFT, PLASMACONJTRANS, 1, 2, 0, A, 1, HT,
192 * 4 AF, 1, INFO )
193 * CALL CHKXER( 'ZUNMQR', INFOT, NOUT, INFO, OK )
194 * INFOT = 10
195 * CALL PLASMA_ZUNMQR( PLASMALEFT, PLASMACONJTRANS, 2, 1, 0, A, 1, HT,
196 * 4 AF, 2, INFO )
197 * CALL CHKXER( 'ZUNMQR', INFOT, NOUT, INFO, OK )
198 *
199 * Print a summary line.
200 *
201  CALL alaesm( path, ok, nout )
202 *
203 * Deallocate HT
204 *
205  CALL plasma_dealloc_handle( ht, info )
206 *
207 * Enable PLASMA warnings/errors
208 *
209  CALL plasma_enable( plasma_warnings, info )
210  CALL plasma_enable( plasma_errors, info )
211 *
212  return
213 *
214 * End of ZERRQR
215 *
216  END