Running a f90 code in f77 compiler

Click For Summary

Discussion Overview

The discussion centers on the challenges of running Fortran 90 (f90) code in a Fortran 77 (f77) compiler. Participants explore the necessary code modifications and potential issues that may arise during this process.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about the necessary changes to run f90 code in an f77 compiler.
  • Another participant suggests checking the compiler's error messages to identify issues.
  • A participant notes that code lines must start at the 7th column for compatibility with the f77 compiler and expresses uncertainty about other required changes.
  • It is mentioned that beyond adjusting line positions, f90 intrinsic functions will need to be rewritten in f77 syntax, with an example given of the MATMUL function needing to be converted to nested DO-loops or a separate function.
  • A question is raised regarding whether the f90 source is in freeform format and whether the f77 compiler supports freeform, along with inquiries about the size of the codebase.

Areas of Agreement / Disagreement

Participants express differing views on the extent of changes required to run f90 code in an f77 compiler, indicating that multiple competing views remain regarding the complexity of the task.

Contextual Notes

Limitations include potential dependencies on the specific features of f90 being used, the format of the source code, and the capabilities of the f77 compiler.

Who May Find This Useful

Individuals working with legacy Fortran code, developers transitioning code between Fortran versions, and those interested in compiler compatibility issues may find this discussion relevant.

vissu219
Messages
3
Reaction score
0
heys..can anyone tell me..how could i run f90 codes in an f77 compiler..wht changes in the code do i need to make to do that?
 
Technology news on Phys.org
Have you tried running it through the compiler to see what error messages it generates?
 
no.. but i figured out that.. i have to move each line of code such that it starts at the 7th column to run in f77 compiler..i don't know wht other changes to be made
 
It will be a lot of work, other than the shifting of all of the lines of code to appropriate position, f90 intrinsic functions will have to be rewritten in f77 syntax, the first that comes to mind is MATMUL(A,B) which is a matrix multiplication routine. It will become a set of nested DO-loops, unless you write a function, then you only have to do it once, but there are others to look for and the compiler will find them for you.
 
Is the f90 source in freeform format? (i.e. not tabbed out to column 7).

Does the f77 compiler support freeform?

How much code is there? 1k lines, 10k, 100k? or more?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
8
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 34 ·
2
Replies
34
Views
5K
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
Replies
7
Views
4K
Replies
4
Views
5K