PSSE用户模型编译错误

问题描述 投票:0回答:1

我刚开始学习PSSE模型写作。作为一个起点,我尝试在Programe Operation Manuel页面21-16中编译PSSE示例,并得到以下错误。我用的是环境。经理,似乎Microsoft visual studio 2010和Intel visual fortran 15.0的所有路径和库都设置正确。我还将PATH设置为PSSBIN文件夹,将LIB设置为PSSLIB。任何人都可以建议我哪里出错了?

The model code:
      SUBROUTINE DEMOEX(I,ISLOT)
C
      INCLUDE 'COMON4.INS'
C
      INTEGER I,ISLOT
C
C   I = MACHINE ARRAY INDEX
C   ISLOT = ARRAY ALLOCATION TABLE INDEX
C   J = STRTIN(1,ISLOT) [ USES CON(J) THROUGH CON(J+2) ]
C   K = STRTIN(2,ISLOT) [ USES STATE(K) AND STATE(K+1) ]
C
      INTRINSIC MAX, ABS
      EXTERNAL BADMID, DOCUHD
C
      INTEGER IB, J, K, IBUS, JJ
      REAL VERROR
      LOGICAL NEW
      CHARACTER IM*2
C
      IF (MODE.EQ.8)
      . CON_DSCRPT(1)='Tr'
      . CON_DSCRPT(2)='K'
      . CON_DSCRPT(3)='Te'
      . RETURN
      ...FIN
C
C    GET STARTING 'CON' AND 'STATE' INDICES
C
      J=STRTIN(1,ISLOT)
      K=STRTIN(2,ISLOT)
C
IF (MODE .GT. 4) GO TO 1000
C
C   BUS SEQUENCE NUMBER NEGATIVE IF MACHINE
C   IS OFF-LINE, SVS OR INDUCTION MACHINE
C
      IB=NUMTRM(I)
      IF (IB.LE.0) RETURN
C
      IF (MIDTRM) GO TO 900
      GO TO (100,200,300,400), MODE
C
C   MODE = 1 - INITIALIZE
C
 100  STATE(K)=ECOMP(I)
     STATE(K+1)=EFD(I)
     VREF(I)=ECOMP(I) + EFD(I)/CON(J+1)
     IF (EFD(I).LT.0.) WRITE(LPDEV,307) NUMBUS(IB),MACHID(I)
     RETURN
C
C    MODE = 2 - CALCULATE DERIVATIVES
C
 200  DSTATE(K)=(ECOMP(I)-STATE(K))/CON(J)
      VERROR=VREF(I)+VOTHSG(I)-STATE(K)
      DSTATE(K+1)=(CON(J+1)*VERROR-STATE(K+1))/CON(J+2)
      RETURN
C
C   MODE = 3 - SET EFD
C
 300  EFD(I)=MAX(STATE(K+1),0.)
      RETURN
C
C    MODE = 4 - SET NINTEG
C
 400  NINTEG=MAX(NINTEG,K+1)
      RETURN
C
C   MODE > 4
C
 1000 IM=MACHID(I)
      IB=ABS(NUMTRM(I))
      IBUS=NUMBUS(IB)
C
      IF (MODE.EQ.6) GO TO 2000
C
      TO PRINT-HEADING
C   .
      . UNLESS (NEW)
      . . NEW=.TRUE.
      . . CALL DOCUHD(*1900)
      . . WRITE(IPRT,97) IBUS,IM
      . ...FIN
C   .
      ...FIN
      END
 2000 END

错误消息:

 ifort /nologo /assume:buffered_io /traceback /libs:dll /threads /c /Qip /extend_source:132 /noaltparam
/fpscomp:logicals /Qprec /warn:nodeclarations /warn:unused /warn:truncated_source /Qauto /fp:source /iface:cvf
/define:DLLI /include:"C:\Program Files (x86)\PTI\PSSE33\PSSLIB" /object:"D:\IVF15test\DEMOEX.obj"
/module:"D:\IVF15test" "D:\IVF15test\DEMOEX.f"

 D:\IVF15test\DEMOEX.f(10): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: BLOCK
PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX TYPE BYTE CHARACTER CLASS ...
      IF (MODE.EQ.8)
 ------------------------^
 D:\IVF15test\DEMOEX.f(11): error #5082: Syntax error, found '.' when expecting one of: <LABEL>
<END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
      . CON_DSCRPT(1)='Tr'
 ----------^
 D:\IVF15test\DEMOEX.f(12): error #5082: Syntax error, found '.' when expecting one of: <LABEL>
<END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
      . CON_DSCRPT(2)='K'
 ----------^
 D:\IVF15test\DEMOEX.f(13): error #5082: Syntax error, found '.' when expecting one of: <LABEL>
<END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
      . CON_DSCRPT(3)='Te'
 ----------^
 D:\IVF15test\DEMOEX.f(14): error #5082: Syntax error, found '.' when expecting one of: <LABEL>
<END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
      . RETURN
 ----------^
 D:\IVF15test\DEMOEX.f(15): error #5082: Syntax error, found '.' when expecting one of: <LABEL>
<END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
      ...FIN
 ----------^
 D:\IVF15test\DEMOEX.f(18): error #5149: Illegal character in statement label field  [I]
 IF (MODE .GT. 4) GO TO 1000
 ^
 D:\IVF15test\DEMOEX.f(18): error #5149: Illegal character in statement label field  [F]
 IF (MODE .GT. 4) GO TO 1000
 -^
 D:\IVF15test\DEMOEX.f(18): error #5149: Illegal character in statement label field  [(]
 IF (MODE .GT. 4) GO TO 1000
 ---^
 D:\IVF15test\DEMOEX.f(18): error #5149: Illegal character in statement label field  [M]
 IF (MODE .GT. 4) GO TO 1000
 ----^
 D:\IVF15test\DEMOEX.f(18): error #5276: Unbalanced parentheses
 IF (MODE .GT. 4) GO TO 1000
 ---------------^
 D:\IVF15test\DEMOEX.f(15): catastrophic error: Could not recover from previous syntax error
 compilation aborted for D:\IVF15test\DEMOEX.f (code 1)
fortran
1个回答
0
投票

这不是Fortran Code,而是Flex Code。您必须将此代码翻译为Fortran。

© www.soinside.com 2019 - 2024. All rights reserved.