11 |
# 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 |
12 |
# on baudelaire with gcc-gfortran v4.4.5 as shipped with FC 13 |
# on baudelaire with gcc-gfortran v4.4.5 as shipped with FC 13 |
13 |
# on danton with gcc-gfortran v4.5.1 as shipped with FC 14 |
# on danton with gcc-gfortran v4.5.1 as shipped with FC 14 |
14 |
|
# with gcc-gfortran v4.7.x as shipped with FC 17 |
15 |
|
# with gcc-gfortran v4.8.1 as shipped with FC 19 |
16 |
# on acesgrid with gcc-gfortran v4.6.0 as shipped with FC 15 |
# on acesgrid with gcc-gfortran v4.6.0 as shipped with FC 15 |
17 |
# |
# |
18 |
# MPI : Tested on acesgrid (Fedora Core 15), using: |
# MPI : Tested on acesgrid (Fedora Core 15), using: |
57 |
fi |
fi |
58 |
|
|
59 |
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
|
CPP='cpp -traditional -P' |
|
60 |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
61 |
F90FIXEDFORMAT='-ffixed-form' |
F90FIXEDFORMAT='-ffixed-form' |
62 |
GET_FC_VERSION="--version" |
GET_FC_VERSION="--version" |
65 |
NOOPTFLAGS='-O0' |
NOOPTFLAGS='-O0' |
66 |
NOOPTFILES='' |
NOOPTFILES='' |
67 |
|
|
68 |
# Requires gfortran from 2006 onwards for -fconvert=big-endian |
CFLAGS='-O0' |
69 |
|
#- Requires gfortran from 2006 onwards for -fconvert=big-endian |
70 |
FFLAGS="$FFLAGS -fconvert=big-endian -fimplicit-none" |
FFLAGS="$FFLAGS -fconvert=big-endian -fimplicit-none" |
71 |
# for big objects: |
#- for big setups, compile & link with "-fPIC" or set memory-model to "medium": |
72 |
FFLAGS="$FFLAGS -fPIC" |
#CFLAGS="$CFLAGS -fPIC" |
73 |
|
#FFLAGS="$FFLAGS -fPIC" |
74 |
|
#- with FC 19, need to use this without -fPIC (which cancels -mcmodel option): |
75 |
|
CFLAGS="$CFLAGS -mcmodel=medium" |
76 |
|
FFLAGS="$FFLAGS -mcmodel=medium" |
77 |
#- might want to use '-fdefault-real-8' for fizhi pkg: |
#- might want to use '-fdefault-real-8' for fizhi pkg: |
78 |
#FFLAGS="$FFLAGS -fdefault-real-8 -fdefault-double-8" |
#FFLAGS="$FFLAGS -fdefault-real-8 -fdefault-double-8" |
79 |
|
|
85 |
#FOPTIM='-O2 -funroll-loops' |
#FOPTIM='-O2 -funroll-loops' |
86 |
else |
else |
87 |
# these may also be useful, but require specific gfortran versions: |
# these may also be useful, but require specific gfortran versions: |
88 |
# -Wnonstd-intrinsics for gfortran <= 4.3 |
# -Wnonstd-intrinsics for gfortran <= 4.3 |
89 |
# -Wintrinsics-std for gfortran >= 4.4 |
# -Wintrinsics-std for gfortran >= 4.4 |
90 |
# -Wno-tabs for gfortran >= 4.3 |
# -Wno-tabs for gfortran >= 4.3 |
91 |
FFLAGS="$FFLAGS -Waliasing -Wampersand -Wsurprising -Wline-truncation" |
# -Wno-unused-dummy-argument for gfortran >= 4.6 |
92 |
|
#FFLAGS="$FFLAGS -Waliasing -Wampersand -Wsurprising -Wline-truncation" |
93 |
|
#- or simply: |
94 |
|
FFLAGS="$FFLAGS -Wall -Wno-unused-dummy-argument" |
95 |
#- to get plenty of warnings: -Wall -Wextra (older form: -Wall -W) or: |
#- to get plenty of warnings: -Wall -Wextra (older form: -Wall -W) or: |
96 |
#FFLAGS="$FFLAGS -Wconversion -Wimplicit-interface -Wunused-labels" |
#FFLAGS="$FFLAGS -Wconversion -Wimplicit-interface -Wunused-labels" |
97 |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
104 |
|
|
105 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
106 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
|
CFLAGS='-O0 -fPIC' |
|
107 |
|
|
108 |
INCLUDEDIRS='' |
INCLUDEDIRS='' |
109 |
INCLUDES='' |
INCLUDES='' |
147 |
LIBS='-L/usr/lib64' |
LIBS='-L/usr/lib64' |
148 |
fi |
fi |
149 |
|
|
150 |
|
if [ -n "$MPI_HOME" -a -z "$MPI_INC_DIR" ]; then |
151 |
|
MPI_INC_DIR="$MPI_HOME/include" |
152 |
|
fi |
153 |
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
154 |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
155 |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |