00001 SUBROUTINE DERRSY( PATH, NUNIT )
00002
00003
00004
00005
00006
00007
00008 CHARACTER*3 PATH
00009 INTEGER NUNIT
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 INTEGER NMAX
00031 PARAMETER ( NMAX = 4 )
00032
00033
00034 CHARACTER*2 C2
00035 INTEGER I, INFO, J
00036 DOUBLE PRECISION ANRM, RCOND
00037
00038
00039 INTEGER IP( NMAX ), IW( NMAX )
00040 DOUBLE PRECISION A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
00041 $ R1( NMAX ), R2( NMAX ), W( 3*NMAX ), X( NMAX )
00042
00043
00044 LOGICAL LSAMEN
00045 EXTERNAL LSAMEN
00046
00047
00048 EXTERNAL ALAESM, CHKXER, DSPCON, DSPRFS, DSPTRF, DSPTRI,
00049 $ DSPTRS, DSYCON, DSYRFS, DSYTF2, DSYTRF, DSYTRI,
00050 $ DSYTRI2, DSYTRS
00051
00052
00053 LOGICAL LERR, OK
00054 CHARACTER*32 SRNAMT
00055 INTEGER INFOT, NOUT
00056
00057
00058 COMMON / INFOC / INFOT, NOUT, OK, LERR
00059 COMMON / SRNAMC / SRNAMT
00060
00061
00062 INTRINSIC DBLE
00063
00064
00065
00066 NOUT = NUNIT
00067 WRITE( NOUT, FMT = * )
00068 C2 = PATH( 2: 3 )
00069
00070
00071
00072 DO 20 J = 1, NMAX
00073 DO 10 I = 1, NMAX
00074 A( I, J ) = 1.D0 / DBLE( I+J )
00075 AF( I, J ) = 1.D0 / DBLE( I+J )
00076 10 CONTINUE
00077 B( J ) = 0.D0
00078 R1( J ) = 0.D0
00079 R2( J ) = 0.D0
00080 W( J ) = 0.D0
00081 X( J ) = 0.D0
00082 IP( J ) = J
00083 IW( J ) = J
00084 20 CONTINUE
00085 ANRM = 1.0D0
00086 RCOND = 1.0D0
00087 OK = .TRUE.
00088
00089 IF( LSAMEN( 2, C2, 'SY' ) ) THEN
00090
00091
00092
00093
00094
00095
00096 SRNAMT = 'DSYTRF'
00097 INFOT = 1
00098 CALL DSYTRF( '/', 0, A, 1, IP, W, 1, INFO )
00099 CALL CHKXER( 'DSYTRF', INFOT, NOUT, LERR, OK )
00100 INFOT = 2
00101 CALL DSYTRF( 'U', -1, A, 1, IP, W, 1, INFO )
00102 CALL CHKXER( 'DSYTRF', INFOT, NOUT, LERR, OK )
00103 INFOT = 4
00104 CALL DSYTRF( 'U', 2, A, 1, IP, W, 4, INFO )
00105 CALL CHKXER( 'DSYTRF', INFOT, NOUT, LERR, OK )
00106
00107
00108
00109 SRNAMT = 'DSYTF2'
00110 INFOT = 1
00111 CALL DSYTF2( '/', 0, A, 1, IP, INFO )
00112 CALL CHKXER( 'DSYTF2', INFOT, NOUT, LERR, OK )
00113 INFOT = 2
00114 CALL DSYTF2( 'U', -1, A, 1, IP, INFO )
00115 CALL CHKXER( 'DSYTF2', INFOT, NOUT, LERR, OK )
00116 INFOT = 4
00117 CALL DSYTF2( 'U', 2, A, 1, IP, INFO )
00118 CALL CHKXER( 'DSYTF2', INFOT, NOUT, LERR, OK )
00119
00120
00121
00122 SRNAMT = 'DSYTRI'
00123 INFOT = 1
00124 CALL DSYTRI( '/', 0, A, 1, IP, W, INFO )
00125 CALL CHKXER( 'DSYTRI', INFOT, NOUT, LERR, OK )
00126 INFOT = 2
00127 CALL DSYTRI( 'U', -1, A, 1, IP, W, INFO )
00128 CALL CHKXER( 'DSYTRI', INFOT, NOUT, LERR, OK )
00129 INFOT = 4
00130 CALL DSYTRI( 'U', 2, A, 1, IP, W, INFO )
00131 CALL CHKXER( 'DSYTRI', INFOT, NOUT, LERR, OK )
00132
00133
00134
00135 SRNAMT = 'DSYTRI2'
00136 INFOT = 1
00137 CALL DSYTRI2( '/', 0, A, 1, IP, W, IW, INFO )
00138 CALL CHKXER( 'DSYTRI2', INFOT, NOUT, LERR, OK )
00139 INFOT = 2
00140 CALL DSYTRI2( 'U', -1, A, 1, IP, W, IW, INFO )
00141 CALL CHKXER( 'DSYTRI2', INFOT, NOUT, LERR, OK )
00142 INFOT = 4
00143 CALL DSYTRI2( 'U', 2, A, 1, IP, W, IW, INFO )
00144 CALL CHKXER( 'DSYTRI2', INFOT, NOUT, LERR, OK )
00145
00146
00147
00148 SRNAMT = 'DSYTRS'
00149 INFOT = 1
00150 CALL DSYTRS( '/', 0, 0, A, 1, IP, B, 1, INFO )
00151 CALL CHKXER( 'DSYTRS', INFOT, NOUT, LERR, OK )
00152 INFOT = 2
00153 CALL DSYTRS( 'U', -1, 0, A, 1, IP, B, 1, INFO )
00154 CALL CHKXER( 'DSYTRS', INFOT, NOUT, LERR, OK )
00155 INFOT = 3
00156 CALL DSYTRS( 'U', 0, -1, A, 1, IP, B, 1, INFO )
00157 CALL CHKXER( 'DSYTRS', INFOT, NOUT, LERR, OK )
00158 INFOT = 5
00159 CALL DSYTRS( 'U', 2, 1, A, 1, IP, B, 2, INFO )
00160 CALL CHKXER( 'DSYTRS', INFOT, NOUT, LERR, OK )
00161 INFOT = 8
00162 CALL DSYTRS( 'U', 2, 1, A, 2, IP, B, 1, INFO )
00163 CALL CHKXER( 'DSYTRS', INFOT, NOUT, LERR, OK )
00164
00165
00166
00167 SRNAMT = 'DSYRFS'
00168 INFOT = 1
00169 CALL DSYRFS( '/', 0, 0, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2, W,
00170 $ IW, INFO )
00171 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00172 INFOT = 2
00173 CALL DSYRFS( 'U', -1, 0, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2,
00174 $ W, IW, INFO )
00175 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00176 INFOT = 3
00177 CALL DSYRFS( 'U', 0, -1, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2,
00178 $ W, IW, INFO )
00179 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00180 INFOT = 5
00181 CALL DSYRFS( 'U', 2, 1, A, 1, AF, 2, IP, B, 2, X, 2, R1, R2, W,
00182 $ IW, INFO )
00183 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00184 INFOT = 7
00185 CALL DSYRFS( 'U', 2, 1, A, 2, AF, 1, IP, B, 2, X, 2, R1, R2, W,
00186 $ IW, INFO )
00187 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00188 INFOT = 10
00189 CALL DSYRFS( 'U', 2, 1, A, 2, AF, 2, IP, B, 1, X, 2, R1, R2, W,
00190 $ IW, INFO )
00191 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00192 INFOT = 12
00193 CALL DSYRFS( 'U', 2, 1, A, 2, AF, 2, IP, B, 2, X, 1, R1, R2, W,
00194 $ IW, INFO )
00195 CALL CHKXER( 'DSYRFS', INFOT, NOUT, LERR, OK )
00196
00197
00198
00199 SRNAMT = 'DSYCON'
00200 INFOT = 1
00201 CALL DSYCON( '/', 0, A, 1, IP, ANRM, RCOND, W, IW, INFO )
00202 CALL CHKXER( 'DSYCON', INFOT, NOUT, LERR, OK )
00203 INFOT = 2
00204 CALL DSYCON( 'U', -1, A, 1, IP, ANRM, RCOND, W, IW, INFO )
00205 CALL CHKXER( 'DSYCON', INFOT, NOUT, LERR, OK )
00206 INFOT = 4
00207 CALL DSYCON( 'U', 2, A, 1, IP, ANRM, RCOND, W, IW, INFO )
00208 CALL CHKXER( 'DSYCON', INFOT, NOUT, LERR, OK )
00209 INFOT = 6
00210 CALL DSYCON( 'U', 1, A, 1, IP, -1.0D0, RCOND, W, IW, INFO )
00211 CALL CHKXER( 'DSYCON', INFOT, NOUT, LERR, OK )
00212
00213 ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
00214
00215
00216
00217
00218
00219
00220 SRNAMT = 'DSPTRF'
00221 INFOT = 1
00222 CALL DSPTRF( '/', 0, A, IP, INFO )
00223 CALL CHKXER( 'DSPTRF', INFOT, NOUT, LERR, OK )
00224 INFOT = 2
00225 CALL DSPTRF( 'U', -1, A, IP, INFO )
00226 CALL CHKXER( 'DSPTRF', INFOT, NOUT, LERR, OK )
00227
00228
00229
00230 SRNAMT = 'DSPTRI'
00231 INFOT = 1
00232 CALL DSPTRI( '/', 0, A, IP, W, INFO )
00233 CALL CHKXER( 'DSPTRI', INFOT, NOUT, LERR, OK )
00234 INFOT = 2
00235 CALL DSPTRI( 'U', -1, A, IP, W, INFO )
00236 CALL CHKXER( 'DSPTRI', INFOT, NOUT, LERR, OK )
00237
00238
00239
00240 SRNAMT = 'DSPTRS'
00241 INFOT = 1
00242 CALL DSPTRS( '/', 0, 0, A, IP, B, 1, INFO )
00243 CALL CHKXER( 'DSPTRS', INFOT, NOUT, LERR, OK )
00244 INFOT = 2
00245 CALL DSPTRS( 'U', -1, 0, A, IP, B, 1, INFO )
00246 CALL CHKXER( 'DSPTRS', INFOT, NOUT, LERR, OK )
00247 INFOT = 3
00248 CALL DSPTRS( 'U', 0, -1, A, IP, B, 1, INFO )
00249 CALL CHKXER( 'DSPTRS', INFOT, NOUT, LERR, OK )
00250 INFOT = 7
00251 CALL DSPTRS( 'U', 2, 1, A, IP, B, 1, INFO )
00252 CALL CHKXER( 'DSPTRS', INFOT, NOUT, LERR, OK )
00253
00254
00255
00256 SRNAMT = 'DSPRFS'
00257 INFOT = 1
00258 CALL DSPRFS( '/', 0, 0, A, AF, IP, B, 1, X, 1, R1, R2, W, IW,
00259 $ INFO )
00260 CALL CHKXER( 'DSPRFS', INFOT, NOUT, LERR, OK )
00261 INFOT = 2
00262 CALL DSPRFS( 'U', -1, 0, A, AF, IP, B, 1, X, 1, R1, R2, W, IW,
00263 $ INFO )
00264 CALL CHKXER( 'DSPRFS', INFOT, NOUT, LERR, OK )
00265 INFOT = 3
00266 CALL DSPRFS( 'U', 0, -1, A, AF, IP, B, 1, X, 1, R1, R2, W, IW,
00267 $ INFO )
00268 CALL CHKXER( 'DSPRFS', INFOT, NOUT, LERR, OK )
00269 INFOT = 8
00270 CALL DSPRFS( 'U', 2, 1, A, AF, IP, B, 1, X, 2, R1, R2, W, IW,
00271 $ INFO )
00272 CALL CHKXER( 'DSPRFS', INFOT, NOUT, LERR, OK )
00273 INFOT = 10
00274 CALL DSPRFS( 'U', 2, 1, A, AF, IP, B, 2, X, 1, R1, R2, W, IW,
00275 $ INFO )
00276 CALL CHKXER( 'DSPRFS', INFOT, NOUT, LERR, OK )
00277
00278
00279
00280 SRNAMT = 'DSPCON'
00281 INFOT = 1
00282 CALL DSPCON( '/', 0, A, IP, ANRM, RCOND, W, IW, INFO )
00283 CALL CHKXER( 'DSPCON', INFOT, NOUT, LERR, OK )
00284 INFOT = 2
00285 CALL DSPCON( 'U', -1, A, IP, ANRM, RCOND, W, IW, INFO )
00286 CALL CHKXER( 'DSPCON', INFOT, NOUT, LERR, OK )
00287 INFOT = 5
00288 CALL DSPCON( 'U', 1, A, IP, -1.0D0, RCOND, W, IW, INFO )
00289 CALL CHKXER( 'DSPCON', INFOT, NOUT, LERR, OK )
00290 END IF
00291
00292
00293
00294 CALL ALAESM( PATH, OK, NOUT )
00295
00296 RETURN
00297
00298
00299
00300 END