LAPACK  3.10.0
LAPACK: Linear Algebra PACKage
cerrps.f
Go to the documentation of this file.
1 *> \brief \b CERRPS
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 CERRPS( PATH, NUNIT )
12 *
13 * .. Scalar Arguments ..
14 * INTEGER NUNIT
15 * CHARACTER*3 PATH
16 * ..
17 *
18 *
19 *> \par Purpose:
20 * =============
21 *>
22 *> \verbatim
23 *>
24 *> CERRPS tests the error exits for the COMPLEX routines
25 *> for CPSTRF..
26 *> \endverbatim
27 *
28 * Arguments:
29 * ==========
30 *
31 *> \param[in] PATH
32 *> \verbatim
33 *> PATH is CHARACTER*3
34 *> The LAPACK path name for the routines to be tested.
35 *> \endverbatim
36 *>
37 *> \param[in] NUNIT
38 *> \verbatim
39 *> NUNIT is INTEGER
40 *> The unit number for output.
41 *> \endverbatim
42 *
43 * Authors:
44 * ========
45 *
46 *> \author Univ. of Tennessee
47 *> \author Univ. of California Berkeley
48 *> \author Univ. of Colorado Denver
49 *> \author NAG Ltd.
50 *
51 *> \ingroup complex_lin
52 *
53 * =====================================================================
54  SUBROUTINE cerrps( PATH, NUNIT )
55 *
56 * -- LAPACK test routine --
57 * -- LAPACK is a software package provided by Univ. of Tennessee, --
58 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
59 *
60 * .. Scalar Arguments ..
61  INTEGER NUNIT
62  CHARACTER*3 PATH
63 * ..
64 *
65 * =====================================================================
66 *
67 * .. Parameters ..
68  INTEGER NMAX
69  parameter( nmax = 4 )
70 * ..
71 * .. Local Scalars ..
72  INTEGER I, INFO, J, RANK
73 * ..
74 * .. Local Arrays ..
75  COMPLEX A( NMAX, NMAX )
76  REAL RWORK( 2*NMAX )
77  INTEGER PIV( NMAX )
78 * ..
79 * .. External Subroutines ..
80  EXTERNAL alaesm, chkxer, cpstf2, cpstrf
81 * ..
82 * .. Scalars in Common ..
83  INTEGER INFOT, NOUT
84  LOGICAL LERR, OK
85  CHARACTER*32 SRNAMT
86 * ..
87 * .. Common blocks ..
88  COMMON / infoc / infot, nout, ok, lerr
89  COMMON / srnamc / srnamt
90 * ..
91 * .. Intrinsic Functions ..
92  INTRINSIC real
93 * ..
94 * .. Executable Statements ..
95 *
96  nout = nunit
97  WRITE( nout, fmt = * )
98 *
99 * Set the variables to innocuous values.
100 *
101  DO 110 j = 1, nmax
102  DO 100 i = 1, nmax
103  a( i, j ) = 1.0 / real( i+j )
104 *
105  100 CONTINUE
106  piv( j ) = j
107  rwork( j ) = 0.
108  rwork( nmax+j ) = 0.
109 *
110  110 CONTINUE
111  ok = .true.
112 *
113 *
114 * Test error exits of the routines that use the Cholesky
115 * decomposition of an Hermitian positive semidefinite matrix.
116 *
117 * CPSTRF
118 *
119  srnamt = 'CPSTRF'
120  infot = 1
121  CALL cpstrf( '/', 0, a, 1, piv, rank, -1.0, rwork, info )
122  CALL chkxer( 'CPSTRF', infot, nout, lerr, ok )
123  infot = 2
124  CALL cpstrf( 'U', -1, a, 1, piv, rank, -1.0, rwork, info )
125  CALL chkxer( 'CPSTRF', infot, nout, lerr, ok )
126  infot = 4
127  CALL cpstrf( 'U', 2, a, 1, piv, rank, -1.0, rwork, info )
128  CALL chkxer( 'CPSTRF', infot, nout, lerr, ok )
129 *
130 * CPSTF2
131 *
132  srnamt = 'CPSTF2'
133  infot = 1
134  CALL cpstf2( '/', 0, a, 1, piv, rank, -1.0, rwork, info )
135  CALL chkxer( 'CPSTF2', infot, nout, lerr, ok )
136  infot = 2
137  CALL cpstf2( 'U', -1, a, 1, piv, rank, -1.0, rwork, info )
138  CALL chkxer( 'CPSTF2', infot, nout, lerr, ok )
139  infot = 4
140  CALL cpstf2( 'U', 2, a, 1, piv, rank, -1.0, rwork, info )
141  CALL chkxer( 'CPSTF2', infot, nout, lerr, ok )
142 *
143 *
144 * Print a summary line.
145 *
146  CALL alaesm( path, ok, nout )
147 *
148  RETURN
149 *
150 * End of CERRPS
151 *
152  END
subroutine chkxer(SRNAMT, INFOT, NOUT, LERR, OK)
Definition: cblat2.f:3196
subroutine alaesm(PATH, OK, NOUT)
ALAESM
Definition: alaesm.f:63
subroutine cerrps(PATH, NUNIT)
CERRPS
Definition: cerrps.f:55
subroutine cpstrf(UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO)
CPSTRF computes the Cholesky factorization with complete pivoting of complex Hermitian positive semid...
Definition: cpstrf.f:142
subroutine cpstf2(UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO)
CPSTF2 computes the Cholesky factorization with complete pivoting of complex Hermitian positive semid...
Definition: cpstf2.f:142