00001 SUBROUTINE SERRSY( 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 REAL ANRM, RCOND
00037
00038
00039 INTEGER IP( NMAX ), IW( NMAX )
00040 REAL 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, SSPCON, SSPRFS, SSPTRF, SSPTRI,
00049 $ SSPTRS, SSYCON, SSYRFS, SSYTF2, SSYTRF, SSYTRI,
00050 $ SSYTRI2, SSYTRS
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 REAL
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. / REAL( I+J )
00075 AF( I, J ) = 1. / REAL( I+J )
00076 10 CONTINUE
00077 B( J ) = 0.
00078 R1( J ) = 0.
00079 R2( J ) = 0.
00080 W( J ) = 0.
00081 X( J ) = 0.
00082 IP( J ) = J
00083 IW( J ) = J
00084 20 CONTINUE
00085 ANRM = 1.0
00086 RCOND = 1.0
00087 OK = .TRUE.
00088
00089 IF( LSAMEN( 2, C2, 'SY' ) ) THEN
00090
00091
00092
00093
00094
00095
00096 SRNAMT = 'SSYTRF'
00097 INFOT = 1
00098 CALL SSYTRF( '/', 0, A, 1, IP, W, 1, INFO )
00099 CALL CHKXER( 'SSYTRF', INFOT, NOUT, LERR, OK )
00100 INFOT = 2
00101 CALL SSYTRF( 'U', -1, A, 1, IP, W, 1, INFO )
00102 CALL CHKXER( 'SSYTRF', INFOT, NOUT, LERR, OK )
00103 INFOT = 4
00104 CALL SSYTRF( 'U', 2, A, 1, IP, W, 4, INFO )
00105 CALL CHKXER( 'SSYTRF', INFOT, NOUT, LERR, OK )
00106
00107
00108
00109 SRNAMT = 'SSYTF2'
00110 INFOT = 1
00111 CALL SSYTF2( '/', 0, A, 1, IP, INFO )
00112 CALL CHKXER( 'SSYTF2', INFOT, NOUT, LERR, OK )
00113 INFOT = 2
00114 CALL SSYTF2( 'U', -1, A, 1, IP, INFO )
00115 CALL CHKXER( 'SSYTF2', INFOT, NOUT, LERR, OK )
00116 INFOT = 4
00117 CALL SSYTF2( 'U', 2, A, 1, IP, INFO )
00118 CALL CHKXER( 'SSYTF2', INFOT, NOUT, LERR, OK )
00119
00120
00121
00122 SRNAMT = 'SSYTRI'
00123 INFOT = 1
00124 CALL SSYTRI( '/', 0, A, 1, IP, W, INFO )
00125 CALL CHKXER( 'SSYTRI', INFOT, NOUT, LERR, OK )
00126 INFOT = 2
00127 CALL SSYTRI( 'U', -1, A, 1, IP, W, INFO )
00128 CALL CHKXER( 'SSYTRI', INFOT, NOUT, LERR, OK )
00129 INFOT = 4
00130 CALL SSYTRI( 'U', 2, A, 1, IP, W, INFO )
00131 CALL CHKXER( 'SSYTRI', INFOT, NOUT, LERR, OK )
00132
00133
00134
00135 SRNAMT = 'SSYTRI2'
00136 INFOT = 1
00137 CALL SSYTRI2( '/', 0, A, 1, IP, W, IW, INFO )
00138 CALL CHKXER( 'SSYTRI2', INFOT, NOUT, LERR, OK )
00139 INFOT = 2
00140 CALL SSYTRI2( 'U', -1, A, 1, IP, W, IW, INFO )
00141 CALL CHKXER( 'SSYTRI2', INFOT, NOUT, LERR, OK )
00142 INFOT = 4
00143 CALL SSYTRI2( 'U', 2, A, 1, IP, W, IW, INFO )
00144 CALL CHKXER( 'SSYTRI2', INFOT, NOUT, LERR, OK )
00145
00146
00147
00148 SRNAMT = 'SSYTRS'
00149 INFOT = 1
00150 CALL SSYTRS( '/', 0, 0, A, 1, IP, B, 1, INFO )
00151 CALL CHKXER( 'SSYTRS', INFOT, NOUT, LERR, OK )
00152 INFOT = 2
00153 CALL SSYTRS( 'U', -1, 0, A, 1, IP, B, 1, INFO )
00154 CALL CHKXER( 'SSYTRS', INFOT, NOUT, LERR, OK )
00155 INFOT = 3
00156 CALL SSYTRS( 'U', 0, -1, A, 1, IP, B, 1, INFO )
00157 CALL CHKXER( 'SSYTRS', INFOT, NOUT, LERR, OK )
00158 INFOT = 5
00159 CALL SSYTRS( 'U', 2, 1, A, 1, IP, B, 2, INFO )
00160 CALL CHKXER( 'SSYTRS', INFOT, NOUT, LERR, OK )
00161 INFOT = 8
00162 CALL SSYTRS( 'U', 2, 1, A, 2, IP, B, 1, INFO )
00163 CALL CHKXER( 'SSYTRS', INFOT, NOUT, LERR, OK )
00164
00165
00166
00167 SRNAMT = 'SSYRFS'
00168 INFOT = 1
00169 CALL SSYRFS( '/', 0, 0, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2, W,
00170 $ IW, INFO )
00171 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00172 INFOT = 2
00173 CALL SSYRFS( 'U', -1, 0, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2,
00174 $ W, IW, INFO )
00175 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00176 INFOT = 3
00177 CALL SSYRFS( 'U', 0, -1, A, 1, AF, 1, IP, B, 1, X, 1, R1, R2,
00178 $ W, IW, INFO )
00179 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00180 INFOT = 5
00181 CALL SSYRFS( 'U', 2, 1, A, 1, AF, 2, IP, B, 2, X, 2, R1, R2, W,
00182 $ IW, INFO )
00183 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00184 INFOT = 7
00185 CALL SSYRFS( 'U', 2, 1, A, 2, AF, 1, IP, B, 2, X, 2, R1, R2, W,
00186 $ IW, INFO )
00187 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00188 INFOT = 10
00189 CALL SSYRFS( 'U', 2, 1, A, 2, AF, 2, IP, B, 1, X, 2, R1, R2, W,
00190 $ IW, INFO )
00191 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00192 INFOT = 12
00193 CALL SSYRFS( 'U', 2, 1, A, 2, AF, 2, IP, B, 2, X, 1, R1, R2, W,
00194 $ IW, INFO )
00195 CALL CHKXER( 'SSYRFS', INFOT, NOUT, LERR, OK )
00196
00197
00198
00199 SRNAMT = 'SSYCON'
00200 INFOT = 1
00201 CALL SSYCON( '/', 0, A, 1, IP, ANRM, RCOND, W, IW, INFO )
00202 CALL CHKXER( 'SSYCON', INFOT, NOUT, LERR, OK )
00203 INFOT = 2
00204 CALL SSYCON( 'U', -1, A, 1, IP, ANRM, RCOND, W, IW, INFO )
00205 CALL CHKXER( 'SSYCON', INFOT, NOUT, LERR, OK )
00206 INFOT = 4
00207 CALL SSYCON( 'U', 2, A, 1, IP, ANRM, RCOND, W, IW, INFO )
00208 CALL CHKXER( 'SSYCON', INFOT, NOUT, LERR, OK )
00209 INFOT = 6
00210 CALL SSYCON( 'U', 1, A, 1, IP, -1.0, RCOND, W, IW, INFO )
00211 CALL CHKXER( 'SSYCON', INFOT, NOUT, LERR, OK )
00212
00213 ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
00214
00215
00216
00217
00218
00219
00220 SRNAMT = 'SSPTRF'
00221 INFOT = 1
00222 CALL SSPTRF( '/', 0, A, IP, INFO )
00223 CALL CHKXER( 'SSPTRF', INFOT, NOUT, LERR, OK )
00224 INFOT = 2
00225 CALL SSPTRF( 'U', -1, A, IP, INFO )
00226 CALL CHKXER( 'SSPTRF', INFOT, NOUT, LERR, OK )
00227
00228
00229
00230 SRNAMT = 'SSPTRI'
00231 INFOT = 1
00232 CALL SSPTRI( '/', 0, A, IP, W, INFO )
00233 CALL CHKXER( 'SSPTRI', INFOT, NOUT, LERR, OK )
00234 INFOT = 2
00235 CALL SSPTRI( 'U', -1, A, IP, W, INFO )
00236 CALL CHKXER( 'SSPTRI', INFOT, NOUT, LERR, OK )
00237
00238
00239
00240 SRNAMT = 'SSPTRS'
00241 INFOT = 1
00242 CALL SSPTRS( '/', 0, 0, A, IP, B, 1, INFO )
00243 CALL CHKXER( 'SSPTRS', INFOT, NOUT, LERR, OK )
00244 INFOT = 2
00245 CALL SSPTRS( 'U', -1, 0, A, IP, B, 1, INFO )
00246 CALL CHKXER( 'SSPTRS', INFOT, NOUT, LERR, OK )
00247 INFOT = 3
00248 CALL SSPTRS( 'U', 0, -1, A, IP, B, 1, INFO )
00249 CALL CHKXER( 'SSPTRS', INFOT, NOUT, LERR, OK )
00250 INFOT = 7
00251 CALL SSPTRS( 'U', 2, 1, A, IP, B, 1, INFO )
00252 CALL CHKXER( 'SSPTRS', INFOT, NOUT, LERR, OK )
00253
00254
00255
00256 SRNAMT = 'SSPRFS'
00257 INFOT = 1
00258 CALL SSPRFS( '/', 0, 0, A, AF, IP, B, 1, X, 1, R1, R2, W, IW,
00259 $ INFO )
00260 CALL CHKXER( 'SSPRFS', INFOT, NOUT, LERR, OK )
00261 INFOT = 2
00262 CALL SSPRFS( 'U', -1, 0, A, AF, IP, B, 1, X, 1, R1, R2, W, IW,
00263 $ INFO )
00264 CALL CHKXER( 'SSPRFS', INFOT, NOUT, LERR, OK )
00265 INFOT = 3
00266 CALL SSPRFS( 'U', 0, -1, A, AF, IP, B, 1, X, 1, R1, R2, W, IW,
00267 $ INFO )
00268 CALL CHKXER( 'SSPRFS', INFOT, NOUT, LERR, OK )
00269 INFOT = 8
00270 CALL SSPRFS( 'U', 2, 1, A, AF, IP, B, 1, X, 2, R1, R2, W, IW,
00271 $ INFO )
00272 CALL CHKXER( 'SSPRFS', INFOT, NOUT, LERR, OK )
00273 INFOT = 10
00274 CALL SSPRFS( 'U', 2, 1, A, AF, IP, B, 2, X, 1, R1, R2, W, IW,
00275 $ INFO )
00276 CALL CHKXER( 'SSPRFS', INFOT, NOUT, LERR, OK )
00277
00278
00279
00280 SRNAMT = 'SSPCON'
00281 INFOT = 1
00282 CALL SSPCON( '/', 0, A, IP, ANRM, RCOND, W, IW, INFO )
00283 CALL CHKXER( 'SSPCON', INFOT, NOUT, LERR, OK )
00284 INFOT = 2
00285 CALL SSPCON( 'U', -1, A, IP, ANRM, RCOND, W, IW, INFO )
00286 CALL CHKXER( 'SSPCON', INFOT, NOUT, LERR, OK )
00287 INFOT = 5
00288 CALL SSPCON( 'U', 1, A, IP, -1.0, RCOND, W, IW, INFO )
00289 CALL CHKXER( 'SSPCON', INFOT, NOUT, LERR, OK )
00290 END IF
00291
00292
00293
00294 CALL ALAESM( PATH, OK, NOUT )
00295
00296 RETURN
00297
00298
00299
00300 END