- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to specifically compile for fortran 77 with -std08, -std90 or another method, or does OneAPI consider 90/95/2003 a superset of fortran 77? If 90/95/2003 is a superset then is all features and extensions of fortran 77 supported or is there some depreciated features?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You mean, how to compile Fortran 77 source files?
I am thinking that if the compiler does not readily recognize the sources, then, you may be able to "tell" the compiler by your choice of source file extensions...try using *.f77 or *.for or something. I just searched, briefly, and while I did not find a reference to filename extension, they do mention being able to handle fixed form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, I'm asking how to specifically compile for f77 code. Using .f77 file naming doesn't work.
There is
-std90 flag to compile for F90 standard
-std08 flag to compile for 2008 standard
-std18 flag to compile for 2018 standard
But there is none for F77.
On the Intel Fortran website, it mentions full support for F77, but how to specifically compile for it? Does this include all features and extensions?
For example GNU once had a separate fortran 77 compiler called g77, but later when gfortran compiler came out, they combined g77 with the newer standards but excluded depreciated features and functions. So while gfortran technically supports fortran 77, if your code is using the depreciated features then it wouldn't work correctly.
https://gcc.gnu.org/onlinedocs/gcc-11.3.0/gfortran/GNU-Fortran-and-G77.html#GNU-Fortran-and-G77
I am hoping Intel fortran compiler fully supports all the F77 code.
So I am trying to find out using Intel compiler, how to compile for specifically F77 and whether it includes all native support or is it rolled into F90/F95 and excludes depreciated features.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should be aware that FORTRAN 77 is an almost strict subset of Fortran 90 and later. A few features that were standard in FORTRAN 77 have been deprecated or removed from the later standards, but compilers typically are conservative in that respect, precisely because of the questions you pose.
Intel Fortran should accept all of FORTRAN 77 and many common extensions (note that each compiler brought its own set of extensions in the good old days!). That said, the long history of this particular compiler almost guarantees that your code can be compiled correctly. There is furthermore nothing special about FORTRAN 77 code - the fixed form is still in the latest standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bigdogdan2 wrote:
Hi,
Yes, I'm asking how to specifically compile for f77 code. Using .f77 file naming doesn't work.
There is
std90 flag to compile for F90 standard
-std08 flag to compile for 2008 standard
-std18 flag to compile for 2018 standard
But there is none for F77.
On the Intel Fortran website, it mentions full support for F77, but how to specifically compile for it? Does this include all features and extensions?
For example GNU once had a separate fortran 77 compiler called g77, but later when gfortran compiler came out, they combined g77 with the newer standards but excluded depreciated features and functions. So while gfortran technically supports fortran 77, if your code is using the depreciated features then it wouldn't work correctly.
https://gcc.gnu.org/onlinedocs/gcc-11.3.0/gfortran/GNU-Fortran-and-G77.html#GNU-Fortran-and-G77
I am hoping Intel fortran compiler fully supports all the F77 code.
So I am trying to find out using Intel compiler, how to compile for specifically F77 and whether it includes all native support or is it rolled into F90/F95 and excludes depreciated features.
Searching the same for two weeks, found these answers really grateful especially this which I quoted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The various flags you mention control warnings for use of features not in those standards - they do not change how the compiler treats your sources. If by FORTRAN 77 you mean fixed-form source, then the Intel compiler can compile them just fine using the .f or .for file types. Please do not confuse source form with standard version - see Doctor Fortran in "Source Form Just Wants to be Free" - Doctor Fortran (stevelionel.com)
Intel Fortran supports ALL of FORTRAN 77, even those features made obsolescent or deleted by later standards. It even supports FORTRAN 66 (may need /nof77 for a couple of things.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel compiler does not have the option of warning you for use of features that were not in F77, but it still compiles F77. To be honest, your code is almost certainly NOT standard F77, no matter what you think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bigdogdan2 wrote:
"Hi,
Yes, I'm asking how to specifically compile for f77 code. Using .f77 file naming doesn't work."
Correct. Your filename for older fixed source form needs file extensions shown here. ".f77" is not a valid filename extension for this compiler.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page