13 |
|
|
14 |
# OpenMP : Tested on dickens with gcc-gfortran v4.3.2 as shipped with FC 10 |
# OpenMP : Tested on dickens with gcc-gfortran v4.3.2 as shipped with FC 10 |
15 |
#------- |
#------- |
16 |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
17 |
# and generally, needs to increase the thread stack-size: |
# and generally, needs to increase the thread stack-size: |
18 |
# - sh,bash: |
# - sh,bash: |
19 |
# > export OMP_NUM_THREADS=2 |
# > export OMP_NUM_THREADS=2 |
30 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
31 |
NOOPTFLAGS='-O0' |
NOOPTFLAGS='-O0' |
32 |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
33 |
|
GET_FC_VERSION="--version" |
34 |
OMPFLAG='-fopenmp' |
OMPFLAG='-fopenmp' |
35 |
|
|
36 |
if test "x$DEVEL" != x ; then |
if test "x$DEVEL" != x ; then |
41 |
|
|
42 |
# Requires gfortran from 2006 onwards for -fconvert=big-endian |
# Requires gfortran from 2006 onwards for -fconvert=big-endian |
43 |
FFLAGS="$FFLAGS -fconvert=big-endian -fimplicit-none" |
FFLAGS="$FFLAGS -fconvert=big-endian -fimplicit-none" |
44 |
|
# for big objects: |
45 |
|
FFLAGS="$FFLAGS -fPIC" |
46 |
|
|
47 |
if test "x$IEEE" = x ; then |
if test "x$IEEE" = x ; then |
48 |
# No need for IEEE-754 |
# No need for IEEE-754 |
52 |
# these may also be useful, but require specific gfortran versions: |
# these may also be useful, but require specific gfortran versions: |
53 |
# -Wnonstd-intrinsics for gfortran <= 4.3 |
# -Wnonstd-intrinsics for gfortran <= 4.3 |
54 |
# -Wintrinsics-std for gfortran >= 4.4 |
# -Wintrinsics-std for gfortran >= 4.4 |
55 |
# -Wno-tabs for gfortran >= 4.3 |
# -Wno-tabs for gfortran >= 4.3 |
56 |
FFLAGS="$FFLAGS -Waliasing -Wampersand -Wsurprising -Wline-truncation" |
FFLAGS="$FFLAGS -Waliasing -Wampersand -Wsurprising -Wline-truncation" |
57 |
# to get plenty of warnings : |
# to get plenty of warnings : |
58 |
# FFLAGS="$FFLAGS -Wconversion -Wimplicit-interface -Wunused-labels" |
# FFLAGS="$FFLAGS -Wconversion -Wimplicit-interface -Wunused-labels" |
62 |
fi |
fi |
63 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
64 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
65 |
CFLAGS=$FOPTIM |
CFLAGS='-O0 -fPIC' |
66 |
|
|
67 |
if [ "x$NETCDF_ROOT" != x ] ; then |
if [ "x$NETCDF_ROOT" != x ] ; then |
68 |
INCLUDEDIR="${NETCDF_ROOT}/include" |
INCLUDEDIR="${NETCDF_ROOT}/include" |