[MITgcm-devel] gfortran 4.0.0 an ptracers_readparms
Ed Hill
ed at eh3.com
Fri Mar 10 11:32:26 EST 2006
On Fri, 2006-03-10 at 10:17 +0100, Martin Losch wrote:
> Hi,
> I have tried to use gfortran (gcc version 4.0.0) on my Apple
> PowerBook with the MITgcm and I could not compile the model because
> > ptracers_readparms.f:1936: internal compiler error: in
> > gfc_conv_string_parameter, at fortran/trans-expr.c:1986
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
> Before I submit this report, I would like to know if there is any
> experience with gfortran and the MITgcm. I saw that for Fedora there
> are opt files.
>
> gFortran cannot handle the following character arrays in the namelist
> PTRACERS_PARMS01:
> PTRACERS_initialFile(PTRACERS_num)
> PTRACERS_names(PTRACERS_num)
> PTRACERS_long_names(PTRACERS_num)
> PTRACERS_units(PTRACERS_num)
>
> Is there a more recent version around that can do this?
Hi Martin,
Yes, I've been testing MITgcm with gfortran for nearly a year and here
is what I know to date:
1) Officially, the gfortran front end in GCC 4.0.x is a
"technology preview" and is not expected to work with
all codes that g77 can compile. The gfortran in newer
GCC versions (4.1.x and later) includes *many* Fortran-
related bug fixes and is approaching a "recommended
for general use" state. It works for me on a number of
MITgcm verification tests (at least it did a few months
ago) on x86 hardware.
2) There is a name-list problem (not technically a bug, but
an inability to parse "de facto standard" rather than
"actual ISO standard" namelist syntax) in gfortran. I've
submitted a bug to the GCC maintainers and hopefully the
feature will get added at some point in the future:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24459
In the mean time, there is a somewhat inconvenient work-
around that we can do and it is to explicitly specify
the number of strings within the namelists such as (this
is ISO-standard Fortran90 syntax):
astring(1:3,1) = 'name1 ', 'name2 ', 'name3 '
instead of the older ("de facto" F77 syntax):
astring(1,1) = 'name1 ', 'name2 ', 'name3 '
3) Please upgrade to the latest gfortran that you can find
for your hardware. The 4.0.x version you have is known
to be buggy and more recent stuff may be appreciably
better.
I'll add gfortran to our daily testing soon (when FC5 is released in a
couple of weeks).
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