[RegCNET] (no subject)

Maurice.McHugh at noaa.gov Maurice.McHugh at noaa.gov
Tue May 18 18:03:05 CEST 2010


Francis,

Here is the contents of a Makefile_gnu for the terrain.f program in PreProc for the gFortran compiler on a Debian Linux box with AMD chips:

FC = gfortran -O0
FFLAGS = -L../../Commons/env/liblinuxamd64/ -lnetcdf

LD = $(FC)

SRC = terrain.f

OBJ = terrain.o

all: terrain

.f.o:
        $(FC) -c $(FFLAGS) $*.f

terrain: $(OBJ)
        $(LD) -o $@ $(OBJ) $(FFLAGS)

clean:
        rm -f *.o terrain
# --------------------------------------------------------------------
# DO NOT DELETE THIS LINE -- make depend depends on it.

terrain.o: domain.param terrain.f



<end Makefile_gnu>

Model your other Makefile_gnu's for the various aspects of the RegCM system on the above example.

Please also be aware that changes to the source code will also be required to ensure proper compilation with gFortran, specifically deleting or commenting out any Fortran code that declares "external system".  Apparently system in an intrinsic for gFortran.

Hope this helps,

Maurice


----- Original Message -----
From: Raymond Arritt <rwarritt at bruce.agron.iastate.edu>
Date: Tuesday, May 18, 2010 11:36 am
Subject: Re: [RegCNET] (no subject)
To: francis gachari <micrograp at yahoo.com>
Cc: regcnet at lists.ictp.it


> Dear Francis,
> 
> Did you change the line that begins with "FC ="?  It will need to say 
> "gfortran" 
> instead of "f77".
> 
> Also, for the gfortran compiler the FFLAGS definition will need to be 
> something like
> 
> FFLAGS = -O2 -fconvert=big-endian -std=gnu
> 
> I hope this is helpful for you.
> 
> Ray Arritt
> 
> 
> francis gachari wrote:
> > On Tuesday Dec 01 2009 Maurice wrote that he had written a 
> Makefile_gnu which may be used with gFortran compiler. This is due to 
> license restrictions on the IFC compiler. Is it possible to obtain a 
> copy of his Makefile_gnu? I have tried to write a makefile for 
> gfortran but  both ‘make’and ‘make –f’ still requires the ‘f77’ 
> command with my makefile! Are there any  other changes in the gfortran 
> environment to run  the terrain script? Thanks and Cheers!
> > 
> > Gachari F. 
> > Jomo Kenyatta university, Nairobi.
> > 
> > 
> >       
> > _______________________________________________
> > RegCNET mailing list
> > RegCNET at lists.ictp.it
> > 
> > 
> 
> -- 
>   Raymond W. Arritt                       tel       +1-424-242-0329
>   Professor                               tel (local only) 294-9870
>   Department of Agronomy                  fax:      +1-515-294-3163
>   Iowa State University,  3009 Agronomy Hall,  Ames, Iowa 50011 USA
>    ---------------------------------------------------------------
>      "You miss 100% of the shots you don't take." -- Wayne Gretzky
> _______________________________________________
> RegCNET mailing list
> RegCNET at lists.ictp.it



More information about the RegCNET mailing list