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
zerrpo.f
Go to the documentation of this file.
1  SUBROUTINE zerrpo( 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 * ZERRPO tests the error exits for the COMPLEX*16 routines
18 * for Hermitian positive definite matrices.
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*2 c2
37  INTEGER i, info, j
38  DOUBLE PRECISION anrm, rcond
39 * ..
40 * .. Local Arrays ..
41  DOUBLE PRECISION r( nmax ), r1( nmax ), r2( nmax )
42  COMPLEX*16 a( nmax, nmax ), af( nmax, nmax ), b( nmax ),
43  $ w( 2*nmax ), x( nmax )
44 * ..
45 * .. External Functions ..
46  LOGICAL lsamen
47  EXTERNAL lsamen
48 * ..
49 * .. External Subroutines ..
50  EXTERNAL alaesm, chkxer, zpbcon, zpbequ, zpbrfs, zpbtf2,
51  $ zpbtrf, zpbtrs, zpocon, zpoequ, zporfs, zpotf2,
52  $ zpotrf, zpotri, zpotrs, zppcon, zppequ, zpprfs,
53  $ zpptrf, zpptri, zpptrs
54 * ..
55 * .. Scalars in Common ..
56  LOGICAL lerr, ok
57  CHARACTER*32 srnamt
58  INTEGER infot, nout
59 * ..
60 * .. Common blocks ..
61  common / infoc / infot, nout, ok, lerr
62  common / srnamc / srnamt
63 * ..
64 * .. Intrinsic Functions ..
65  INTRINSIC dble, dcmplx
66 * ..
67 * .. Executable Statements ..
68 *
69  nout = nunit
70  WRITE( nout, fmt = * )
71  c2 = path( 2: 3 )
72 *
73 * Disable PLASMA warnings/errors
74 *
75  CALL plasma_disable( plasma_warnings, info )
76  CALL plasma_disable( plasma_errors, info )
77 *
78 * Set the variables to innocuous values.
79 *
80  DO 20 j = 1, nmax
81  DO 10 i = 1, nmax
82  a( i, j ) = dcmplx( 1.d0 / dble( i+j ),
83  $ -1.d0 / dble( i+j ) )
84  af( i, j ) = dcmplx( 1.d0 / dble( i+j ),
85  $ -1.d0 / dble( i+j ) )
86  10 continue
87  b( j ) = 0.d0
88  r1( j ) = 0.d0
89  r2( j ) = 0.d0
90  w( j ) = 0.d0
91  x( j ) = 0.d0
92  20 continue
93  anrm = 1.d0
94  ok = .true.
95 *
96 * Test error exits of the routines that use the Cholesky
97 * decomposition of a Hermitian positive definite matrix.
98 *
99  IF( lsamen( 2, c2, 'PO' ) ) THEN
100 *
101 * ZPOTRF
102 *
103  srnamt = 'ZPOTRF'
104  infot = 1
105  CALL plasma_zpotrf( '/', 0, a, 1, info )
106  CALL chkxer( 'ZPOTRF', infot, nout, info, ok )
107  infot = 2
108  CALL plasma_zpotrf( plasmaupper, -1, a, 1, info )
109  CALL chkxer( 'ZPOTRF', infot, nout, info, ok )
110  infot = 4
111  CALL plasma_zpotrf( plasmaupper, 2, a, 1, info )
112  CALL chkxer( 'ZPOTRF', infot, nout, info, ok )
113 *
114 * ZPOTRS
115 *
116  srnamt = 'ZPOTRS'
117  infot = 1
118  CALL plasma_zpotrs( '/', 0, 0, a, 1, b, 1, info )
119  CALL chkxer( 'ZPOTRS', infot, nout, info, ok )
120  infot = 2
121  CALL plasma_zpotrs( plasmaupper, -1, 0, a, 1, b, 1, info )
122  CALL chkxer( 'ZPOTRS', infot, nout, info, ok )
123  infot = 3
124  CALL plasma_zpotrs( plasmaupper, 0, -1, a, 1, b, 1, info )
125  CALL chkxer( 'ZPOTRS', infot, nout, info, ok )
126  infot = 5
127  CALL plasma_zpotrs( plasmaupper, 2, 1, a, 1, b, 2, info )
128  CALL chkxer( 'ZPOTRS', infot, nout, info, ok )
129  infot = 7
130  CALL plasma_zpotrs( plasmaupper, 2, 1, a, 2, b, 1, info )
131  END IF
132 *
133 * Print a summary line.
134 *
135  CALL alaesm( path, ok, nout )
136 *
137 * Enable PLASMA warnings/errors
138 *
139  CALL plasma_enable( plasma_warnings, info )
140  CALL plasma_enable( plasma_errors, info )
141 *
142  return
143 *
144 * End of ZERRPO
145 *
146  END