[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20030520: McIDAS with g77
- Subject: 20030520: McIDAS with g77
- Date: Tue, 20 May 2003 13:28:22 -0600
>From: "Bill Godfrey" <address@hidden>
>Organization: NOAA
>Keywords: 200305201633.h4KGXFLd015826 McIDAS-X g77
Hi Bill,
>I was given your name as a possible source of information about
>compiling McIDAS with g77. I am attempting to install McIDAS with g77 on
>Red Hat Linux 9 here at NOAA in Camp Springs, MD, and have succeeded to
>the point of getting it to compile without any fatal errors that might
>halt the install scripts.
The Unidata distribution of McIDAS supports use of the gcc/g77
combination as the preferred non-vendor compilers.
>I had to make some changes to "geo.pgm" and
>"sndskewt.pgm" to correct some compile-time errors, and of course
>"mccomp".
I had to change:
McIDAS-X:
mccomp.sh
gms5_nav.for
batch.pgm
geo.pgm
sndskewt.pgm
McIDAS-XCD:
M0buildidt.c
xcdrelay.cp
There may be others that I did not completely document as being needed
by g77 use.
>The only change I made to "mccomp" was to change "fc=mcfc" to
>"fc=g77" in one place.
I added code needed to support both gcc/f2c/mcfc and gcc/g77.
>Any additional information you can provide about problems you have
>encountered would be greatly appreciated.
What specific problems are you running into? I have not yet tried to
build on RH 9, so some of the things you are seeing may be new to me.
I do, however, routinely build on RH 6.x, 7.x, and 8.0 and have not
seen run into any problems running the executables built with gcc/g77.
When I did my initial run at supporting gcc/g77, I had to modify
something like 100 McIDAS routines. I tried to get all of those mods
into core (I have CVS access), but I find that new routines (like
geo.pgm) will repeat some of the same mistakes that I fixed in older
routines. The biggest problem was in Fortran subroutines' use of
initialized (non-zeroed) variables. While gcc/f2c/mcfc and vendor
Fortran compliers set all Fortran variables to zero, g77 does not.
There is a flag you can specify to g77 telling it to zero all
variables/arrays, but this is done in a way that balloons the size of
executables by up to a factor of 3. I found it easier to simply
compile each Fortran module with FFLAGS set to '-O -Wuninitialized
-fno-automatic'; look through the makelog file looking for warnings
about possibly uninitialized variables; and then read the code and
decide if the variables were actually uninitialized and fix ones that
were.
By the way, the set of flags I have users define when building McIDAS
under linux is:
CC=gcc
CPPFLAGS="-DNDEBUG -Df2cFortran"
CFLAGS=-O
FC=g77
FFLAGS="-O -Wuninitialized -fno-automatic"
CXX=
The CPPFLAGS and CXX values are set this way for the netCDF portion of
the McIDAS build.
>If you are still running into
>problems I will be happy to share whatever I might learn when I run into
>them too.
I am pretty happy with what I have so far for using gcc/g77, but I am
always eager to hear other user's perspectives since there may be an
area of McIDAS that I am not exercising that is still broken.
I can let you have access to my distribution of McIDAS-X if you are
interested please let me know.
Cheers,
Tom
--
+-----------------------------------------------------------------------------+
* Tom Yoksas UCAR Unidata Program *
* (303) 497-8642 (last resort) P.O. Box 3000 *
* address@hidden Boulder, CO 80307 *
* Unidata WWW Service http://www.unidata.ucar.edu/*
+-----------------------------------------------------------------------------+