[MITgcm-devel] fortran namelist syntax & gfortran
Ed Hill
ed at eh3.com
Thu Dec 1 11:13:29 EST 2005
On Thu, 2005-12-01 at 10:01 -0500, Jean-Michel Campin wrote:
>
> I agree, but the problem with testreport is that
> it says "pass" for both, even if the 2nd fails
> to run.
OK, so theres at least two points here:
1) I need to fix the testreport additional-tests-fail-bug:
no problem, will do!
2) namelist syntax is annoying
For issue #2, we know that:
+ essentially all f77 compilers accept the "old-style"
namelist notation including:
g77, Intel (ifc, ifort, efc), pgf77, Sun
but some F90/F95 compilers (eg. gfortran) won't because
its *not* part of the F90/F95 standard and the "triplet"
notation which serves the same purpose [eg. var(2:2:10)=...]
*is* documented as the standard syntax for strings
+ most F77 compilers will accept the standard F90 triplet
notation but some (eg. pgf77) won't
so Jean-Michel and I have tentatively agreed that the way forward is to:
+ add a new #define (NAMELIST_STLYE) that can be set in
the optfiles and will automatically default to the
current behavior (so no changes are needed for setups
that already work)
+ when the #define is active, we will first try to read
from namelist files with the format ${NAME}.f90:
eg.: data.diagnostics.f90
and we'll add error messages that clearly describe
(warn about) these syntax problems when namelist reads
fail
The above should make things as automatic, clear, and easy as we
possibly can for end users. The only (minor) annoyance is that a few
files (mostly just data.diagnostics), will require two versions within
our verification input directories.
And if anyone has a better solution, please speak up !!!
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS; Rm 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
emails: eh3 at mit.edu ed at eh3.com
URLs: http://web.mit.edu/eh3/ http://eh3.com/
phone: 617-253-0098
fax: 617-253-4464
More information about the MITgcm-devel
mailing list