Note that there are some explanatory texts on larger screens.

plurals
  1. POFORTRAN IV/66 program stalls in DO loops
    text
    copied!<p>I copied a FORTRAN IV program from a thesis, so it presumably worked at the time it was written. I compiled it with gfortran. When running, it stalls in an integration subroutine. I have tried easing off the residuals but to no avail. I am asking for help because (presuming no mistakes in code) gfortran might not like the archaic 66/IV code, and updating it is outside my abilities.</p> <p>The program gets stuck by line 9, so I wonder if the DO loops are responsible. Note, lines 1 and 6 are unusual to me because ',1' has been added to the ends: e.g. =1,N,1. </p> <p>I don't think it's necessary to show the FUNC subroutine called on line 5 but am happy to provide it if necessary.</p> <p>If you need more detailed information I am happy to provide it.</p> <pre><code>00000001 13 DO 22 TDP=QDP,7,1 00000002 TD=TDP-1 00000003 X=X0+H0 00000004 IF(TD.EQ.QD) GOTO 15 00000005 CALL FUNC(N,DY,X,Y,J) 00000006 15 DO 21 RD=1,N,1 00000007 GOTO (120,121,122,123,124,125,126),TDP 00000008 120 RK(5*N*RD)=Y(RD) 00000009 GOTO 21 00000010 121 RK(RD)=HD*DY(RD) 00000011 H0=0.5*HD 00000012 F0=0.5*RK(RD) 00000013 GOTO 20 00000014 122 RK(N+RD)=HD*DY(RD) 00000015 F0=0.25*(RK(RD)+RK(N+RD)) 00000016 GOTO 20 00000017 123 RK(2*N+RD)=HD*DY(RD) 00000018 H0=HD 00000019 F0=-RK(N+RD)+2.*RK(2*N+RD) 00000020 GOTO 20 00000021 124 RK(3*N+RD)=HD*DY(RD) 00000022 H0=0.66666666667*HD 00000023 F0=(7.*RK(RD)+10.*RK(N+RD)+RK(3*N+RD))/27. 00000024 GOTO 20 00000025 125 RK(4*N+RD)=HD*DY(RD) 00000026 H0=0.2*HD 00000027 F0=(28.*RK(RD)-125.*RK(N+RD)+546.*RK(2*N+RD)+54.*RK(3*N+RD)- 00000028 1378.*RK(4*N+RD))/625. 00000029 GOTO 20 00000030 126 RK(6*N+RD)=HD*DY(RD) 00000031 F0=0.1666666667*(RK(RD)+4.*RK(2*N+RD)+RK(3*N+RD)) 00000032 X=X0+HD 00000033 ER=(-42.*RK(RD)-224.*RK(2*N+RD)-21.*RK(3*N+RD)+162.*RK(4*N+RD) 00000034 1+125.*RK(6*N+RD))/67.2 00000035 YN=RK(5*N+RD)+F0 00000036 IF(ABS(YN).LT.1E-8) YN=1 00000037 ER=ABS(ER/YN) 00000038 IF(ER.GT.G0) GOTO 115 00000039 IF(ED.GT.ER) GOTO 20 00000040 QD=-1 00000041 20 Y(RD)=RK(5*N+RD)+F0 00000042 21 CONTINUE 00000043 22 CONTINUE </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload