[MITgcm-devel] fortran namelist syntax & gfortran
Martin Losch
mlosch at awi-bremerhaven.de
Mon Nov 28 06:01:10 EST 2005
Hi Ed,
it looks like your modifications in the namelists break my runs on the
XD1, have a look at the latest results, two (of the eight basic_verif)
experiments, aim.5l_cs/tr_run.thSI and dic_example, are failing because
they don't get past the name list data.diagnostics:
> PGFIO-F-248/namelist read/unit=11/illegal subscript or substring
> specification.
> File name = /tmp/3339.1.am.xd1-420-2/FTNkaaaaCfiar formatted,
> sequential acces
> s record = 4
> In source file diagnostics_readparms.f, at line number 1862
I use
> xd1-420-6::mlosch> pgf77 -V
>
> pgf77 5.2-4
> Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
> Copyright 2000-2004, STMicroelectronics, Inc. All Rights Reserved.
So there is at least one fortran 77 compiler that doesn't like the F95
syntax. I can't think of anything else that should cause this problem.
And I can see that a lot of experiments are failing with other versions
of pgf77, apparently for the same reason:
faulks linux_ia32_pgf77+authors_fc3 forward 20051128 summary.txt 38:55
cg01 linux_ia32_pgf77+mpi_cg01 forward 20051127 summary.txt 29:40
irda-pgf77 linux_ia32_pgf77+mpi_itrda forward 20051127 summary.txt
31:40
(I didn't have a close look, but the problem appears to the same: name
list read of data.diagnostics)
Martin
On Nov 24, 2005, at 5:31 PM, Ed Hill wrote:
>
> Hi folks,
>
> I've been trying to get MITgcm working smoothly with gfortran:
>
> http://gcc.gnu.org/fortran/
>
> and the only remaining problem has been the reading of
> arrays-of-strings
> in namelists which I've discussed before and is detailed in this bug
> report:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24459
>
> Today one of the GCC developers contacted me and explained that the F95
> standard requires syntax such as either:
>
> # valid Fortran-95 with no ending index
> &diags
> names(1:,1) = 'ETAN ','ETANSQ ','DETADT2 ','PHIBOT ',
> /
>
> or
>
> # valid Fortran-95 with an ending index
> &diags
> names(1:4,1) = 'ETAN ','ETANSQ ','DETADT2 ','PHIBOT ',
> /
>
> I've verified that essentially all the compilers we use (g77, Intel,
> etc.) are happy with the latter ending-index-included syntax and that
> g77, in particular, is not happy with the former no-ending-index
> syntax.
>
> So, if there are no objections, I'll cleanup our namelist syntax
> everywhere in MITgcm/verification so that it uses the standards-
> compliant F95 array triplets. This will allow us to continue using all
> the compilers that we already use (including g77) and will allow us to
> start using gfortran -- which will then be added to our daily tests.
>
> 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
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list