Compilation Flags for gfortran

Installing the WRF Preprocessing System

Compilation Flags for gfortran

Postby dbh409 » Thu Jan 27, 2011 12:51 pm

Hi all,

Does anyone know what compiler flags are needed for WPS when using gfortran? What I've tried is

Code: Select all
COMPRESSION_LIBS        =
COMPRESSION_INC         =
FDEFS                   =
FC              =       gfortran
SFC             =       gfortran
FFLAGS          =       -ffree-form -fno-underscoring
F77FLAGS        =       -ffixed-form -fno-underscoring
FNGFLAGS        =       $(FFLAGS)
LDFLAGS         =       -g
CC              =       gcc
SCC             =       gcc
CFLAGS          =       -g
CPP             =       /usr/bin/cpp -C -P -traditional
CPPFLAGS        =       -D_UNDERSCORE -DBYTESWAP -DLINUXG95 -DIO_NETCDF -DBIT32


Thanks,

Dave
dbh409
 
Posts: 89
Joined: Wed Mar 24, 2010 11:46 am

Re: Compilation Flags for gfortran

Postby dbh409 » Fri Feb 04, 2011 12:06 pm

OK, I got this figured out. The flags I had to use are as follows

Code: Select all
#ARCH    PC Linux x86_64, gfortran compiler,    serial, NO GRIB2
#
COMPRESSION_LIBS        =
COMPRESSION_INC         =
FDEFS                   =
FC              =       gfortran
SFC             =       gfortran
FFLAGS          =       -ffree-form -O -fconvert=big-endian -frecord-marker=4
F77FLAGS        =       -ffixed-form -O -fconvert=big-endian -frecord-marker=4
FNGFLAGS        =       $(FFLAGS)
LDFLAGS         =
CC              =       gcc
SCC             =       gcc
CFLAGS          =
CPP             =       /usr/bin/cpp -C -P -traditional
CPPFLAGS        =       -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32
RANLIB          =       ranlib


The frecord-marker flag was what really threw me off. Since I'm running gfortran 4.1.2, the default is 8 which doesn't play nice with some of the WRF code.
dbh409
 
Posts: 89
Joined: Wed Mar 24, 2010 11:46 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

cron