[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[McIDAS #TPS-344560]: use of gfortran in building McIDAS
- Subject: [McIDAS #TPS-344560]: use of gfortran in building McIDAS
- Date: Mon, 09 Jul 2007 08:20:39 -0600
Hi,
This is probably best sent along to Dave Parker...
Has there been any effort at SSEC to build McIDAS using gfortran under Linux?
As you likely know, gfortran is now the standard Fortran compiler on
Linux systems. Since the RPM that contains g77 is getting harder to find,
it is probably a good idea to start supporting gfortran.
Just so you know: I built McIDAS v2007 on my home Linux development machine
(Fedora Core 6 with up to the minute updates for gfortran) and have run into
problems with a number of routines whose line lengths exceed 72 characters.
I got around the extended line lengths by adding the '-ffixed-line-length-none'
to the fcopts setting in mccomp.sh:
fcopts="-O -Wuninitialized -fno-automatic -ffixed-line-length-none"
Specifying that Fortran source did not follow the normal 72 character line
length
limit caused me to have to edit a couple of files and remove comments that
start in column 72:
bright.for
tipti.fp
Also, gfortran appears to be pickier than g77. It caught a couple of source
code errors that really need to be fixed:
iftok.for <- there is a 'GOTO 891' on line 311, but there is no line
labeled 891:
IF(IVAL.GT.IMAXL.OR.(IVAL.EQ.IMAXL.AND.IDIG.GT.IMAXR))GOTO 891
the GOTO should actually be a 'GOTO 89'
tu.pgm <- the continued FORMAT on line 94 is malformed:
CALL SDEST('--- --- ------------ ---- ---- ------- -------'
&-'//' ---- ',0)
there is a missing "'" (single quote) just after the '&'
continuation
character
tipti.fp <- the SDEST call on line 3218 is malformed:
CALL SDEST(' TIME GAP MORE THAN 7 MJR.FRS., SO GET NEW STARTING TI') 000
*ME',0)
the first closing quote on the SDEST line should not be there
there is a missing "'" (single quote) just after the '*'
continuation
character
Also, it appears that gfortran does not allow tab characters as whitespace
separators
in FORMAT statements:
grdlist.pgm <- the format statments starting at line 773 all have a tab
character
as the second character after the continuation character '&'
on the
continuation line:
950 format(a4,1x,a5,1x,a4,1x,a12,1x,a8,1x,a4,1x,i4,1x,a12,1x,
& a8,1x,i5,1x,a4)
951 format(a4,1x,a5,1x,a4,1x,a12,1x,a8,1x,a4,1x,i4,1x,a12,1x,
& a8,1x,'MATH ',1x,a4)
952 format(a4,1x,a5,1x,a4,1x,a12,1x,a8,1x,a4,1x,i4,1x,a12,1x,
& a8,1x,'XXXXX',1x,a4)
953 format(a4,1x,a5,1x,a4,1x,a12,1x,a8,1x,a4,1x,i4,1x,a12,1x,
& a8,1x,' N/A',1x,a4)
this produces a runtime error when GRDLIST is executed:
GRDLIST RTGRIBS/ALL PAR=T LEV=SFC
Dataset position 1 Directory Title= /MAPS.86.2007189.0.0.211.grib
PAR LEVEL DAY TIME SRC FHR FDAY FTIME GRID PRO
---- ---------- ------------ -------- ---- ---- ------------ -------- ----- ----
At line 773 of file grdlist.f
Fortran runtime error: Unexpected element in format
(a4,1x,a5,1x,a4,1x,a12,1x,a8,1x,a4,1x,i4,1x,a12,1x, a8,1x,' N/A',1x,a4)
^
GRDLIST failed, RC=2
Removing the tab characters and and rebuilding grdlist.k
results
in a viable executable.
There are probably some more routines that will be shown to have problems as
I continue my testing.
Anyway, since I think that we will all be forced to support gfortran in the not
too
distant future, I just wanted to touch base with you (again, most likely Dave)
to see
if you have started down the path of support for use of gfortran.
Cheers,
Tom
****************************************************************************
Unidata User Support UCAR Unidata Program
(303) 497-8642 P.O. Box 3000
address@hidden Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage http://www.unidata.ucar.edu
****************************************************************************