40 |
fi |
fi |
41 |
|
|
42 |
DEFINES='-DWORDLENGTH=4' |
DEFINES='-DWORDLENGTH=4' |
|
CPP='cpp -traditional -P' |
|
43 |
EXTENDED_SRC_FLAG='-extend-source' |
EXTENDED_SRC_FLAG='-extend-source' |
44 |
F90FIXEDFORMAT='-fixedform -x f95' |
F90FIXEDFORMAT='-fixedform -x f95' |
45 |
GET_FC_VERSION="--version" |
GET_FC_VERSION="--version" |
49 |
NOOPTFLAGS='-O0 -g' |
NOOPTFLAGS='-O0 -g' |
50 |
NOOPTFILES='' |
NOOPTFILES='' |
51 |
|
|
52 |
FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian" |
CFLAGS='-O0 -m64' |
53 |
|
FFLAGS="$FFLAGS -m64 -convert big_endian" |
54 |
|
|
55 |
|
#- for big setups, compile & link with "-fPIC" or set memory-model to "medium": |
56 |
|
#CFLAGS="$CFLAGS -fPIC" |
57 |
|
#FFLAGS="$FFLAGS -fPIC" |
58 |
|
#- with FC 19, need to use this without -fPIC (which cancels -mcmodel option): |
59 |
|
CFLAGS="$CFLAGS -mcmodel=medium" |
60 |
|
FFLAGS="$FFLAGS -mcmodel=medium" |
61 |
#- might want to use '-r8' for fizhi pkg: |
#- might want to use '-r8' for fizhi pkg: |
62 |
#FFLAGS="$FFLAGS -r8" |
#FFLAGS="$FFLAGS -r8" |
63 |
|
|
69 |
FOPTIM='-O3 -OPT:Ofast:roundoff=1:IEEE_arithmetic=3 -ffast-math -LNO:fusion=2' |
FOPTIM='-O3 -OPT:Ofast:roundoff=1:IEEE_arithmetic=3 -ffast-math -LNO:fusion=2' |
70 |
#- high optimisation (-O3), might find Pb with few S/R; fully safe: switch to -O2: |
#- high optimisation (-O3), might find Pb with few S/R; fully safe: switch to -O2: |
71 |
#FOPTIM='-O3 -OPT:roundoff=1:IEEE_arithmetic=3 -LNO:fusion=2' |
#FOPTIM='-O3 -OPT:roundoff=1:IEEE_arithmetic=3 -LNO:fusion=2' |
72 |
NOOPTFLAGS='-O3 -OPT:roundoff=1:IEEE_arithmetic=2 -LNO:fusion=2' |
#- safer: switch to -O2 with IEEE_arithmetic=2 (to fix some restart Pb): |
73 |
NOOPTFILES='seaice_evp.F' |
#FOPTIM='-O2 -OPT:roundoff=1:IEEE_arithmetic=2 -ffast-math -LNO:fusion=2' |
74 |
else |
else |
75 |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
76 |
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' |
82 |
|
|
83 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
84 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
|
CFLAGS='-O0 -m64 -fPIC' |
|
85 |
GSLLIB='-lgsl -lgslcblas' |
GSLLIB='-lgsl -lgslcblas' |
86 |
|
|
87 |
INCLUDEDIRS='' |
INCLUDEDIRS='' |
126 |
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
127 |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
128 |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
129 |
|
#- used for parallel (MPI) DIVA |
130 |
MPIINCLUDEDIR="$MPI_INC_DIR" |
MPIINCLUDEDIR="$MPI_INC_DIR" |
131 |
MPI_HEADER_FILES='mpif.h mpiof.h' |
#MPI_HEADER_FILES='mpif.h mpiof.h' |
|
MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h' |
|
132 |
fi |
fi |
|
|
|