LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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
subroutine zerrab(NUNIT)
ZERRAB
Definition: zerrab.f:49
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3199
subroutine zcgesv(N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK, SWORK, RWORK, ITER, INFO)
ZCGESV computes the solution to system of linear equations A * X = B for GE matrices (mixed precisio...
Definition: zcgesv.f:203