Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

Switch to allow ifort v8.0 to recognise *.f95 files

paul_vandelst
Beginner
1,056 Views
Hello,

I have a large number of source files with the suffix .f95

When I try to compile them with the ifort v8.0 compiler I get the message:

ifort: Command line warning: no action performed for specified file(s)

Anyone know if there is a switch that allows ifort to recognise *.f95 source files? (e.g. Like the IBM xlf95 switch -qsuffix). Converting all the files to *.f90 names is not an option.

cheers,

paulv

p.s. FWIW, Lahey v6.2 lf95 recognises both *.f90 and *.f95 with no switches required.
0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,056 Views
/extfor:.f95
It is also available from the IDE under Tools..Options..Intel Fortran.
The idea of using .f95 as meaning "Fortran 95" is, in my opinion, absurd. It was a mistake to settle on .f90 as meaning "free form source", as this fooled people into thinking the file type had to change every time the standard revision changed. What's next, .f03?
0 Kudos
Steven_L_Intel1
Employee
1,056 Views
Hmm. While a switch for this, /extfor,is available on Windows, I don't see it on Linux. I'll ask about this.
In my opinion, naming files .f95 is a mistake, instigated by the mistake made years ago to make .f90 mean "free-form source". It implied to many that the name of source files is to change each time the standard changes. Are you going to rename your files .f03 in the future?
0 Kudos
Lorri_M_Intel
Employee
1,056 Views
On Linux, use -Tf before your filename, as
ifort -Tf myfile.f95
Steve's point is valid though, you may need to use -free as well, to tell the compiler to treat it as free-form, vs fixed-form.
- Lorri
0 Kudos
paul_vandelst
Beginner
1,056 Views
Hi,

Thanks for the replies. After consulting with other folks, and getting the skinny on similar problems with other compilers (e.g. PGI f95), your opinions tipped the scale -- I think renaming the files to *.f90 is the path of least resistance (despite my "not an option" comment).

Thanks again,

paulv
0 Kudos
Steven_L_Intel1
Employee
1,056 Views
I should also comment that fixed-form source is also perfectly standard Fortran 95. The file type should be used to let the compiler know what to expect in terms of source form and nothing else.
0 Kudos
Reply