LAPACK 3.3.1
Linear Algebra PACKage

cerrhe.f

Go to the documentation of this file.
00001       SUBROUTINE CERRHE( PATH, NUNIT )
00002 *
00003 *  -- LAPACK test routine (version 3.3.1) --
00004 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
00005 *  -- April 2011                                                      --
00006 *
00007 *     .. Scalar Arguments ..
00008       CHARACTER*3        PATH
00009       INTEGER            NUNIT
00010 *     ..
00011 *
00012 *  Purpose
00013 *  =======
00014 *
00015 *  CERRHE tests the error exits for the COMPLEX routines
00016 *  for Hermitian indefinite matrices.
00017 *
00018 *  Arguments
00019 *  =========
00020 *
00021 *  PATH    (input) CHARACTER*3
00022 *          The LAPACK path name for the routines to be tested.
00023 *
00024 *  NUNIT   (input) INTEGER
00025 *          The unit number for output.
00026 *
00027 *  =====================================================================
00028 *
00029 *
00030 *     .. Parameters ..
00031       INTEGER            NMAX
00032       PARAMETER          ( NMAX = 4 )
00033 *     ..
00034 *     .. Local Scalars ..
00035       CHARACTER*2        C2
00036       INTEGER            I, INFO, J
00037       REAL               ANRM, RCOND
00038 *     ..
00039 *     .. Local Arrays ..
00040       INTEGER            IP( NMAX )
00041       REAL               R( NMAX ), R1( NMAX ), R2( NMAX )
00042       COMPLEX            A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
00043      $                   W( 2*NMAX ), X( NMAX )
00044 *     ..
00045 *     .. External Functions ..
00046       LOGICAL            LSAMEN
00047       EXTERNAL           LSAMEN
00048 *     ..
00049 *     .. External Subroutines ..
00050       EXTERNAL           ALAESM, CHECON, CHERFS, CHETF2, CHETRF, CHETRI,
00051      $                   CHETRI2, CHETRS, CHKXER, CHPCON, CHPRFS,
00052      $                   CHPTRF, CHPTRI, CHPTRS
00053 *     ..
00054 *     .. Scalars in Common ..
00055       LOGICAL            LERR, OK
00056       CHARACTER*32       SRNAMT
00057       INTEGER            INFOT, NOUT
00058 *     ..
00059 *     .. Common blocks ..
00060       COMMON             / INFOC / INFOT, NOUT, OK, LERR
00061       COMMON             / SRNAMC / SRNAMT
00062 *     ..
00063 *     .. Intrinsic Functions ..
00064       INTRINSIC          CMPLX, REAL
00065 *     ..
00066 *     .. Executable Statements ..
00067 *
00068       NOUT = NUNIT
00069       WRITE( NOUT, FMT = * )
00070       C2 = PATH( 2: 3 )
00071 *
00072 *     Set the variables to innocuous values.
00073 *
00074       DO 20 J = 1, NMAX
00075          DO 10 I = 1, NMAX
00076             A( I, J ) = CMPLX( 1. / REAL( I+J ), -1. / REAL( I+J ) )
00077             AF( I, J ) = CMPLX( 1. / REAL( I+J ), -1. / REAL( I+J ) )
00078    10    CONTINUE
00079          B( J ) = 0.
00080          R1( J ) = 0.
00081          R2( J ) = 0.
00082          W( J ) = 0.
00083          X( J ) = 0.
00084          IP( J ) = J
00085    20 CONTINUE
00086       ANRM = 1.0
00087       OK = .TRUE.
00088 *
00089 *     Test error exits of the routines that use the diagonal pivoting
00090 *     factorization of a Hermitian indefinite matrix.
00091 *
00092       IF( LSAMEN( 2, C2, 'HE' ) ) THEN
00093 *
00094 *        CHETRF
00095 *
00096          SRNAMT = 'CHETRF'
00097          INFOT = 1
00098          CALL CHETRF( '/', 0, A, 1, IP, W, 1, INFO )
00099          CALL CHKXER( 'CHETRF', INFOT, NOUT, LERR, OK )
00100          INFOT = 2
00101          CALL CHETRF( 'U', -1, A, 1, IP, W, 1, INFO )
00102          CALL CHKXER( 'CHETRF', INFOT, NOUT, LERR, OK )
00103          INFOT = 4
00104          CALL CHETRF( 'U', 2, A, 1, IP, W, 4, INFO )
00105          CALL CHKXER( 'CHETRF', INFOT, NOUT, LERR, OK )
00106 *
00107 *        CHETF2
00108 *
00109          SRNAMT = 'CHETF2'
00110          INFOT = 1
00111          CALL CHETF2( '/', 0, A, 1, IP, INFO )
00112          CALL CHKXER( 'CHETF2', INFOT, NOUT, LERR, OK )
00113          INFOT = 2
00114          CALL CHETF2( 'U', -1, A, 1, IP, INFO )
00115          CALL CHKXER( 'CHETF2', INFOT, NOUT, LERR, OK )
00116          INFOT = 4
00117          CALL CHETF2( 'U', 2, A, 1, IP, INFO )
00118          CALL CHKXER( 'CHETF2', INFOT, NOUT, LERR, OK )
00119 *
00120 *        CHETRI
00121 *
00122          SRNAMT = 'CHETRI'
00123          INFOT = 1
00124          CALL CHETRI( '/', 0, A, 1, IP, W, INFO )
00125          CALL CHKXER( 'CHETRI', INFOT, NOUT, LERR, OK )
00126          INFOT = 2
00127          CALL CHETRI( 'U', -1, A, 1, IP, W, INFO )
00128          CALL CHKXER( 'CHETRI', INFOT, NOUT, LERR, OK )
00129          INFOT = 4
00130          CALL CHETRI( 'U', 2, A, 1, IP, W, INFO )
00131          CALL CHKXER( 'CHETRI', INFOT, NOUT, LERR, OK )
00132 *
00133 *        CHETRI2
00134 *
00135          SRNAMT = 'CHETRI2'
00136          INFOT = 1
00137          CALL CHETRI2( '/', 0, A, 1, IP, W, 1, INFO )
00138          CALL CHKXER( 'CHETRI2', INFOT, NOUT, LERR, OK )
00139          INFOT = 2
00140          CALL CHETRI2( 'U', -1, A, 1, IP, W, 1, INFO )
00141          CALL CHKXER( 'CHETRI2', INFOT, NOUT, LERR, OK )
00142          INFOT = 4
00143          CALL CHETRI2( 'U', 2, A, 1, IP, W, 1, INFO )
00144          CALL CHKXER( 'CHETRI2', INFOT, NOUT, LERR, OK )
00145 *
00146 *        CHETRS
00147 *
00148          SRNAMT = 'CHETRS'
00149          INFOT = 1
00150          CALL CHETRS( '/', 0, 0, A, 1, IP, B, 1, INFO )
00151          CALL CHKXER( 'CHETRS', INFOT, NOUT, LERR, OK )
00152          INFOT = 2
00153          CALL CHETRS( 'U', -1, 0, A, 1, IP, B, 1, INFO )
00154          CALL CHKXER( 'CHETRS', INFOT, NOUT, LERR, OK )
00155          INFOT = 3
00156          CALL CHETRS( 'U', 0, -1, A, 1, IP, B, 1, INFO )
00157          CALL CHKXER( 'CHETRS', INFOT, NOUT, LERR, OK )
00158          INFOT = 5
00159          CALL CHETRS( 'U', 2, 1, A, 1, IP, B, 2, INFO )
00160          CALL CHKXER( 'CHETRS', INFOT, NOUT, LERR, OK )
00161          INFOT = 8
00162          CALL CHETRS( 'U', 2, 1, A, 2, IP, B, 1, INFO )
00163          CALL CHKXER( 'CHETRS', INFOT, NOUT, LERR, OK )
00164 *
00165 *        CHERFS
00166 *
00167          SRNAMT = 'CHERFS'
00168          INFOT = 1
00169          CALL CHERFS( '/', 0, 0, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2, W,
00170      $                R, INFO )
00171          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00172          INFOT = 2
00173          CALL CHERFS( 'U', -1, 0, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2,
00174      $                W, R, INFO )
00175          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00176          INFOT = 3
00177          CALL CHERFS( 'U', 0, -1, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2,
00178      $                W, R, INFO )
00179          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00180          INFOT = 5
00181          CALL CHERFS( 'U', 2, 1, A, 1, AF, 2, IP, B, 2, X, 2, R1, R2, W,
00182      $                R, INFO )
00183          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00184          INFOT = 7
00185          CALL CHERFS( 'U', 2, 1, A, 2, AF, 1, IP, B, 2, X, 2, R1, R2, W,
00186      $                R, INFO )
00187          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00188          INFOT = 10
00189          CALL CHERFS( 'U', 2, 1, A, 2, AF, 2, IP, B, 1, X, 2, R1, R2, W,
00190      $                R, INFO )
00191          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00192          INFOT = 12
00193          CALL CHERFS( 'U', 2, 1, A, 2, AF, 2, IP, B, 2, X, 1, R1, R2, W,
00194      $                R, INFO )
00195          CALL CHKXER( 'CHERFS', INFOT, NOUT, LERR, OK )
00196 *
00197 *        CHECON
00198 *
00199          SRNAMT = 'CHECON'
00200          INFOT = 1
00201          CALL CHECON( '/', 0, A, 1, IP, ANRM, RCOND, W, INFO )
00202          CALL CHKXER( 'CHECON', INFOT, NOUT, LERR, OK )
00203          INFOT = 2
00204          CALL CHECON( 'U', -1, A, 1, IP, ANRM, RCOND, W, INFO )
00205          CALL CHKXER( 'CHECON', INFOT, NOUT, LERR, OK )
00206          INFOT = 4
00207          CALL CHECON( 'U', 2, A, 1, IP, ANRM, RCOND, W, INFO )
00208          CALL CHKXER( 'CHECON', INFOT, NOUT, LERR, OK )
00209          INFOT = 6
00210          CALL CHECON( 'U', 1, A, 1, IP, -ANRM, RCOND, W, INFO )
00211          CALL CHKXER( 'CHECON', INFOT, NOUT, LERR, OK )
00212 *
00213 *     Test error exits of the routines that use the diagonal pivoting
00214 *     factorization of a Hermitian indefinite packed matrix.
00215 *
00216       ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
00217 *
00218 *        CHPTRF
00219 *
00220          SRNAMT = 'CHPTRF'
00221          INFOT = 1
00222          CALL CHPTRF( '/', 0, A, IP, INFO )
00223          CALL CHKXER( 'CHPTRF', INFOT, NOUT, LERR, OK )
00224          INFOT = 2
00225          CALL CHPTRF( 'U', -1, A, IP, INFO )
00226          CALL CHKXER( 'CHPTRF', INFOT, NOUT, LERR, OK )
00227 *
00228 *        CHPTRI
00229 *
00230          SRNAMT = 'CHPTRI'
00231          INFOT = 1
00232          CALL CHPTRI( '/', 0, A, IP, W, INFO )
00233          CALL CHKXER( 'CHPTRI', INFOT, NOUT, LERR, OK )
00234          INFOT = 2
00235          CALL CHPTRI( 'U', -1, A, IP, W, INFO )
00236          CALL CHKXER( 'CHPTRI', INFOT, NOUT, LERR, OK )
00237 *
00238 *        CHPTRS
00239 *
00240          SRNAMT = 'CHPTRS'
00241          INFOT = 1
00242          CALL CHPTRS( '/', 0, 0, A, IP, B, 1, INFO )
00243          CALL CHKXER( 'CHPTRS', INFOT, NOUT, LERR, OK )
00244          INFOT = 2
00245          CALL CHPTRS( 'U', -1, 0, A, IP, B, 1, INFO )
00246          CALL CHKXER( 'CHPTRS', INFOT, NOUT, LERR, OK )
00247          INFOT = 3
00248          CALL CHPTRS( 'U', 0, -1, A, IP, B, 1, INFO )
00249          CALL CHKXER( 'CHPTRS', INFOT, NOUT, LERR, OK )
00250          INFOT = 7
00251          CALL CHPTRS( 'U', 2, 1, A, IP, B, 1, INFO )
00252          CALL CHKXER( 'CHPTRS', INFOT, NOUT, LERR, OK )
00253 *
00254 *        CHPRFS
00255 *
00256          SRNAMT = 'CHPRFS'
00257          INFOT = 1
00258          CALL CHPRFS( '/', 0, 0, A, AF, IP, B, 1, X, 1, R1, R2, W, R,
00259      $                INFO )
00260          CALL CHKXER( 'CHPRFS', INFOT, NOUT, LERR, OK )
00261          INFOT = 2
00262          CALL CHPRFS( 'U', -1, 0, A, AF, IP, B, 1, X, 1, R1, R2, W, R,
00263      $                INFO )
00264          CALL CHKXER( 'CHPRFS', INFOT, NOUT, LERR, OK )
00265          INFOT = 3
00266          CALL CHPRFS( 'U', 0, -1, A, AF, IP, B, 1, X, 1, R1, R2, W, R,
00267      $                INFO )
00268          CALL CHKXER( 'CHPRFS', INFOT, NOUT, LERR, OK )
00269          INFOT = 8
00270          CALL CHPRFS( 'U', 2, 1, A, AF, IP, B, 1, X, 2, R1, R2, W, R,
00271      $                INFO )
00272          CALL CHKXER( 'CHPRFS', INFOT, NOUT, LERR, OK )
00273          INFOT = 10
00274          CALL CHPRFS( 'U', 2, 1, A, AF, IP, B, 2, X, 1, R1, R2, W, R,
00275      $                INFO )
00276          CALL CHKXER( 'CHPRFS', INFOT, NOUT, LERR, OK )
00277 *
00278 *        CHPCON
00279 *
00280          SRNAMT = 'CHPCON'
00281          INFOT = 1
00282          CALL CHPCON( '/', 0, A, IP, ANRM, RCOND, W, INFO )
00283          CALL CHKXER( 'CHPCON', INFOT, NOUT, LERR, OK )
00284          INFOT = 2
00285          CALL CHPCON( 'U', -1, A, IP, ANRM, RCOND, W, INFO )
00286          CALL CHKXER( 'CHPCON', INFOT, NOUT, LERR, OK )
00287          INFOT = 5
00288          CALL CHPCON( 'U', 1, A, IP, -ANRM, RCOND, W, INFO )
00289          CALL CHKXER( 'CHPCON', INFOT, NOUT, LERR, OK )
00290       END IF
00291 *
00292 *     Print a summary line.
00293 *
00294       CALL ALAESM( PATH, OK, NOUT )
00295 *
00296       RETURN
00297 *
00298 *     End of CERRHE
00299 *
00300       END
 All Files Functions