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

.f08 file extension

Fortran10
Novice
1,093 Views

I just updated to the new version and it works fine for .f90 file format. However for .f08 it shows error. I came to know through other forums (cmake, fortran 2008, and .f08 file extension - Stack Overflow) that intel compiler throws error for this file extension.

 

>ifx test1.f08
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.0 Build 20231017
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

ifx: command line warning #10161: unrecognized source type 'test1.f08'; object file assumed
Microsoft (R) Incremental Linker Version 14.32.31332.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:test1.exe
-subsystem:console
test1.f08
test1.f08 : fatal error LNK1107: invalid or corrupt file: cannot read at 0x9A

Actually I was planning to write code using do concurrent with file extension .f08 since it is 2008 standard. Although it is not necessary to have .f08 extension but I was just trying to make it coherent with the standard since it sounds more symmetric. Also, I do not see any error for gfortran with .f08 extension though.

 

I am not using any other utility ( e.g. CMake) or tool. Just wanna do it through command line !

 

So .f08 file extension error be like that ( in future ) and I should always use .f90 for intel compiler ifx or it is going to be changed in the next version ?

0 Kudos
1 Solution
andrew_4619
Honored Contributor III
1,086 Views

.f08 is not a thing, don't use it.  The extension has nothing to do with the Fortran standard .for/.f for fixed format  .f90 for free format.

View solution in original post

0 Kudos
8 Replies
andrew_4619
Honored Contributor III
1,087 Views

.f08 is not a thing, don't use it.  The extension has nothing to do with the Fortran standard .for/.f for fixed format  .f90 for free format.

0 Kudos
mecej4
Honored Contributor III
1,071 Views

If you wish to use a non-standard file suffix for Fortran source files, you may use the /extfor:<ext> compiler option; for instance, /extfor:f08 .

0 Kudos
Fortran10
Novice
1,066 Views

@mecej4  does not work !

Capture.PNG

0 Kudos
andrew_4619
Honored Contributor III
1,059 Views

If you wanted to go that way try:

ifx /extfor:f08 /free test1.f08

or

ifx /extfor:f08 /fixed test1.f08

 

that works but you need top also specify source form because .f08 doesn't inform

0 Kudos
Fortran10
Novice
1,053 Views

@andrew_4619 Yeah. It works !

 

So it seems like for all other file formats ( also in future maybe .f23 for Fortran 2023 ) we will be using compiler options ?

0 Kudos
andrew_4619
Honored Contributor III
1,046 Views

No. The extension is nothing to do with the standard.

In the beginning we had fixed form  with .for/.f  when Fortran 90 came out they also create free form so some idiot decided that free form files would be .f90  they should have picked something else.  A .f90  can contain Fortran 77. A .for file can contain f2018 fortran it is all fortran.

 

Making up new extensions causes problems don't do it.

 

 

 

0 Kudos
Fortran10
Novice
1,044 Views

Got it! Thank you for the clarification.

0 Kudos
Reply