如何执行或查看由 Fortran 程序生成的 .res 文件?

How to execute or view a .res file produced by a Fortran program?

我有一个用 fortran 编写的代码保存为 "DIET.F"

在我输入 $ g77 DIET.F 后,在与 DIET.F.

相同的目录中创建了一个名为 "a.out" 的文件

$ /a.out 之后创建了一个名为“126idi.res”的输出文件。

接下来我要发出什么命令才能运行 126idi.res?

我什至不确定我的问题是否完全有意义,这是我第一次使用 Fortran,我只需要 DIET.F 在终端中给我输出结果。

编辑:126idi.res 似乎是一个二进制文件。

编辑:DIET.F 包含以下代码:

    PROGRAM DIET

5   COMMON C(14,14,16)

    COMMON/CMN1/KAPPA,OMOM,MY,L2F(18)

    COMMON/KL/E(560),KV(560,2)

    COMMON/NUCL/Z,A,NUC,KIND

    COMMON/CMN2/EPS1,EPS2,EPS3,EPS4,EPS5,EPS6

    COMMON/PTR/F(57)

C   PROGRAM CJ WRITTEN BY B.S.NILSSON

C   KIND=0 FOR NEUTRONS, 1 FOR PROTONS

C   PRESENT OUTPUT VERSION FOR AT MOST SN=10 AND MAXIMUM 50 LEVELS

    INTEGER Z,A,NUC

    REAL KAPPA,MY,LL

    EXTERNAL CLEBI

    DATA NUC/'OS'/

c       OPEN(UNIT=5,FILE='in.out',STATUS='UNKNOWN') 

    OPEN(UNIT=6,FILE='126idi.res',STATUS='UNKNOWN')

    EPS1=0.

    EPS3=0.

    EPS5=0.

    EPS6=0.

    F(1)=1. 

    DO 101 I=1,56

101 F(I+1)=F(I)*FLOAT(I)*.1

    DO 102 I=1,14

*   PRINT*,I

    DO 103 J=1,14

C   TYPE*,J

    LMIN=1

    LMED=1

    LMAX=1

    DO 104 K=1,3

C   TYPE*,K

    LMIN=LMIN+2*K-1

    LMED=LMED+2*K

    LMAX=LMAX+2*K+1

    M=4*K

C   TYPE*,LMIN,LMAX,LMED

    DO 105 LM=LMIN,LMAX

    V1=CLEBI(2*(I-1),M,2*(I-1-2*(LMED-LM)),2*(J-1),0,2*(J-1))

    V2=CLEBI(2*(I-1),M,2*(I-1-2*(LMED-LM)),0,0,0)

C   TYPE1212,V1,V2

1212    FORMAT(' V1=',E15.6,' V2=',E15.6)

    C(I,J,LM)=V1*V2*.1

105 CONTINUE

104 CONTINUE

    C(I,J,1)=0.

103 CONTINUE

102 CONTINUE

    L2F(1)=0

    DO 106 I=1,17

106 L2F(I+1)=L2F(I)+I+1

200 CONTINUE

        NS=10

        KAPPA=0.0668

        MY=0.575

        KIND=1

201 CONTINUE

        NUC=I

        Z=53

        A=126

        EPS2=0.142

        EPS4=-0.007

        LL=5.2

        UL=7.5

C   PRINT STATEMENT SADDED BY JAC10/76

    WRITE(6,500)NS,KAPPA,MY,KIND

C   TYPE500,NS,KAPPA,MY,KIND

500 FORMAT(5X,5HNS=  ,I5,10X,8HKAPPA=  ,F6.4,10X,5HMY=  ,F6.4,10X,

     1  7HKIND=  ,I3)

    WRITE(6,501)A,NUC,Z,EPS2,EPS4,LL,UL

C   TYPE501,A,NUC,Z,EPS2,EPS4,LL,UL

501 FORMAT(5X,10HNUCLEUS=  ,I3,A2,10X,4HZ=  ,I3,10X,7HEPS2=  ,F10.3,/

     1  10X,7HEPS4=  ,F10.3,10X,5HLL=  ,F10.3,10X,5HUL=  ,F10.3)

    IF(Z)200,203,202

202 CONTINUE

    WRITE(6,11)A,NUC

C   TYPE11,A,NUC

11  FORMAT(1H1,5X,21HC>J-COEFFICIENTS OF  ,I3,A2)

    CALL ENCJF(NS,LL,UL,FE)

    IF(KIND.EQ.0)WRITE(6,12)A,NUC

C   IF(KIND.EQ.0)TYPE12,A,NUC

    IF(KIND.EQ.1)WRITE(6,17)A,NUC

C   IF(KIND.EQ.1)TYPE17,A,NUC

