How to get pgf90 5.2 to recognise *.f95 source files

Hello,

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

When I try to compile these files with the pgf90 v5.2 compiler (an f95 compiler), it doesn’t like the .f95 suffix. Is there a switch to allow the .f95 suffix to be understood by pgf90? (e.g. IBM xlf95 has a -qsuffix switch). Converting the filename suffixes to .f90 is not an option.

cheers,

paulv

p.s. FWIW, the Lahey v6.2 f95 compiler understands both .f90 and .f95 suffixes with no switches.

This is the first I’ve seen anyone using .f95 suffix.
There is a semantic difference between .f and .f90, for instance; .f90 implies free-format source, .f implies fix-format source, but there’s no particular semantic difference between .f90 and .f95, is there?

There is no simple way to make pgf90 recognize .f95 at this time, but it’ll go on the list of enhancements.

Hi Paul,

In your opinion, given a F95 source file with the “.f95” suffix, would this be semantically equivlent to same F95 source file with a “.f90” suffix? In other words, would the compiler need to presume anything different? Or is “.f95” a convenient way for a person to differentiate his/her F95 files from the F90?

Thanks,
Mat

Hello,

The source code I have with the .f95 suffix contains F95 language features. E.g. PURE and/or ELEMENTAL procedures, MINLOC/MAXLOC using the DIM argument, initialisation of derived type components in the derived type specification (especially pointers using the NULL() intrinsic) … etc.

Code containing these features won’t compile with an f90-only compiler (e.g. pre v5.2). And the suffix is an easy visual cue to distinguish between f90-only and f95 source files. The same issue will arise when Fortran2003(4?) compilers start appearing, no?

But if pgf90 can’t recognise the source files easily, I guess I’ll have to start renaming. Crikey.

cheers,

paulv

p.s.

Paul,

We’ll do a bit more research just to make sure we don’t miss something, but adding recognition of the “.f95” should be straight forward. Although we’ll miss the upcoming 5.2-2 release, we should be able to add it in the near future. Thanks for the suggestion and sorry we didn’t realize this would be a benefit when we added F95.

-Mat

Hi Paul,

We were able to add pgf90 recognition of the “.f95” suffix to the 5.2-2 release. This will be an undocumented feature. To the compiler, “.f95” will be equivalent to the “.f90” suffix. “.f95” is intended simply as convience to our users as a way to differentiate F90 from F95 source files.

Thanks,
Mat

Hello,

That’s great news. I use the suffix as a visual cue to tell me what’s in the file. Talking it over with other people, it seems that the “standard” interpretation of “.f” and “.f90” suffixes is to indicate fixed- or free-format source code respectively. I disagree with that being the only use of the suffixes - what are we to do when f2003(4) compilers start appearing?

Thanks for the speedy reply.

cheers,

paulv