|
请求帮助!最近为了能够使用chemkinIII开源软件,学习了Fortran语言,但遇到如下问题。所用为intel Fortran+IVS
forrtl: severe (408): fort: (3): Subscript #1 of the array SWORK has value -858993460 which is less than the lower bound of 1
调试过程中,发现LDTEM,LEMAT始终为-858993460.
看到别人的贴子,采用SAVE命令,该值变为0,就出现 Value 0 which is less than the lower bound of 1。
从初始为-858993460后,在运行过程中,这两个值始终未改变。在调试的时候我将他们的值赋为1,又出现其他问题。
由于该源程序是从网上下载,不清楚别人有没有调整过。请大家提提意见,谢谢。
[Fortran] 纯文本查看 复制代码 SUBROUTINE DDASAC (RES,NSYS,T,Y,YPRIME,TOUT,
* INFO,ISEN,RTOL,ATOL,IDID,SWORK,LSW,
* RWORK,LRW,IWORK,LIW,RPAR,IPAR,
* JAC,DRES,DFDYP)
IMPLICIT DOUBLE PRECISION (A-H,O-Z), INTEGER (I-N)
C*****END precision > double
C-------------------------------------------------------------------
C This code solves a system of differential/algebraic
C equations of the form f(t,y,yprime;p)=0. where p is a
C parameter vector of time independent constants.
C If requested the code will also solve the following system
C of equations for the parametric sensitivity functions W(t) :
C
C (df/dyprime)*W'(t)+(df/dy)*W(t)+df/dp=0.
C
C where W(t):=dy/dp
C--------------------------------------------------------------------
LOGICAL DONE
EXTERNAL RES,JAC,DRES,DFDYP
DOUBLE PRECISION SWORK
DIMENSION Y(*), YPRIME(*), INFO(15),ISEN(5)
DIMENSION RWORK(*), IWORK(*), SWORK(*),RTOL(*), ATOL(*)
DIMENSION RPAR(*), IPAR(*)
COMMON/DDA001/NPD,NTEMP,
* LML,LMU,LMXORD,LMTYPE,
* LNST,LNRE,LNJE,LETF,LCTF,LIPVT
COMMON/DDA002/INDEX,NALG,IDFDP,ICALC,NPAR
DATA LTSTOP,LHMAX,LH,LTN,
* LCJ,LCJOLD,LHOLD,LS,LROUND,
* LALPHA,LBETA,LGAMMA,
* LPSI,LSIGMA,LDELTA
* /1,2,3,4,
* 5,6,7,8,9,
* 11,17,23,
* 29,35,41/
C
C First see if parametric sensitivity calculations
C have been requested by the user.
C
ICALC=ISEN(1)
[Fortran] 纯文本查看 复制代码 CALL DDASTP(TN,Y,YPRIME,NEQ,NSYS,
* RES,JAC,H,RWORK(LWT),INFO(1),IDID,RPAR,IPAR,
* RWORK(LPHI),RWORK(LDELTA),RWORK(LE),
* RWORK(LWM),IWORK(LIWM),
* RWORK(LALPHA),RWORK(LBETA),RWORK(LGAMMA),
* RWORK(LPSI),RWORK(LSIGMA),
* RWORK(LCJ),RWORK(LCJOLD),RWORK(LHOLD),
* RWORK(LS),HMIN,RWORK(LROUND),
* IWORK(LPHASE),IWORK(LJCALC),IWORK(LK),
* IWORK(LKOLD),IWORK(LNS),INFO(10),
* SWORK(LDTEM),SWORK(LEMAT),DRES,DFDYP) 在调试后,发现此行出现问题。
[Fortran] 纯文本查看 复制代码 SUBROUTINE DDASTP(X,Y,YPRIME,NEQ,NSYS,
* RES,JAC,H,WT,JSTART,IDID,RPAR,IPAR,
* PHI,DELTA,E,WM,IWM,
* ALPHA,BETA,GAMMA,PSI,SIGMA,
* CJ,CJOLD,HOLD,S,HMIN,UROUND,
* IPHASE,JCALC,K,KOLD,NS,NONNEG,
* DTEM,EMAT,DRES,DFDYP)
C-----------------------------------------------------------------
C DDASTP solves a system of differential and algebraic
C equations for one step, normally from t to t+h.
C-----------------------------------------------------------------
C*****precision > double
IMPLICIT DOUBLE PRECISION(A-H,O-Z), INTEGER (I-N)
C*****END precision > double
LOGICAL CONVGD
DIMENSION Y(*), YPRIME(*), WT(*), PHI(NEQ,*), DELTA(*), E(*)
DIMENSION DTEM(*), EMAT(*), WM(*), IWM(*)
DIMENSION PSI(*), ALPHA(*), BETA(*), GAMMA(*), SIGMA(*)
DIMENSION RPAR(*), IPAR(*)
EXTERNAL RES,JAC,DRES,DFDYP
COMMON/DDA001/NPD,NTEMP,
* LML,LMU,LMXORD,LMTYPE,
* LNST,LNRE,LNJE,LETF,LCTF,LIPVT
COMMON/DDA002/INDEX,NALG,IDFDP,ICALC,NPAR
DATA MAXIT/4/
DATA XRATE/0.25E0/
DATA ZERO/0.0E0/, PT25/0.25E0/, PT5/0.5E0/, PT9/0.9E0/ |
|