Home > Archive > Fortran > February 2007 > Compiling GISS GCM modelE1 with Gfortran - help requested
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Compiling GISS GCM modelE1 with Gfortran - help requested
|
|
| David Dawson 2007-02-20, 7:04 pm |
| I am trying to figure out how I can get modelE1 (the free download from
NASA) to compile with gfortran.
I have a symlink to gfortran called 'f90' and with this the Makefile will
run with no errors in any module. BUT the build keeps looping in a way I
haven't quite figured out so that I keep getting messages 'XXX's
dependencies have changed, recompiling...compiled' and on and on.
If somebody has got this program to build with gfortran I'd really
appreciate help.
I am not a Fortran programmer, but have lots of experience with C and Bash
scripting under Linux.
Thanks
--
If you wrestle in the mud with a pig.
you both get dirty, and the pig likes it.
-- Dave Dawson
| |
| David Dawson 2007-02-22, 8:08 am |
| David Dawson wrote:
> I am trying to figure out how I can get modelE1 (the free download from
> NASA) to compile with gfortran.
>
> I have a symlink to gfortran called 'f90' and with this the Makefile will
> run with no errors in any module. BUT the build keeps looping in a way I
> haven't quite figured out so that I keep getting messages 'XXX's
> dependencies have changed, recompiling...compiled' and on and on.
>
> If somebody has got this program to build with gfortran I'd really
> appreciate help.
>
> I am not a Fortran programmer, but have lots of experience with C and
> Bash scripting under Linux.
> Thanks
I just wanted to add that I am running gfortran on a machine running Debian
Gnu/Linux and the gmake in the modelE1 docs is the normal make on my
machine. Also, the Fortran itself shouldn't need any modification, only the
calls to the compiler. The default is Absoft, but Lahey and PGI are
supported.
If I knew what the options did I could easily translate them to gfortran
(which understands all options that gcc understands)
Here is a snippet from Rules.make (which is an included file in the main
Makefile):
## This is for the Absoft PROfortran compiler
ifeq ($(COMPILER),Absoft)
F90 = f90
CPP = /usr/bin/cpp -P -traditional
FMAKEDEP = $(SCRIPTS_DIR)/sfmakedepend -h
CPPFLAGS = -DCONVERT_BIGENDIAN -DMACHINE_Linux
FFLAGS = -O2
FFLAGSF = -O2 -f free
LFLAGS = -lf90math -lV77 -lU77
# uncomment next two lines for extensive debugging
# the following switch adds extra debugging
ifeq ($(COMPILE_WITH_TRAPS),YES)
FFLAGS += -trap=INVALID,DIVBYZERO,OVERFLOW -B111 -C
LFLAGS += -lefence
endif
endif
Thanks
--
If you wrestle in the mud with a pig.
you both get dirty, and the pig likes it.
-- Dave Dawson
|
|
|
|
|