Help with Fortran IV to Fortran77 Conversion Errors

In summary, the conversation is about a problem with running a Fortran IV program using Fortran77. The compiler is showing errors due to differences in programming "tricks" allowed in earlier versions. The suggestion is to try compiling with the -ff66 option of g77, but the person is unable to find the necessary compiler. They also mention difficulty understanding the code due to comments being in a different character set.
  • #1
stefan_ss
18
0
I have a program written in Fortran IV and tryed to run it with fortran77(g77). Nevertheless
it could be not problem in fortran IV it make some errors in fortran77. I am not programmer but trying to learn some. Here is the errors that compiler fortran77 is wrote:

found.f: In program `MAIN__':
found.f:120:
DO 50 I=1,3
1
found.f:130: (continued):
DO 110 I=1,3
2
Attempt to modify variable `i' at (2) while it serves as DO-loop iterator at (1)
found.f:120:
DO 50 I=1,3
1
found.f:141: (continued):
DO 270 I=1,3
2
Attempt to modify variable `i' at (2) while it serves as DO-loop iterator at (1)
found.f:120:
DO 50 I=1,3
1
found.f:148: (continued):
DO 146 I=1,N
2
Attempt to modify variable `i' at (2) while it serves as DO-loop iterator at (1)
found.f:120:
DO 50 I=1,3
1
found.f:153: (continued):
DO 145 I=1,N
2
Attempt to modify variable `i' at (2) while it serves as DO-loop iterator at (1)
found.f:60: warning:
IF(KK.EQ.500) GOTO 150
1
found.f:165: (continued):
150 CONTINUE
2
Reference to label at (1) is outside block containing definition at (2)
found.f:121:
DO 50 J=1,3
1
found.f:181: (continued):
END
2
Statement at (2) invalid in context established by statement at (1)
found.f:121:
DO 50 J=1,3
1
found.f:186: (continued):
SUBROUTINE GEOM(N,Y1,Z1,Y0,Z0,G,G1)
2
Statement at (2) invalid in context established by statement at (1)
found.f:121:
DO 50 J=1,3
1
found.f:187: (continued):
DIMENSION Y(1),Z(1),Y1(2),Z1(2)
2
Statement at (2) invalid in context established by statement at (1)
found.f:121:
DO 50 J=1,3
1
found.f:188: (continued):
DIMENSION G(3,3),G1(3,3)
2
Statement at (2) invalid in context established by statement at (1)
found.f:121:
DO 50 J=1,3
1
found.f:189: (continued):
REAL IY,IZ,IYZ,IZY
2
Statement at (2) invalid in context established by statement at (1)
found.f:121:
DO 50 J=1,3
1
found.f:190: (continued):
REAL IY1,IZ1,IYZ1,IZY1
2
Statement at (2) invalid in context established by statement at (1)
found.f:191:
F=0.0
^
Expression at (^) has incorrect data type or rank for its context
found.f:121:
DO 50 J=1,3
^
End of source file before end of block started at (^)



Can somebody help me with that?

The program is attached here.
 

Attachments

  • FOUND.zip
    2.2 KB · Views: 224
Technology news on Phys.org
  • #2
stefan_ss said:
I have a program written in Fortran IV and tryed to run it with fortran77(g77). Nevertheless it could be not problem in fortran IV it make some errors in fortran77.

In FORTRAN 77, some programming "tricks" became illegal, that had been allowed in earlier versions of FORTRAN. Try compiling the program with the -ff66 option of g77, that is:

g77 -ff66 found.f

According to the "man page" for g77, this tells the compiler to consider the code to be FORTRAN 66. This was the next version of FORTRAN after FORTRAN IV, and it might accept "tricky" FORTRAN IV code.

I can't try it myself, because I don't have g77 on my computer. I haven't used it in several years.
 
  • #3
I have tried with -ff66 but again error messages has appeared.
I can't find fortran66 compiler.
 
  • #4
The file you attached before shows up like this when I open it in notepad. The comments are in a different character set (Polish?), so it's difficult for me to discern what the code is supposed to do.

Also, there seem to be several subroutines that are missing, such as NUMBER, EQ, ZERO, and MINV.

c ............
c ÏÐÎÃÐÀÌÀ FOUND
c ............
c ÃËÀÂÍÀ ÏÐÎÃÐÀÌÀ MAIN
c ............
6 DIMENSION Y(100),Z(100),Y1(100),Z1(100)
7 DIMENSION Y2(200),Z2(200)
8 DIMENSION S(3),SS(3),A(3),R(3)
9 DIMENSION DS(3),EPSI(3),SIG(101)
DIMENSION F(3,3),F1(3,3),FF(3,3)
DIMENSION L(3),M(3)
REAL*8 FORS,AL,PN
COMMON/R/A,S,SIG,Y,Z,Y1,Z1
COMMON/R1/FORS,AL,PN
COMMON/R2/EY,EZ
I IN=5
I OUT=6
READ(I IN,10) N
10 FORMAT(I3)
READ(I IN,20) (Y1(I),I=1,N)
READ(I IN,20) (Z1(I),I=1,N)
20 FORMAT(8F10.3)
READ(I IN,30) P,EY,EZ
30 FORMAT(3F15.5)
READ(I IN,40) EXECT1,EXECT2
40 FORMAT(2F10.5)
READ(I IN,690) FORS,AL,PN
690 FORMAT(3A8)
READ(I IN,37) KEY
37 FORMAT(I2)
IF (KEY.EQ.0) GOTO 39
READ(I IN,35) PNORM
35 FORMAT(F10.3)
39 CONTINUE
WRITE(IOUT,700)
700 FORMAT(//9X,'I',99('-'),'I',/9X,'I',20X,'ÓÍÈÂÅÐÑÈÒÅÒ ÏÎ',
1'ÀÐÕÈÒÅÊÒÓÐÀ, ÑÒÐÎÈÒÅËÑÒÂÎ È ÃÅÎÄÅÇÈß - ÑÎÔÈß',20X,'I',
2/9X,'I',35X,'ÊÀÒÅÄÐÀ: ÌÀÑÈÂÍÈ ÊÎÍÑÒÐÓÊÖÈÈ',36X,'I',/9X,'I',
399('-'),'I',/9X,'I',14X,'ÏÐÎÃÐÀÌÀ ÇÀ ÈÇÊËÞ×ÂÀÍÅ ÍÀ ÎÏÚÍ',
4'ÏÎÄ ÊÎÐÀÂÈ ÔÓÍÄÀÌÅÍÒÈ Ñ ÏÐÎÈÇÂÎËÍÀ ÔÎÐÌÀ',14X,'I',/9X,'I',
599x,'I',/9X,'I',10X,'ÀÂÒÎÐÈ: ÄÎÖ.Ê.Ò.Í.ÈÍÆ.ÊÎÍÑÒÀÍÒÈÍ ÐÓÑÅÂ',
626X,'ÂÅÐÑÈß: 1990 ÃÎÄÈÍÀ',8X,'I',/9X,'I',22X,'Í.Ñ.ÈÍÆ.ÅÌÈË',
7'ÁÎÉ×ÅÂ',58X,'I',/9X,'I',99('-'),'I',
8/9X,'I',30X,'ÂÕÎÄÍÈ ÄÀÍÍÈ - ÔÓÍÄÀÌÅÍÒ N',30X,'I',
9/9X,'I',99('-'),'I')
WRITE(IOUT,710) N,P,FORS,EY,AL,EZ,AL,EXECT1
710 FORMAT(9X,'I',10X,'ÁÐÎÉ ÚÃËÎÂÈ ÒÎ×ÊÈ ÍÀ ÎÑÍÎÂ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,AL,PNORM,PN
820 FORMAT(9X,'I',99('-'),'I',/9X,'I',3X,'8.ÃÐÀÍÈ×ÍÀ ÍÎÐÌÀËÍÀ',
1'ÑÈËÀ-',49X,F10.3,1X,A8,'I',/9X,'I',5X,'ÏÐÈ ÅÊÑÖÅÍÒÐÈÖÈÒÅÒ:',
2'Ey -',51X,F8.3,1X,A8,'I',25X,'Ez -',51X,F8.3,1X,A8,
446X,F9.3,1X,A8,'I')
810 CONTINUE
WRITE(IOUT,800)
800 FORMAT(9X,'I',99('-'),'I',
1/9X,'I',34X,'ÏÎÄÏÈÑ:',20X,'ÏÎÄÏÈÑ:',31X,'I',
1/9X,'I',99('-'),'I')
STOP
END
C
C...............
C ÏÎÄÏÐÎÃÐÀÌÀ GEOM
C...............
SUBROUTINE GEOM(N,Y1,Z1,Y0,Z0,G,G1)
DIMENSION Y(1),Z(1),Y1(2),Z1(2)
DIMENSION G(3,3),G1(3,3)
REAL IY,IZ,IYZ,IZY
REAL IY1,IZ1,IYZ1,IZY1
F=0.0
SY1=0.0
SZ1=0.0
IY1=0.0
IZ1=0.0
IYZ1=0.0
Y1(N+1)=Y1(1)
Z1(N+1)=Z1(1)
 
  • #5
I know that comment is in diferent charster set but I don't think so its esential to execution the program. The comments are in bulgarian and but you can't find that code. As I cas see the main errors are with Do loop. I didn't typed that missing subrotines yet. I can show the block sheme or translate comments if its important.
 
  • #6
The comments don't make any difference to the compiler - they are strictly for the use of human readers. Since we can't decipher the comments, we have no idea what the code is supposed to be doing.

The code is also very difficult to decipher, since none of the variables have names that suggest what their purpose is. Also, the code is not formatted so that a human reader can see the extent of your loops. The description for your first error suggests to me that you have a DO loop with I as the loop control variable, and inside there is another DO loop that also uses I as its loop control variable.

It's much easier to see whether a loop contains another loop inside it if the code is indented. There is no indentation in your code, which makes it much more difficult to see what's going on.
 
  • #7
Here is the block-scheme:
 

Attachments

  • found block scheme-Model.pdf
    11.2 KB · Views: 184
  • #8
and the translated comments are attached here:
 

Attachments

  • comments.doc
    24.5 KB · Views: 202
  • #9
As soon as using the same control variable for 2 Do loops is ok for fortran IV (the program is written originaly in that code and should be expecting it work) more probably the problem is with fortran77(g77) and diferences with them 2.

I am not sure what happened after continue- Do lopp stop or not.
 
  • #10
The code below should work, but if it's causing problems, you could add another CONTINUE line.
DO 50 I=1,3
DO 50 J=1,3
FF(I,J)=F1(I,J)
50 CONTINUE

Here's the revised code:
DO 50 I=1,3
DO 51 J=1,3
FF(I,J)=F1(I,J)
51 CONTINUE
50 CONTINUE
 
  • #11
I did it. A proble occurred in:
51 continue

with label 5 and 1.
 
  • #12
OK, the problem might be that your labels aren't in the right columns. When I first did Fortran programming, we were using Fortran 77, with programs typed in on Hollerith cards. The card readers had certain requirements as to where different parts of the program could be.
Col 1 - the letter C, signifying a comment line.
Cols 2 through 5 - labels
Col 6 - continuation character, typically +, althought single digits 1, 2, 3, ... could be used.
Cols 7 through 72 - program code. If your code was longer than would fit on one line, you could use a continuation character in col. 6 and put the rest on the next line.

It's been a long time since I wrote any Fortran code, so I could be slightly off in some of the details. The newer compilers are not so particular about where things go.

Hope that helps.
 
  • #13
Oh you are absolutely rigth. Thank you.
Now all the errors disappeared after putting labels after second column.
I will write all the code and see what happened. I am not sure if subrotine should external files or not.
 
  • #14
stefan_ss said:
Oh you are absolutely rigth. Thank you.
Now all the errors disappeared after putting labels after second column.
Хорошо! This is Russian, not Bulgarian, but maybe you understand what it means...
stefan_ss said:
I am not sure if subrotine should external files or not.
??

Are you asking whether the subroutines can be in external files?

They probably can be in external files, but they will need to be compiled, and the linker needs to know to link the object code in with the object code of your main program.

I would put everything all in one file first, to get the program to run. After that, maybe you can look at the possibility of putting subroutines in external files.
 
  • #15
Again obstacle:
770 FORMAT(9X,'I',7X,'- В КООРДИНАТНА СИСТЕМА yOz:',5X,
1'm =',F9.3,1X,A8,'n =БЕЗКРАЙНОСТ',21X,'I',
2'/9X,'I',7X,'- В КООРДИНАТНА СИСТЕМА YO1Z: m1 =БЕЗКРАЙНОСТ',
3'n1 =БЕЗКРАЙНОСТ',21X,'I')
There are message for errors in line with 2': missing comma in format statements for I; Invalid I specifier; invalid form for format statement at symbol after 7X,' [its - ];unrecognized charster for next symbol.
The next part is the similar and there are no such problems:
780 FORMAT(9X,'I',7X,'- В КООРДИНАТНА СИСТЕМА yOz:',5X,
1'm =БЕЗКРАЙНОСТ',5X,'n =',F9.3,1X,A8,16X,'I',
2/9X,'I',7X,'- В КООРДИНАТНА СИСТЕМА YO1Z: m1 =БЕЗКРАЙНОСТ',
35X,'n1 =',F9.3,1X,A8,16X,'I')

The meaning of unknown charsters in that line is: - IN FRAME OF REFERENCE YO1Z: m1 =INFINITY',
 
  • #16
I don't understand why, but I think there are some extra characters in these two lines. 770 and 780 are very long format lines. The numbers 1, 2, and 3 are continuation characters, I believe, and should be in col. 6.

In 770, in the line that starts with 2'/9X, try removing '/
In the line that starts with 3'n1, try removing '

In 780, in the line that starts with 1'm, try removing '
In the line that starts with 2/9X, try removing /
 
  • #17
Alot of the problem with the code in the OP comes from the specification of the I/O unit.

I IN=5
I OUT=6

In F77, one would use an OPEN statement to specific a UNIT number for I/O.

in the code, the I IN=5 and I OUT=6 should be replaced.

Later in the code, I is used as a subcripted variable, which is one of the conflicts.

See this about Fortran OPEN and UNIT.
http://docs.cray.com/books/S-3695-35/html-S-3695-35/pdollsmg.html

Replace the above statements with OPEN (UNIT = 5, ---- and
OPEN (UNIT = 6, ---- , where ---- are the appropriate coding such as
OPEN (UNIT=n, FILE='filename', options...)

Or refer to - http://www.oc.nps.edu/~bird/oc3030_online/fortran/io/io.html

Note:
Standard FORTRAN reserves two UNIT numbers for I/O to user. They are:

UNIT = 5 for INPUT from the keyboard with the READ statement
UNIT = 6 for OUTPUT to the screen with the WRITE statement

Or find a book on F77.
 
  • #18
Yes.Thanks. It working.
 
  • #19
Unfortunately one of the subroutines is not written in the source. It's a number subroutine.
It should be make up but I couldn't cope with.
 
  • #20
With excluding the NUMBER subroutine the program were compiled an made .exe file.
I am not sure about that I IN an I OUT how it should be written becouse I see IOUT is included in WRITE( without space between I and OUT.
 
  • #21
I noticed the I IN and I OUT variables in the code, as well. I think that the variables were I_IN and I_OUT and the underscore (_) got lost in translation between different character sets (Bulgarian vs English). Or maybe an extra space was inserted.

I would replace I IN and I OUT with IIN and IOUT or I_IN and I_OUT and see if that makes a difference.
 
  • #22
I used IIN and IOUT and the compilation is ok. The execution of .exe file has interrupted. It stopped after 730 FORMAT( .The last I've seen on the screen were the letter from that part.
I've noticed that were written numbers after it: Y0= -1.#I0; Z0= 1.#I0; F= 0.000;
Sy= -1.#I0; IYZ= -1.#I0; IZ=
Maybe the missing subroutine is essential for it or something in program is missing.
Here is all the program(without NUMBER subrotine).
 

Attachments

  • FOUND.zip
    3.7 KB · Views: 152
  • #23
this you can see on the screen.
 

Attachments

  • results.doc
    25 KB · Views: 181
  • #24
I don't know what the expressions -1.#IO mean. As a wild guess, they could mean that the format used for a given number doesn't fit that number. The format used is F15.3, which means fit the number in 15 spaces, with 3 to the right of the decimal.

Other than that, I don't know. The program organization makes it extremely difficult to follow, even given the fact that the comments show up as gibberish.
 
  • #25
I've rceived that message during compiling:

found.f: In subroutine `zero':
found.f:13: warning:
COMMON/R/A,S,SIG,Y,Z,Y1,Z1
1
found.f:368: (continued):
COMMON/R/A,S,SIG,Y,Z,Y1,Z1
2
Common block `r' is 2028 bytes in length at (1) but 2044 bytes at (2)
 
  • #26
Has somebody any idea what mean that error message about size bytes?
 
  • #27
Make sure that the variables listed in the COMMON statement are declared the same way in both the main program and the subroutine where the COMMON statements occur. Each variable should be the same type in both places. If a variable is an array, it should be the same size in both places.
 
  • #28
Yes. I've tried to type in DIMENSION Y(100) and it must be Y(101). I don't know what is the diference. And with 101 compilation is ok.
Nevermind in this away it has compiled but still executing .exe is interrupted due to some program error posible.
 

1. What is the difference between Fortran IV and Fortran 77?

Fortran IV was the fourth version of the Fortran programming language, released in the 1960s. Fortran 77, also known as Fortran 1977, was released in, you guessed it, 1977. Fortran 77 introduced many new features and improvements, including structured programming, improved input/output capabilities, and new data types. It is considered a major update from Fortran IV and is still widely used today.

2. Why do I need to convert my Fortran IV code to Fortran 77?

Fortran 77 introduced many new features and improvements, making it a more modern and efficient programming language compared to Fortran IV. Converting your code to Fortran 77 can improve its readability, maintainability, and performance.

3. What are the common errors encountered during Fortran IV to Fortran 77 conversion?

Some common errors include syntax errors, such as using outdated keywords or not following the correct format for statements. Another common error is incompatibility issues, where certain features or data types used in Fortran IV may not be supported in Fortran 77.

4. How can I fix conversion errors in my Fortran code?

The best way to fix conversion errors is to carefully review your code and check for any syntax errors or incompatibilities. You may need to consult the Fortran 77 documentation to see the correct syntax and usage of certain keywords or features. Additionally, there are tools and compilers available that can assist with the conversion process.

5. Are there any resources available to help with Fortran IV to Fortran 77 conversion?

Yes, there are many resources available online, including documentation, tutorials, and forums where you can ask for help from experienced Fortran programmers. You can also consult with your colleagues or seek assistance from a professional programmer or consultant.

Similar threads

  • Programming and Computer Science
Replies
4
Views
589
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
2
Views
904
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
4
Views
7K
  • Programming and Computer Science
Replies
12
Views
2K
  • Programming and Computer Science
Replies
5
Views
2K
Back
Top