12  FORMAT(1H1,//,6X,19HNEUTRON LEVELS OF  ,I3,A2)

C   TYPE*,A,NUC

17  FORMAT(1H1,//,6X,18HPROTON LEVELS OF  ,I3,A2)

    WRITE(6,13)KAPPA,MY,EPS2,EPS4

C   TYPE13,KAPPA,MY,EPS2,EPS4

13  FORMAT(/,6X,'KAPPA=',F6.4,4X,'MY=',F5.3,4X,5HEPS2=,F6.3,4X

     1  ,5HEPS4=,F6.3)

    WRITE(6,14)

C   TYPE14

14  FORMAT(/////,7X,18HENERGY Q.NUMB.    ,4(9X,15HENERGY Q.NUMB. ),/)

    DO 20 I=1,45

    I45=I+45

    I90=I+90

    I135=I+135

    I180=I+180

    WRITE(6,15)I,E(I),KV(I,1),KV(I,2),I45,E(I45),KV(I45,1),KV(I45,2)

     1  ,I90,E(I90),KV(I90,1),KV(I90,2),I135,E(I135),KV(I135,1)

     2  ,KV(I135,2),I180,E(I180),KV(I180,1),KV(I180,2)

C   TYPE15,I,E(I),KV(I,1),KV(I,2),I45,E(I45),KV(I45,1),KV(I45,2)

C    1  ,I90,E(I90),KV(I90,1),KV(I90,2),I135,E(I135),KV(I135,1)

C    2  ,KV(I135,2),I180,E(I180),KV(I180,1),KV(I180,2)

15  FORMAT(I4,F9.3,I4,2H/2,A2,4(I7,F9.3,I4,2H/2,A2))

20  CONTINUE

    WRITE(6,16)FE

C   TYPE16,FE

16  FORMAT('ALL ENERGIES IN MEV, 1 OSCILLATOR UNITIS',F7.4,4HMEV )

        EMMN=LL*FE

        EMMX=UL*FE

        WRITE(6,901)EMMN,EMMX

901     FORMAT('ENERGY LIMITS FOR WAVE FUNCTION PRINT',2F9.3)     

C   GOTO 201

203 CONTINUE

    CLOSE(UNIT=6)

    STOP

    END

C   ******************************************************

c       Original program only 5,6 

C   ******************************************************

    SUBROUTINE CJP(OMEGA,MORD,W)

C   CALCULATES CJ-COEFFIIENTS,DECOUPLING PARAMETER AND MATRIX

C   1ELEMENTS OF J-

C   BETWEEN ALL POSSIBLE LEVELS

    DIMENSION W(56,56),C(14),C2(14),IN(25),CF(80,11,11),COR(14)

    COMMON /E/ NYS,IQ,I,K,LEV,LEV1,LEV2,LEV3

    COMMON /KL/ EV(560),KV(560,2)

    DO 20 N=1,25

20  IN(N)=N

    LE=LEV2-LEV1

    NYS=NYS+1

    WRITE(6,10) LEV,KV(IQ,1),KV(IQ,2),EV(IQ)

C   TYPE 10, LEV,KV(IQ,1),KV(IQ,2),EV(IQ)

10  FORMAT(///,6X,8HLEVEL NO,I3,I5,2H/2,A4,6HENERGY,F8.2,4H MEV)

    WRITE(6,11)

C   TYPE 11

11  FORMAT(/,6X,'WAVE FUNTION')

    WRITE(6,12) (W(N,I),N=1,MORD)

C   TYPE 12, (W(N,I),N=1,MORD)

 12 FORMAT(10F11.5)

    NL=IFIX(2.*OMEGA)

    K21=2*K+1

    WRITE(6,13) (IN(N),N=NL,K21,2)

C   TYPE 13, (IN(N),N=NL,K21,2)

13  FORMAT(/,'  N  J%',I2,2H/2,10(6X,I2,2H/2))

    DO 21 N=1,14

    C(N)=0.

    COR(N)=0.

21  C2(N)=0.

    NN=0

    N=K

22  CONTINUE

    DO  31 MM=1,2

    RM=0.5-FLOAT(MM-1)

    IF(OMEGA-RM.GT.FLOAT(N)+0.1) GOTO 32

    LAM=IFIX(OMEGA-RM)

    L=N

    DO 34 LL=1,100

    NN=NN+1

    RJ=FLOAT(L)+0.5

    IJ=IFIX(2.*RJ)

    MI=IFIX(2.*RM)

    MOM=IFIX(2.*OMEGA)

    IF(ABS(W(NN,I)).LT.1.E-16) W(NN,I)=0.0

    CLE=CLEBI(2*L,1,IJ,2*LAM,MI,MOM)

    IF(ABS(CLE).LT.1.E-16) CLE=0.0

    C(L+1)=C(L+1)+W(NN,I)*CLE*0.3162278

    RJ=RJ-1.

    IJ=IFIX(2.*RJ)

    IF(RJ) 340,340,35

35  IF(ABS(W(NN,I)). LT.1.E-16)  W(NN,I)=0.0

    CLE=CLEBI(2*L,1,IJ,2*LAM,MI,MOM)

    IF(ABS(CLE).LT.1.E-16) CLE=0.0

    C(L)=C(L)+W(NN,I)*CLE*0.3162278

340 L=L-2

    IF(L.LT.LAM) GO TO 33

34  CONTINUE

33  CONTINUE

32  CONTINUE

31  CONTINUE

    IOM=IFIX(OMEGA+0.5)

    NLIM=N+1

    DO 36 J=IOM,NLIM

    IF(ABS(C(J)).LT.1.E-16) C(J)=0.

    CF(LEV,J,NLIM)=C(J)

    IF(LE) 360,360,37

37  DO 38 IJ=1,LE

    LI=IJ+LEV1

38  COR(IJ)=COR(IJ)+C(J)*CF(LI,J,NLIM)*SQRT(FLOAT(J*J-(IOM-1)**2))

360 IF(OMEGA-1.) 361,361,36

361 LEM=LEV-LEV3

    DO 362 IJ=1,LEM

    SIG=1.

    IF(MOD(J,2).NE.0) SIG=-1.

    LI=LEV3+IJ

362 COR(IJ)=COR(IJ)+C(J)*CF(LI,J,NLIM)*FLOAT(J)*SIG

36  C2(J)=C2(J)+C(J)*C(J)

    WRITE(6,14) N,(C(J),J=IOM,NLIM)

C   TYPE 14,N,(C(J),J=IOM,NLIM)

14  FORMAT(I4,F11.4,10(F10.4))

    DO 39 IJ=1,14

39  C(IJ)=0.

    N=N-2

    IF(N.GE.IOM-1) GO TO22

    K1=K+1

    WRITE(6,15) (C2(J),J=IOM,K1)

C   TYPE 15, (C2(J),J=IOM,K1)

15  FORMAT(5H  C2J,11(F10.4))

    IF(OMEGA-1.) 40,40,43

40  DEC=-COR(LEM)

    LEMM=LEM-1

    IF(LEMM.LE.0) GO TO 411

    DO 41IJ=1,LEMM

    LI=IJ+LEV3

    WRITE(6,18) LI,LEV,COR(IJ)

C   TYPE 18, LI,LEV,COR(IJ)

41  CONTINUE

411 WRITE(6,16) DEC

C   TYPE 16, DEC

 16 FORMAT(6X,17HDECOUPLING FACTOR,F10.4)

    RETURN

43  IF(LE) 44,44,45

44  WRITE(6,17)

C   TYPE 17

17  FORMAT(/////)

    RETURN

45  DO 46 IJ=1,LE

    LI=IJ+LEV1

    WRITE(6,18) LI,LEV,COR(IJ)

C   TYPE 18, LI,LEV,COR(IJ)

18  FORMAT(40H  MATRIX ELEMENT OF J- BETWEEN LEVELS NO,I4,

     +  ' AND',I4,'IS',F10.4)

46  CONTINUE

    RETURN

    END

C   ************************************************************

    SUBROUTINE ENCJF(SN,LL,UL,F)

    INTEGER SN,Q,ORD1,ORD2,ORD,Z,A

    REAL LL,OMEGA,M,M1,M2, KAPPA,MY

    DIMENSION M(56,56),M1(14,14),M2(14,14),E(56),KVH(2),W(56,56)

    COMMON /CMN2/EPS1,EPS2,EPS3,EPS4,EPS5,EPS6

    COMMON /E/NYS,IQ,I,K,LEV,LEV1,LEV2,LEV3

    COMMON/KL/EV(560),KV(560,2)

    COMMON /CMN1/KAPPA,OMOM,MY,L2F(18)

    COMMON/NUCL/ Z,A,NUC,KIND

    DATA KVH/'+   ',' -  '/

    CALL OME(10,OMOM,1.0E-6)

    LEV=0

    LEV1=0

    LEV2=0

    LEV3=0

    Q=0

    ORD1=((SN+4)*SN+4)/4

    NYS=0

    FF=2.-FLOAT(Z)/FLOAT(A)

    IF(KIND.EQ.1) FF=1.+FLOAT(Z)/FLOAT(A)

    F=41.*FLOAT(A)**(-0.333333)*OMOM*FF*0.666667

    IO2MX=2*SN+1

        DO 201 IO2=1,IO2MX,2

    OMEGA=.5*FLOAT(IO2)

    DO 203 KK=1,2

    K=SN+1-KK

    IF(K.LT.IFIX(OMEGA-0.4)) GOTO 219

    DO 204 I=1,ORD1

    DO 205 J=I,ORD1

    M(J,I)=0.

    M(I,J)=0.

205 CONTINUE

204 CONTINUE

    CALL DM(K,OMEGA,M1,ORD1)

    ORD2=0

    DO  206 I=1,ORD1

    DO 207 J=I,ORD1

    M(I,J)=M1(I,J)

207 M(J,I)=M(I,J)

206 CONTINUE

    NNMX=((IFIX(OMEGA-0.4)-(K-2))/(-2)+1)

    IF(NNMX.LT.1) GOTO 209

    DO 208 NN=1,NNMX

    N=K-2*NN

    CALL DM(N,OMEGA,M1,ORD)

    CALL IDM(N,OMEGA,M2)

    DO 300 J=1,ORD

    JO=ORD1+J

    IOR2=ORD+2

    DO 301 I=1,IOR2

    IO=ORD2+I

    M(JO,IO)=M2(I,J)

301 M(IO,JO)=M2(I,J)

    DO 302 I=1,J

    IO=ORD1+I

    M(IO,JO)=M1(I,J)

302 M(JO,IO)=M1(I,J)

300 CONTINUE

    ORD2=ORD1

    ORD1=ORD1+ORD

208 CONTINUE

209 CONTINUE

    CALL JACOB(M,W,ORD1,1.E-6)

    DO 400 I=1,ORD1

    E(I)=F*M(I,I)

    IQ=I+Q

    EV(IQ)=E(I)

    KV(IQ,1)=IFIX(2.*OMEGA)

    KV(IQ,2)=KVH(1)

    IF(MOD(K,2).NE.0) KV(IQ,2)=KVH(2)

    IF(E(I).LT.LL*F.OR.E(I).GT.UL*F) GO TO 402

    LEV=LEV+1

401 IF(NYS.NE.3) GOTO 403

    WRITE(6,10) A,NUC

C   TYPE 10, A,NUC

10  FORMAT(//,5X,21HC>J-COEFFICIENTS OF  ,I3,A2,10H    >CCNT.,//)

    NYS=0

403 CALL CJP(OMEGA,ORD1,W)

402 CONTINUE

400 CONTINUE

    LEV1=LEV2

    LEV2=LEV3

    LEV3=LEV

    Q=Q+ORD1

203 CONTINUE

219 CONTINUE

201 CONTINUE

    CALL SORT2I(EV,KV,Q)

    RETURN

    END

C   *****************************************************************

    SUBROUTINE SORT2I(X,KV,N)

    DIMENSION X(560),KV(560,2)

    INTEGER Y1,AY2

    ID=2**INT(1.4427*ALOG(FLOAT(N-1)))-1

1   IF(ID.LE.0) RETURN

    I=1

2   J=I

    IPD=I+ID

    Y=X(IPD)

    Y1=KV(IPD,1)

    Y2=KV(IPD,2)











3   IF(Y.LT.X(J)) GO TO 4

5   JPD=J+ID

    X(JPD)=Y

    KV(JPD,1)=Y1

    KV(JPD,2)=Y2

    I=I+1

    IF(I+ID.LE.N) GO TO 2

    ID=(ID-1)/2

    GOTO 1

4   JPD=J+ID

    X(JPD)=X(J)

    KV(JPD,1)=KV(J,1)

    KV(JPD,2)=KV(J,2)

    J=J-ID

    IF(J.GE.1) GO TO 3

    GO TO 5

    END

C   *********************************************************

    FUNCTION   T(N,LP,LAMP,MP,L,LAM,M)

    COMMON C(14,14,16)

    COMMON/CMN2/EPS1,EPS2,EPS3,EPS4,EPS5,EPS6

    REAL MP,M

    T=0.0

    IF(LAMP.NE.LAM) RETURN

    IF  (MOD(LP-L,2) .NE.0) RETURN

    IF(IABS(LP-L).GT.6) RETURN

    X=FLOAT(N)

    Y=FLOAT(L)

    Z=FLOAT(LP)

    I=(LP-L)/2

    I7=I+7

    I13=I+13

    E6=-C(L+1,LAM+1,I13)*EPS6

    IF(IABS(I).LE.2) E4=C(L+1,LAM+1,I7)*EPS4

    I=I+4

    W=(Y+Y+1.)/(Z+Z+1.)

    GO TO (436,434,431,433,432,435,437),I

431 T=SQRT(W*(X-Y+4.0)*(X-Y+2.0)  )*0.5*(E4-E6)

    RETURN

432 T=SQRT(W*(X+Y+3.0)*(X+Y+5.0) )*0.5*(E4-E6)

    RETURN

433 T=SQRT(W*(X-Y+2.0)*(X+Y+3.0) )*0.5*(E4-E6)

    RETURN

434     T=SQRT(W*(X-Y+6.0)*(X-Y+4.0)*(X-Y+2.0)/(X+Y+1.0) )*0.5*(E4-E6)

    RETURN

435 T=SQRT(W*(X-Y     )/(X+Y+7.0)/(X+Y+5.0)/(X+Y+3.0)  )*0.5*(E4-E6)

     +   *(X*(X+4.0*Y+15.0)+Y*FLOAT(7*L+45)+71.)

    RETURN

436 T=-SQRT(W*(X-Y+8.0)*(X-Y+6.0)*(X-Y+4.0)*(X-Y+2.0)/(X+Y+1.0)

     +   /(X+Y-1.0) )*0.5*E6

    RETURN

437 T=-SQRT(W*(X-Y   )*(X-Y-2.0)/(X+Y+9.0)/(X+Y+7.0)/(X+Y+5.0)

     +   /(X+Y+3.0) )*0.5*(X*(X+6.0*Y+26.0)+Y*(17.0*Y+134.0)+258.0)*E6

    RETURN

    END

C   ************************************************************************

    SUBROUTINE IDM(N,OMEGA,S)

    INTEGER N

    REAL OMEGA

    DIMENSION S(14,14)

    INTEGER LP,LAMP,L,LAM,I,J

    REAL MP,M

    I=0

    DO 311 MMP=1,2

    MP=0.5+FLOAT (MMP-1)*(-1.0)

    IF(OMEGA-MP .GT.FLOAT(N+2)  + 0.1) GO TO 319

    LAMP=IFIX(OMEGA-MP)

    LP=N+2

    DO 312 LLP=1,1000

    I=I+1

    J=0

    DO 313 MM =1,2

    M=0.5+FLOAT(MM-1)*(-1.0)

    IF (OMEGA-M.GT.FLOAT(N)  +0.1) GO TO 318

    LAM=IFIX(OMEGA-M)

    L=N

    DO 314 LL=1,1000

    J=J+1

    S(I,J)=T(N,LP,LAMP,MP,L,LAM,M)

    L=L-2

    IF(L  .LT.LAM) GO TO 315

314 CONTINUE

315 CONTINUE

318 CONTINUE

313 CONTINUE

    LP=LP-2

    IF(LP.LT.LAMP) GO TO 316

312 CONTINUE

316 CONTINUE

319 CONTINUE

311 CONTINUE

    RETURN

    END

C   *****************************************************

    FUNCTION U(N,LP,LAMP,MP,L,LAM,M)

    COMMON C(14,14,16)

    COMMON/CMN2/EPS1,EPS2,EPS3,EPS4,EPS5,EPS6

    REAL MP,M

    U=0.0

    IF(LAMP.NE.LAM) RETURN

    IF(MOD(LP-L,2).NE.0) RETURN

    IF(IABS(LP-L).GT.6) RETURN

    X=FLOAT(N)

    Y=FLOAT(L)

    Z=FLOAT(LP)

    I=(LP-L)/2

    I3=I+3

    I7=I+7

    I13=I+13

    E6=-C(L+1,LAM+1,I13)*EPS6

    IF(IABS(I).LE.2) E4=C(L+1,LAM+1,I7)*EPS4

    IF(IABS(I).LE.1) E2=(2.0/3.0)*C(L+1,LAM+1,I3)*EPS2

    I=I+4

    GO TO (406,404,401,403,402,405,407),I

401 U=-SQRT(  (X-Y+2.0)*(X+Y+1.0)*(Y+Y+1.0)/(Z+Z+1.0)  )*(E2-E4+E6)

    RETURN

402 U=-SQRT(  (X-Y   )*(X+Y+3.0)*(Y+Y+1.0)/(Z+Z+1.0)  )*(E2-E4+E6)

    RETURN

403 U=-(X+1.5)*SQRT(             (Y+Y+1.0)/(Z+Z+1.0) )*(E2-E4+E6)

    RETURN

404 U=SQRT(  (Y+Y+1.0)/(Z+Z+1.0)*(X-Y+4.0)*(X-Y+2.0)

     +   /(X+Y-1.0)/(X+Y+1.0))*(X+Y+Y-1.5)*(E4-E6)

    RETURN

405 U=SQRT( (Y+Y+1.0)/(Z+Z+1.0)*(X-Y   )*(X-Y-2.0)

     +   /(X+Y+3.0)/(X+Y+5.0))*(X+Y+Y+6.5)*(E4-E6)

    RETURN

406 U=-SQRT( (Y+Y+1.0)/(Z+Z+1.0)*(X-Y+6.0)*(X-Y+4.0)*(X-Y+2.0)

     +  /(X+Y+1.0)/(X+Y-1.0)/(X+Y-3.0))*(X+3.0*Y-6.0)*E6

    RETURN

407 U=-SQRT( (Y+Y+1.0)/(Z+Z+1.0)*(X-Y  )*(X-Y-2.0)*(X-Y-4.0)

     +    /(X+Y+7.0)/(X+Y+5.0)/(X+Y+3.0))*(X+3.0*Y+12.0)*E6

    RETURN

    END

C   *******************************************************************

    SUBROUTINE OME(NNN,OMOM,NYI)

    COMMON/CMN2/EPS1,EPS2,EPS3,EPS4,EPS5,EPS6

    REAL NYI,NY

    INTEGER T

    REAL I

    EXTERNAL F1

    NY=NYI

    T=NNN

    GO TO 332

331 T=2*T

332 CALL SIMPS(-1.0,1.0,T,F1,NY,I,IFLAG,0)

    IF(IFLAG.NE.0) GO TO 331

    OMOM=(0.5*I/(1.0+EPS2/3.0)/SQRT(1.0-2.0*EPS2/3.0))**(.3333333)

    RETURN

    END

C   ***************************************************:

    FUNCTION R2(N,LP,LAMP,MP,L,LAM,M)

    REAL MP,M

    IF( (LP.NE.L).OR.(LAMP.NE.LAM)) GO TO 421

    R2=FLOAT(L*(L+1))

    RETURN

421 R2=0

    RETURN

    END

C   *************************************************

    FUNCTION F1(XI)

    COMMON/CMN2/EPS1,EPS2,EPS3,EPS4,EPS5,EPS6

    X=XI

2   AMN=(((((28.875*EPS6*X+15.75*EPS5)*X+(EPS4*8.75-39.375*EPS6))*X

     +   +(5.0*EPS3-17.5*EPS5))*X+(13.125*EPS6-7.5*EPS4-EPS2))*X+

     +    (EPS1*2.0-3.0*EPS3+3.75*EPS5))*X+1.0+EPS2/3.0+0.75*EPS4

     +   -0.625*EPS6

    F1=AMN**(-1.5)

    RETURN

    END

C   ***************************************************

    SUBROUTINE DM(N,OMEGA,R,ORD)

    INTEGER N,ORD

    REAL OMEGA

    DIMENSION R(14,14)

    INTEGER LP,LAMP,L,LAM,I,J

    REAL MP,M

    COMMON/CMN1/KAPPA,OMOM,MY,L2F(18)

    REAL KAPPA,MY

    I=0

    DO 301 MMP=1,2

    MP=0.5+FLOAT(MMP-1)*(-1.0)

    IF(OMEGA-MP .GT.FLOAT(N) + 0.1) GO TO 309

    LAMP=IFIX(OMEGA-MP)

    LP=N

    DO 302 LLP=1,1000

    I=I+1

    J=0

    DO 303 MM=1,2

    M=0.5+FLOAT(MM-1)*(-1.0)

    IF(OMEGA-M.GT.FLOAT(N)+0.1) GO TO 308

    LAM=IFIX(OMEGA-M)

    L=N

    DO 304 LL=1,1000

    J=J+1

    IF(J-I) 201,200,200

200     R(I,J)=U(N,LP,LAMP,MP,L,LAM,M)-KAPPA/OMOM*(2.0*

     +    RS(N,LP,LAMP,MP,L,LAM,M)+MY*R2(N,LP,LAMP,MP,L,LAM,M))

    R(J,I)=R(I,J)

    IF(I .EQ.J) R(I,J)=R(I,J)  +1.5+KAPPA/OMOM*MY*FLOAT(L2F(N+1))

     +     +FLOAT(N)

201 L=L-2

    IF (L .LT.LAM) GO TO 305

304 CONTINUE

305 CONTINUE

308 CONTINUE

303 CONTINUE

    LP=LP-2

    IF(LP.LT.LAMP) GO TO 306

302 CONTINUE

306 CONTINUE

309 CONTINUE

301 CONTINUE

    ORD=I

    RETURN

    END

C   *****************************************************

    FUNCTION RS(N,LP,LAMP,MP,L,LAM,M)

    REAL MP,M

    IF((L.NE.LP).OR.(LAM.NE.LAMP)) GO TO 411

    RS=FLOAT(LAM)*M

    RETURN

411 IF((L.NE.LP).OR.(LAMP.NE.LAM-1)) GO TO412

    RS=SQRT(FLOAT((L+LAM)*(L-LAM+1)))/2.0

    RETURN

412 IF((L.NE.LP).OR.(LAMP.NE.LAM+1)) GO TO413

    RS=SQRT(FLOAT((L-LAM)*(L+LAM+1)))/2.0

    RETURN

413 RS=0.0

    RETURN

    END

C   *************************************************************

    FUNCTION CLEBI(I1,I2,I3,N1,N2,N3)

    COMMON/PTR/ FCT(57)

    INTEGER  Z,ZMIN,ZMAX

    J1=I1

    J2=I2

    J=I3

    N=57

    M1=N1

    M2=N2

    M=-N3

    CC=0.0

    JSUM=J1+J2+J

    JM1=J1-IABS(M1)

    JM1=J1-IABS(M1)

    JM2=J2-IABS(M2)

    JM3=J-IABS(M)

    IF((MOD(JSUM,2).NE.0).OR.(MOD(JM1,2).NE.0).OR.(MOD(JM2,2).NE.0)

     +  .OR.(MOD(JM3,2).NE.0).OR.(JM1.LT.0).OR.(JM2.LT.0).OR.(JM3.LT.0))

     +   GO TO 1

    IF((M1+M2+M.NE.0).OR.(J.GT.J1+J2).OR.(J.LT.IABS(J1-J2))) GO TO 1

    ZMIN=0

    IF(J-J2+M1.LT.0) ZMIN=-J+J2-M1

    IF(J-J1-M2+ZMIN.LT.0) ZMIN=-J+J1+M2

    ZMAX=J1+J2-J

    IF(J2+M2-ZMAX.LT.0) ZMAX=J2+M2

    IF(J1-M1-ZMAX.LT.0) ZMAX=J1-M1

    JA=(J1+M1)/2+1

    JB=JA-M1

    JC=(J2+M2)/2+1

    JD=JC-M2

    JE=(J +M)/2+1

    JF=JE-M

    JG=(J1+J2-J)/2+1

    JH=JA+JB-JG

    JI=JC+JD-JG

    JJ=JE+JF+JG-1

    IF(JJ.GT.N) GO TO 5

    IA=ZMIN/2

    IB=JG-IA+1

    IC=JB-IA+1

    ID=JC-IA+1

    IE=JA-JG+IA

    IF=JD-JG+IA

    FASE=1.0

    IF(MOD(IA,2).EQ.0) FASE=-FASE

    Z=ZMIN

2   IA=IA+1

    IB=IB-1

    IC=IC-1

    ID=ID-1

    IE=IE+1

    IF=IF+1

    FASE=-FASE

    CC=CC+FASE/(FCT(IA)*FCT(IB)*FCT(IC)*FCT(ID)*FCT(IE)*FCT(IF))

    Z=Z+2

    IF(Z.LE.ZMAX) GO TO 2

    FASE=SIGN(1.0,CC)

    CC=FASE*SQRT(CC*FCT(JA)*FCT(JB)*FCT(JC)*FCT(JD)*FCT(JE)*CC*

     +  FCT(JF)*FCT(JG)*FCT(JH)*FCT(JI)/FCT(JJ)*FLOAT(J+1))

   1    CLEBI=CC

    RETURN

C 3 WRITE>6,4

C 4 FORMAT>26H0 ERROR IN ARGUMENT OF VCC

C   GO TO 7

  5 WRITE(6,6)

  6     FORMAT(' ERROR -FACTORIALS EXCEEDED')

  7 WRITE(6,8)I1,I2,I3,N1,N2,N3

C   TYPE 8,I1,I2,I3,N1,N2,N3

  8 FORMAT(10I10)

    RETURN

    END

C   ******************************************************

    SUBROUTINE SIMPS  (A,B,NI,F,NY,I,IFLAG,ISW)

C   IF >ISW.EQ.0 ,RETURNS.IFLAG%>1 IF TOLERANCE NOT MET,0 IF MET

C   IF>ISW.NE.0,ITERATES UNTIL TOLERANCE MET.IFLAG IGNORED.

    EXTERNAL F

    REAL NY,I

    REAL H,S1,S2,S3,I1,I2

    N=NI

    H=(B-A)/4.0/FLOAT(N)

    I2=F(B)-F(A)

    I1=I2

    S3=0.0

    S2=S3

    S1=S2

    N4=4*N

    DO 442 IP=4,N4,4

    S1=S1+F(A+H*FLOAT(IP-2))

    S2=S2+F(A+H*FLOAT(IP-4))

442 CONTINUE

441 CONTINUE

    DO 443 IP=2,N4,2

    S3=S3+F(A+H*FLOAT(IP-1))

443 CONTINUE

    I1=(I1+4.0*S1+2.0*S2)*H/1.5

    I2=(I2+4.0*S3+2.0*S1+2.0*S2)*H/3.0

    N=N*2

    N4=4*N

    H=H/2.0

    IF  (ABS(I1-I2) .LE.NY) GO TO 444

    I2=F(B)-F(A)

    I1=I2

    S2=S1+S2

    S1=S3

    S3=0.0

    IFLAG=1

    IF (ISW.EQ.0) RETURN

    GO TO 441

444 I=(16.0*I2-I1)/15.0

    IFLAG=0

    RETURN

    END

C   ************************************************



    SUBROUTINE JACOB(A,S,N,RHO)

C



C         JACOBI DIAGONALISATION

    DIMENSION A(56,56),S(56,56)

    INTEGER P,Q,Q1

    REAL INT1,NORM1,MU,NORM2

    DO 1 I=1,N

    I1=I-1

    DO 2 J=1,I1

    S(I,J)=0.0

2       S(J,I)=0.0

1   S(I,I)=1.0

    IF(N-1) 11,10,11

11  INT1=0.0

    DO 3 I=2,N

    I1=I-1

    DO 3 J=1,I1

    IF(ABS(A(I,J)).LT.1.E-16) A(I,J)=0.0

3   INT1=INT1+2.0*A(I,J)*A(I,J)

    IF(INT1-RHO)10,12,12

12  NORM1=SQRT(INT1)

    NORM2=(RHO/FLOAT(N))*NORM1

    THR=NORM1

    IND=0

4   THR=THR/FLOAT(N)

5   DO 6 Q=2,N

    Q1=Q-1

    DO 6 P=1,Q1

    IF(ABS(A(P,Q))-THR) 6,13,13

13  IND=1

    V1=A(P,P)

    V2=A(P,Q)

    IF(ABS(V2).LT.1.E-16) V2=0.0

    V3=A(Q,Q)

    MU=0.5*(V1-V3)

    IF(MU) 14,15,15

15  SGN=1.0

    GO TO 16

14  SGN=-1.0

16  OMEGA=-SGN*V2/SQRT(V2*V2+MU*MU)

    SK=SQRT ( 1.0-OMEGA*OMEGA )

    SINT=OMEGA/SQRT(2.0*(1.0+SK  ) )

    COST=SQRT(1.0-SINT*SINT)

    DO 7 I=1,N

    AIP=A(I,P)

    IF(ABS(AIP).LT.1.E-16) AIP=0.

    AIQ=A(I,Q)

    IF(ABS(AIQ).LT.1.E-16) AIQ=0.

    INT1=AIP*COST-AIQ*SINT

    A(I,Q)=AIP*SINT+AIQ*COST

    A(I,P)=INT1

    AIP=S(I,P)

    IF(ABS(AIP).LT.1.E-16) AIP=0.

    AIQ=S(I,Q)

    IF(ABS(AIQ).LT.1.E-16) AIQ=0.

    INT1=AIP*COST-AIQ*SINT

    S(I,Q)=AIP*SINT+AIQ*COST

7   S(I,P)=INT1

    DO 8 I=1,N

    A(P,I)=A(I,P)

8   A(Q,I)=A(I,Q)

    A(P,P)=V1*COST*COST+V3*SINT*SINT-2.0*V2*SINT*COST

    A(Q,Q)=V1*SINT*SINT+V3*COST*COST+2.0*V2*SINT*COST

    A(P,Q)=(V1-V3)*SINT*COST+V2*(COST*COST-SINT*SINT)

    A(Q,P)=A(P,Q)

6   CONTINUE

    IF(IND-1) 17,9,17

17  IND=0

    GO TO 5

9   IF(THR-NORM2) 10,10,4

10  RETURN

    END

diet.f 包含程序的源代码。它包含人类可读格式的所有命令。在 g77 之后,你得到了一个 a.out 这是同一个程序,但是是机器可读的格式。这个你可以实际执行 (运行) 并且它为你做了一些事情。好像生成了126.res文件

由于该程序旨在执行某项操作,因此您可能感兴趣的全部内容都位于该 res 文件中。尝试在记事本、vim、nano、mcedit、hexview 或任何通用编辑器等程序中打开它。看看那个文件里面有什么。如果它是一个文本文件,您会注意到它,然后只需阅读其中的内容即可。可能是一些结果或错误消息。否则,你会看到乱七八糟的奇怪字符。如果发生这种情况,那么 res 文件很可能是程序所需的一些中间文件。在这种情况下,如果不查看 DIET.F 文件并检查它应该做什么以及如何做,至少我不能告诉你更多。其他人可能无法告诉你更多。

为了帮助其他人回答您,请尝试通过一些细节改进您的问题: - 描述你从哪里得到 DIET.F 文件,以便其他人可以查看它,或将其附加到问题中 - 告诉我们您是如何 运行 a.out 程序的(您是否传递了任何参数或配置?) - 告诉我们程序在屏幕上写了什么,如果有的话 - 您还可以附上那个 .res 文件,或者至少附上它的前 lines/blocks

顺便问一下,您是从哪里得知 "running the 126idi.res" 的? DIET.F 的文档中是否有描述?

顺便说一句。如果你没有像 vim 或 nano 或记事本这样的 viewer/editor,你可以尝试通过以下方式将 res 文件写到终端:cat 126idi.restype 126idi.res,但是如果它不是文本文件,这有时会使您的终端死锁,所以..最好用一些文件查看器检查它。