LAPACK  3.4.2
LAPACK: Linear Algebra PACKage
 All Files Functions Groups
zerrab.f
Go to the documentation of this file.
1 *> \brief \b ZERRAB
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 * Definition:
9 * ===========
10 *
11 * SUBROUTINE ZERRAB( NUNIT )
12 *
13 * .. Scalar Arguments ..
14 * INTEGER NUNIT
15 * ..
16 *
17 *
18 *> \par Purpose:
19 * =============
20 *>
21 *> \verbatim
22 *>
23 *> DERRAB tests the error exits for ZCGESV.
24 *> \endverbatim
25 *
26 * Arguments:
27 * ==========
28 *
29 *> \param[in] NUNIT
30 *> \verbatim
31 *> NUNIT is INTEGER
32 *> The unit number for output.
33 *> \endverbatim
34 *
35 * Authors:
36 * ========
37 *
38 *> \author Univ. of Tennessee
39 *> \author Univ. of California Berkeley
40 *> \author Univ. of Colorado Denver
41 *> \author NAG Ltd.
42 *
43 *> \date November 2011
44 *
45 *> \ingroup complex16_lin
46 *
47 * =====================================================================
48  SUBROUTINE zerrab( NUNIT )
49 *
50 * -- LAPACK test routine (version 3.4.0) --
51 * -- LAPACK is a software package provided by Univ. of Tennessee, --
52 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
53 * November 2011
54 *
55 * .. Scalar Arguments ..
56  INTEGER nunit
57 * ..
58 *
59 * =====================================================================
60 *
61 * .. Parameters ..
62  INTEGER nmax
63  parameter( nmax = 4 )
64 * ..
65 * .. Local Scalars ..
66  INTEGER i, info, iter, j
67 * ..
68 * .. Local Arrays ..
69  INTEGER ip( nmax )
70  COMPLEX*16 a( nmax, nmax ), af( nmax, nmax ), b( nmax ),
71  $ c( nmax ), r( nmax ), r1( nmax ), r2( nmax ),
72  $ w( 2*nmax ), x( nmax )
73  COMPLEX*16 work(1)
74  COMPLEX swork(1)
75  DOUBLE PRECISION rwork(1)
76 * ..
77 * .. External Functions ..
78 * ..
79 * .. External Subroutines ..
80  EXTERNAL chkxer, zcgesv
81 * ..
82 * .. Scalars in Common ..
83  LOGICAL lerr, ok
84  CHARACTER*32 srnamt
85  INTEGER infot, nout
86 * ..
87 * .. Common blocks ..
88  common / infoc / infot, nout, ok, lerr
89  common / srnamc / srnamt
90 * ..
91 * .. Intrinsic Functions ..
92  INTRINSIC dble
93 * ..
94 * .. Executable Statements ..
95 *
96  nout = nunit
97  WRITE( nout, fmt = * )
98 *
99 * Set the variables to innocuous values.
100 *
101  DO 20 j = 1, nmax
102  DO 10 i = 1, nmax
103  a( i, j ) = 1.d0 / dble( i+j )
104  af( i, j ) = 1.d0 / dble( i+j )
105  10 continue
106  b( j ) = 0.d0
107  r1( j ) = 0.d0
108  r2( j ) = 0.d0
109  w( j ) = 0.d0
110  x( j ) = 0.d0
111  c( j ) = 0.d0
112  r( j ) = 0.d0
113  ip( j ) = j
114  20 continue
115  ok = .true.
116 *
117  srnamt = 'ZCGESV'
118  infot = 1
119  CALL zcgesv(-1,0,a,1,ip,b,1,x,1,work,swork,rwork,iter,info)
120  CALL chkxer( 'ZCGESV', infot, nout, lerr, ok )
121  infot = 2
122  CALL zcgesv(0,-1,a,1,ip,b,1,x,1,work,swork,rwork,iter,info)
123  CALL chkxer( 'ZCGESV', infot, nout, lerr, ok )
124  infot = 4
125  CALL zcgesv(2,1,a,1,ip,b,2,x,2,work,swork,rwork,iter,info)
126  CALL chkxer( 'ZCGESV', infot, nout, lerr, ok )
127  infot = 7
128  CALL zcgesv(2,1,a,2,ip,b,1,x,2,work,swork,rwork,iter,info)
129  CALL chkxer( 'ZCGESV', infot, nout, lerr, ok )
130  infot = 9
131  CALL zcgesv(2,1,a,2,ip,b,2,x,1,work,swork,rwork,iter,info)
132  CALL chkxer( 'ZCGESV', infot, nout, lerr, ok )
133 *
134 * Print a summary line.
135 *
136  IF( ok ) THEN
137  WRITE( nout, fmt = 9999 )'ZCGESV'
138  ELSE
139  WRITE( nout, fmt = 9998 )'ZCGESV'
140  END IF
141 *
142  9999 format( 1x, a6, ' drivers passed the tests of the error exits' )
143  9998 format( ' *** ', a6, ' drivers failed the tests of the error ',
144  $ 'exits ***' )
145 *
146  return
147 *
148 * End of ZERRAB
149 *
150  END