Running a f90 code in f77 compiler

Click For Summary
Running Fortran 90 (F90) code in a Fortran 77 (F77) compiler requires significant modifications. The code must be adjusted so that each line starts in the 7th column, which is a requirement for F77. Additionally, F90 intrinsic functions, such as MATMUL for matrix multiplication, need to be rewritten in F77 syntax, often resulting in the creation of nested DO-loops or custom functions. The complexity of the task increases with the amount of code, whether it's 1,000 lines or more. There are also considerations regarding whether the F77 compiler supports freeform format, which could affect the conversion process.
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?
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

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