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
zerrvx.f
Go to the documentation of this file.
1  SUBROUTINE zerrvx( PATH, NUNIT )
2 *
3  include 'plasmaf.h'
4 *
5 * -- LAPACK test routine (version 3.1.1) --
6 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
7 * January 2007
8 *
9 * .. Scalar Arguments ..
10  CHARACTER*3 path
11  INTEGER nunit
12 * ..
13 *
14 * Purpose
15 * =======
16 *
17 * ZERRVX tests the error exits for the COMPLEX*16 driver routines
18 * for solving linear systems of equations.
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 = 4 )
34 * ..
35 * .. Local Scalars ..
36  CHARACTER eq
37  CHARACTER*2 c2
38  INTEGER i, info, j
39  DOUBLE PRECISION rcond
40 * ..
41 * .. Local Arrays ..
42  INTEGER hl( 2 ), hpiv( 2 )
43  INTEGER ip( nmax )
44  DOUBLE PRECISION c( nmax ), r( nmax ), r1( nmax ), r2( nmax ),
45  $ rf( nmax ), rw( nmax )
46  COMPLEX*16 a( nmax, nmax ), af( nmax, nmax ), b( nmax ),
47  $ w( 2*nmax ), x( nmax ), iw( nmax )
48 * ..
49 * .. External Functions ..
50  LOGICAL lsamen
51  EXTERNAL lsamen
52 * ..
53 * .. External Subroutines ..
54  EXTERNAL chkxer, zgbsv, zgbsvx, zgesv, zgesvx, zgtsv,
55  $ zgtsvx, zhesv, zhesvx, zhpsv, zhpsvx, zpbsv,
56  $ zpbsvx, zposv, zposvx, zppsv, zppsvx, zptsv,
57  $ zptsvx, zspsv, zspsvx, zsysv, zsysvx
58 * ..
59 * .. Scalars in Common ..
60  LOGICAL lerr, ok
61  CHARACTER*32 srnamt
62  INTEGER infot, nout
63 * ..
64 * .. Common blocks ..
65  common / infoc / infot, nout, ok, lerr
66  common / srnamc / srnamt
67 * ..
68 * .. Intrinsic Functions ..
69  INTRINSIC dble, dcmplx
70 * ..
71 * .. Executable Statements ..
72 *
73  nout = nunit
74  WRITE( nout, fmt = * )
75  c2 = path( 2: 3 )
76 *
77 * Disable PLASMA warnings/errors
78 *
79  CALL plasma_disable( plasma_warnings, info )
80  CALL plasma_disable( plasma_errors, info )
81 *
82 * Set the variables to innocuous values.
83 *
84  DO 20 j = 1, nmax
85  DO 10 i = 1, nmax
86  a( i, j ) = dcmplx( 1.d0 / dble( i+j ),
87  $ -1.d0 / dble( i+j ) )
88  af( i, j ) = dcmplx( 1.d0 / dble( i+j ),
89  $ -1.d0 / dble( i+j ) )
90  10 continue
91  b( j ) = 0.d0
92  r1( j ) = 0.d0
93  r2( j ) = 0.d0
94  w( j ) = 0.d0
95  x( j ) = 0.d0
96  c( j ) = 0.d0
97  r( j ) = 0.d0
98  ip( j ) = j
99  20 continue
100  eq = ' '
101  ok = .true.
102  IF( lsamen( 2, c2, 'GE' ) ) THEN
103 *
104 * ALLOCATE HL and HPIV
105 *
107  $ 2, 1, hl, hpiv, info )
108 *
109 *
110 * ZGESV
111 *
112  srnamt = 'ZGESV '
113  infot = 1
114  CALL plasma_zgesv_incpiv( -1, 0, a, 1, hl, hpiv, b, 1, info )
115  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
116  infot = 2
117  CALL plasma_zgesv_incpiv( 0, -1, a, 1, hl, hpiv, b, 1, info )
118  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
119  infot = 4
120  CALL plasma_zgesv_incpiv( 2, 1, a, 1, hl, hpiv, b, 2, info )
121  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
122  infot = 8
123  CALL plasma_zgesv_incpiv( 2, 1, a, 2, hl, hpiv, b, 1, info )
124  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
125 *
126 * DEALLOCATE HL and HPIV
127 *
128  CALL plasma_dealloc_handle( hl, info )
129  CALL plasma_dealloc_handle( hpiv, info )
130 *
131 *
132 * ZGESV
133 *
134  srnamt = 'ZGESV '
135  infot = 1
136  CALL plasma_zgesv( -1, 0, a, 1, iwork, b, 1, info )
137  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
138  infot = 2
139  CALL plasma_zgesv( 0, -1, a, 1, iwork, b, 1, info )
140  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
141  infot = 4
142  CALL plasma_zgesv( 2, 1, a, 1, iwork, b, 2, info )
143  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
144  infot = 8
145  CALL plasma_zgesv( 2, 1, a, 2, iwork, b, 1, info )
146  CALL chkxer( 'ZGESV ', infot, nout, info, ok )
147 *
148  ELSE IF( lsamen( 2, c2, 'PO' ) ) THEN
149 *
150 * ZPOSV
151 *
152  srnamt = 'ZPOSV '
153  infot = 1
154  CALL plasma_zposv( '/', 0, 0, a, 1, b, 1, info )
155  CALL chkxer( 'ZPOSV ', infot, nout, info, ok )
156  infot = 2
157  CALL plasma_zposv( plasmaupper, -1, 0, a, 1, b, 1, info )
158  CALL chkxer( 'ZPOSV ', infot, nout, info, ok )
159  infot = 3
160  CALL plasma_zposv( plasmaupper, 0, -1, a, 1, b, 1, info )
161  CALL chkxer( 'ZPOSV ', infot, nout, info, ok )
162  infot = 5
163  CALL plasma_zposv( plasmaupper, 2, 0, a, 1, b, 2, info )
164  CALL chkxer( 'ZPOSV ', infot, nout, info, ok )
165  infot = 7
166  CALL plasma_zposv( plasmaupper, 2, 0, a, 2, b, 1, info )
167  CALL chkxer( 'ZPOSV ', infot, nout, info, ok )
168 *
169 * ZPOSVX
170 *
171  srnamt = 'ZPOSVX'
172  infot = 1
173  CALL zposvx( '/', 'U', 0, 0, a, 1, af, 1, eq, c, b, 1, x, 1,
174  $ rcond, r1, r2, w, iw, info )
175  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
176  infot = 2
177  CALL zposvx( 'N', '/', 0, 0, a, 1, af, 1, eq, c, b, 1, x, 1,
178  $ rcond, r1, r2, w, iw, info )
179  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
180  infot = 3
181  CALL zposvx( 'N', 'U', -1, 0, a, 1, af, 1, eq, c, b, 1, x, 1,
182  $ rcond, r1, r2, w, iw, info )
183  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
184  infot = 4
185  CALL zposvx( 'N', 'U', 0, -1, a, 1, af, 1, eq, c, b, 1, x, 1,
186  $ rcond, r1, r2, w, iw, info )
187  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
188  infot = 6
189  CALL zposvx( 'N', 'U', 2, 0, a, 1, af, 2, eq, c, b, 2, x, 2,
190  $ rcond, r1, r2, w, iw, info )
191  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
192  infot = 8
193  CALL zposvx( 'N', 'U', 2, 0, a, 2, af, 1, eq, c, b, 2, x, 2,
194  $ rcond, r1, r2, w, iw, info )
195  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
196  infot = 9
197  eq = '/'
198  CALL zposvx( 'F', 'U', 0, 0, a, 1, af, 1, eq, c, b, 1, x, 1,
199  $ rcond, r1, r2, w, iw, info )
200  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
201  infot = 10
202  eq = 'Y'
203  CALL zposvx( 'F', 'U', 1, 0, a, 1, af, 1, eq, c, b, 1, x, 1,
204  $ rcond, r1, r2, w, iw, info )
205  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
206  infot = 12
207  CALL zposvx( 'N', 'U', 2, 0, a, 2, af, 2, eq, c, b, 1, x, 2,
208  $ rcond, r1, r2, w, iw, info )
209  CALL chkxer( 'ZPOSVX', infot, nout, info, ok )
210  infot = 14
211  ENDIF
212 *
213 * Print a summary line.
214 *
215  IF( ok ) THEN
216  WRITE( nout, fmt = 9999 )path
217  ELSE
218  WRITE( nout, fmt = 9998 )path
219  END IF
220 *
221  9999 format( 1x, a3, ' drivers passed the tests of the error exits' )
222  9998 format( ' *** ', a3, ' drivers failed the tests of the error ',
223  $ 'exits ***' )
224 *
225 * Enable PLASMA warnings/errors
226 *
227  CALL plasma_enable( plasma_warnings, info )
228  CALL plasma_enable( plasma_errors, info )
229 *
230  return
231 *
232 * End of ZERRVX
233 *
234  END