25 |
|
|
26 |
DEFINES='-DWORDLENGTH=4' |
DEFINES='-DWORDLENGTH=4' |
27 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
28 |
|
EXTENDED_SRC_FLAG='-extend-source' |
29 |
GET_FC_VERSION="-v" |
GET_FC_VERSION="-v" |
30 |
OMPFLAG='-openmp' |
OMPFLAG='-openmp' |
31 |
|
#OMPFLAG='-openmp -OPT:early_mp=ON' |
32 |
|
|
33 |
NOOPTFLAGS='-O0 -g' |
NOOPTFLAGS='-O0 -g' |
34 |
NOOPTFILES='' |
NOOPTFILES='' |
35 |
|
|
36 |
if test "x$DEVEL" != x ; then |
FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian" |
37 |
FFLAGS='-m64 -convert big_endian -fPIC -ffortran-bounds-check -trapuv -g' |
#- might want to use '-r8' for fizhi pkg: |
38 |
else |
#FFLAGS="$FFLAGS -r8" |
|
FFLAGS='-m64 -convert big_endian -fPIC' |
|
|
fi |
|
39 |
|
|
40 |
if test "x$IEEE" = x ; then |
if test "x$IEEE" = x ; then #- with optimisation: |
41 |
# No need for IEEE-754 |
#- full optimisation, trips over MITgcm code because of compiler problems: |
42 |
FOPTIM='-Ofast -LNO:fusion=2 -funsafe-math-optimizations' |
#FOPTIM='-Ofast -LNO:fusion=2 -funsafe-math-optimizations' |
43 |
|
#- high optimisation (-O3), might find Pb with few S/R; fully safe: switch to -O2: |
44 |
|
FOPTIM='-O3 -LNO:fusion=2 -funsafe-math-optimizations' |
45 |
else |
else |
46 |
# Try to follow IEEE-754 |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
47 |
|
FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math' |
48 |
|
else #- development/check options: |
49 |
|
FFLAGS="$FFLAGS -ffortran-bounds-check -trapuv -g" |
50 |
FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math' |
FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math' |
51 |
|
fi |
52 |
fi |
fi |
53 |
|
|
54 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |