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

Compiling file .f03

felipin85
Beginner
2,063 Views
Hi, I'm student of Civil Engineering. I'm trying to compile a fortran 2003 in my linux system. I'm using Intel Fortran Composer XE 2011 for Linux, but the terminal says:

felipe@felipe-desktop:~/Documentos/LOSA PROYECTO FINAL DE CARRERA$ ifort Euclides.f03 -o a.out
ipo: warning #11010: file format not recognized for Euclides.f03
ld:Euclides.f03: file format not recognized; treating as linker script
ld:Euclides.f03:1: syntax error

How can I compile fortran 2003 file? With FORTRAN 90, I don't problems.

Thanks,
Regards

Felipe Rodriguez Fonte
Las Palmas, Spain
0 Kudos
1 Solution
Kevin_D_Intel
Employee
2,063 Views
ifortdoes not recognize the .f03 extension and does not offer an option on Linux to instruct it to treat that extension accordingly. You will need rename the file to something like, Euclides.f90 and compile with:

ifort Euclides.f90 -o a.out

View solution in original post

0 Kudos
12 Replies
Kevin_D_Intel
Employee
2,064 Views
ifortdoes not recognize the .f03 extension and does not offer an option on Linux to instruct it to treat that extension accordingly. You will need rename the file to something like, Euclides.f90 and compile with:

ifort Euclides.f90 -o a.out
0 Kudos
felipin85
Beginner
2,062 Views
But, Can I write the code in fortran 2003 and then compiling with extension .f90, or have I change the code at FORTRAN 90?
0 Kudos
Kevin_D_Intel
Employee
2,062 Views

Yes, you can use the .f90 extension with Fortran 2003 language features. The .f90 extension implies that Fortran free-form source rules apply not that the contents conform only to Fortran 90 language standards.

0 Kudos
felipin85
Beginner
2,062 Views
Ok, This is great! Thanks
Regards
0 Kudos
abhimodak
New Contributor I
2,062 Views
You may want to look into /free and /Tf compiler options.

Abhi
0 Kudos
Steven_L_Intel1
Employee
2,062 Views
Or even better, rename your source files to use the industry standard .f90 file type.
0 Kudos
abhimodak
New Contributor I
2,062 Views
Hi

Perhaps I should have mentioned this link: http://software.intel.com/en-us/forums/showthread.php?t=72203
where Steve mentions f90 => free form.

On a jovial note: "industry standard"? Absoft editor gives default extension .f95 to files of type f95/f90. Same is true with SilverFrost FTN95....Go IVF!

Abhi

0 Kudos
Kevin_D_Intel
Employee
2,062 Views
The user is working on Linux where there's no /Tf equivalent, so renaming is better and easy.
0 Kudos
Steven_L_Intel1
Employee
2,062 Views
Doesn't -Tf work on Linux? It's documented.
0 Kudos
Kevin_D_Intel
Employee
2,062 Views
Well, my mistake, my apologies to everyone. -Tf works and assumes fixed-form by default so -free is needed if the file contains free-form source.

The 11.1 User Guidedoes not listLinux/Mac OS support under the /source equivalent that /Tf redirects one to, but the new Fortran Composesr XE 2011 User Guide does and /source now refers one back /Tf. Anyway, the option works, sorry for the oversight.
0 Kudos
mecej4
Honored Contributor III
2,062 Views
Here is a minor complaint regarding options and how they are handled.

The Intel compiler has, over the years, accumulated a large number or options (about 700 options now!), almost on a par with GCC in that regard. Of those options, some have no potency anymore but have been retained to avoid breaking old makefiles. And, some of us imperfect users may look up one of those options in an Intel Fortran User Manual that is not the one that matches the compiler issue that we are using.

It is frustrating to try an option that the manual leads us to believe might solve a problem with our code, only to find after many perplexing runs that the option did nothing.

One of the good features of the Intel compiler is that we can type "ifort -help" and obtain a listing of the options and a brief description of the meaning of each option. This leads to my request: please, please (i) flag those options that are accepted but have no consequence, and (ii) if a do-nothing option is chosen for a compilation, have the compiler issue a warning that an inactive option has been chosen, with the additional feature that if warnings have been turned off even this requested warning is not displayed.

Thanks.
0 Kudos
Steven_L_Intel1
Employee
2,062 Views
Thanks for the suggestion.
0 Kudos
Reply