Running a f90 code in f77 compiler

In summary, the conversation discusses how to run f90 codes in an f77 compiler. The solution is to shift each line of code to the 7th column and rewrite f90 intrinsic functions in f77 syntax. It is also mentioned that the f90 source should be in freeform format and that the amount of code is a significant factor to consider.
  • #1
vissu219
3
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
  • #2
Have you tried running it through the compiler to see what error messages it generates?
 
  • #3
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
 
  • #4
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.
 
  • #5
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?
 

1. Can I run a f90 code in a f77 compiler?

Yes, it is possible to run a f90 code in a f77 compiler. However, there may be some limitations and compatibility issues as f90 is a newer version of the Fortran language.

2. What are the major differences between f90 and f77?

The major differences between f90 and f77 include the addition of new features such as modules, dynamic memory allocation, and object-oriented programming. F90 is also more strict in syntax and has more built-in functions compared to f77.

3. Do I need to make any modifications to my f90 code to run it in a f77 compiler?

Yes, you may need to make some modifications to your f90 code in order to make it compatible with a f77 compiler. This could include removing unsupported features or using alternative syntax.

4. Can I use f90-specific features in my code when running it in a f77 compiler?

No, if you want to ensure compatibility with a f77 compiler, it is best to avoid using f90-specific features such as modules and dynamic memory allocation. Stick to the f77 language standards to ensure your code will run without issues.

5. Are there any disadvantages to running a f90 code in a f77 compiler?

Yes, there are some potential disadvantages to running a f90 code in a f77 compiler. For example, you may not have access to newer features and optimizations available in f90. Additionally, there may be a decrease in performance and efficiency compared to running the code in a f90 compiler.

Similar threads

  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
7
Views
570
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
0
Views
234
Replies
6
Views
1K
  • Programming and Computer Science
Replies
7
Views
652
  • Programming and Computer Science
Replies
2
Views
841
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
Replies
17
Views
1K
Back
Top