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
derrpo.f
Go to the documentation of this file.
1  SUBROUTINE derrpo( PATH, NUNIT )
2 *
3  include 'plasmaf.h'
4 *
5 *
6 * -- LAPACK test routine (version 3.1) --
7 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
8 * November 2006
9 *
10 * .. Scalar Arguments ..
11  CHARACTER*3 path
12  INTEGER nunit
13 * ..
14 *
15 * Purpose
16 * =======
17 *
18 * DERRPO tests the error exits for the DOUBLE PRECISION routines
19 * for symmetric positive definite matrices.
20 *
21 * Arguments
22 * =========
23 *
24 * PATH (input) CHARACTER*3
25 * The LAPACK path name for the routines to be tested.
26 *
27 * NUNIT (input) INTEGER
28 * The unit number for output.
29 *
30 * =====================================================================
31 *
32 * .. Parameters ..
33  INTEGER nmax
34  parameter( nmax = 4 )
35 * ..
36 * .. Local Scalars ..
37  CHARACTER*2 c2
38  INTEGER i, info, j
39  DOUBLE PRECISION anrm, rcond
40 * ..
41 * .. Local Arrays ..
42  INTEGER iw( nmax )
43  DOUBLE PRECISION a( nmax, nmax ), af( nmax, nmax ), b( nmax ),
44  $ r1( nmax ), r2( nmax ), w( 3*nmax ), x( nmax )
45 * ..
46 * .. External Functions ..
47  LOGICAL lsamen
48  EXTERNAL lsamen
49 * ..
50 * .. External Subroutines ..
51  EXTERNAL alaesm, chkxer
52 * ..
53 * .. Scalars in Common ..
54  LOGICAL lerr, ok
55  CHARACTER*32 srnamt
56  INTEGER infot, nout
57 * ..
58 * .. Common blocks ..
59  common / infoc / infot, nout, ok, lerr
60  common / srnamc / srnamt
61 * ..
62 * .. Intrinsic Functions ..
63  INTRINSIC dble
64 * ..
65 * .. Executable Statements ..
66 *
67  nout = nunit
68  WRITE( nout, fmt = * )
69  c2 = path( 2: 3 )
70 *
71 * Disable PLASMA warnings/errors
72 *
73  CALL plasma_disable( plasma_warnings, info )
74  CALL plasma_disable( plasma_errors, info )
75 *
76 * Set the variables to innocuous values.
77 *
78  DO 20 j = 1, nmax
79  DO 10 i = 1, nmax
80  a( i, j ) = 1.d0 / dble( i+j )
81  af( i, j ) = 1.d0 / dble( i+j )
82  10 continue
83  b( j ) = 0.d0
84  r1( j ) = 0.d0
85  r2( j ) = 0.d0
86  w( j ) = 0.d0
87  x( j ) = 0.d0
88  iw( j ) = j
89  20 continue
90  ok = .true.
91 *
92  IF( lsamen( 2, c2, 'PO' ) ) THEN
93 *
94 * Test error exits of the routines that use the Cholesky
95 * decomposition of a symmetric positive definite matrix.
96 *
97 * DPOTRF
98 *
99  srnamt = 'DPOTRF'
100  infot = 1
101  CALL plasma_dpotrf( '/', 0, a, 1, info )
102  CALL chkxer( 'DPOTRF', infot, nout, info, ok )
103  infot = 2
104  CALL plasma_dpotrf( plasmaupper, -1, a, 1, info )
105  CALL chkxer( 'DPOTRF', infot, nout, info, ok )
106  infot = 4
107  CALL plasma_dpotrf( plasmaupper, 2, a, 1, info )
108  CALL chkxer( 'DPOTRF', infot, nout, info, ok )
109 *
110 * DPOTRS
111 *
112  srnamt = 'DPOTRS'
113  infot = 1
114  CALL plasma_dpotrs( '/', 0, 0, a, 1, b, 1, info )
115  CALL chkxer( 'DPOTRS', infot, nout, info, ok )
116  infot = 2
117  CALL plasma_dpotrs( plasmaupper, -1, 0, a, 1, b, 1, info )
118  CALL chkxer( 'DPOTRS', infot, nout, info, ok )
119  infot = 3
120  CALL plasma_dpotrs( plasmaupper, 0, -1, a, 1, b, 1, info )
121  CALL chkxer( 'DPOTRS', infot, nout, info, ok )
122  infot = 5
123  CALL plasma_dpotrs( plasmaupper, 2, 1, a, 1, b, 2, info )
124  CALL chkxer( 'DPOTRS', infot, nout, info, ok )
125  infot = 7
126  CALL plasma_dpotrs( plasmaupper, 2, 1, a, 2, b, 1, info )
127  CALL chkxer( 'DPOTRS', infot, nout, info, ok )
128  END IF
129 *
130 * Print a summary line.
131 *
132  CALL alaesm( path, ok, nout )
133 *
134 * Enable PLASMA warnings/errors
135 *
136  CALL plasma_enable( plasma_warnings, info )
137  CALL plasma_enable( plasma_errors, info )
138 *
139  return
140 *
141 * End of DERRPO
142 *
143  END