[petsc-dev] two quick questions on Fortran style/includes
Ethan Coon
ecoon at lanl.gov
Tue May 10 12:01:22 CDT 2011
On Tue, 2011-05-10 at 18:54 +0200, Jed Brown wrote:
> On Tue, May 10, 2011 at 18:46, Ethan Coon <ecoon at lanl.gov> wrote:
> Is there a reason that both .F and .F90 examples are in fixed
> format,
> even though .F90 files should be interpreted as free format?
>
>
> I thought that was up to the compiler flags of the user's project. I
> think the preference is to always write hybrid code in the examples so
> that free/fixed compiler flags don't have to be sorted out at
> configure time and so the user can use whatever convention they like.
Then why are there both .F90 and .F examples (e.g.
src/ksp/ksp/examples/tutorials/{ex1f.F,ex44f.F90}) if both must work in
both formats?
>
> I guess
> the fixed format works for either a fixed/free compiler, but
> it's ugly.
> I wouldn't be surprised if there was a portability issue with
> free
> format .F90 files, so I figured I'd check.
>
> There is a Note in the standard showing how to write free/fixed hybrid
> Fortran (non-normative, as pointed out by a gcc developer who didn't
> want to fix the
> warning, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42852).
--
------------------------------------
Ethan Coon
Post-Doctoral Researcher
Applied Mathematics - T-5
Los Alamos National Laboratory
505-665-8289
http://www.ldeo.columbia.edu/~ecoon/
------------------------------------
More information about the petsc-dev
mailing list