5 |
# |
# |
6 |
# Constantinos Evangelinos |
# Constantinos Evangelinos |
7 |
# |
# |
8 |
# Build options for the intel 11 fortran compiler |
# Build options for the intel 11 & 12 fortran compiler |
9 |
|
# |
10 |
|
# Tested on baudelaire (FC 13) with intel compiler v.11.1.073 (20100806) |
11 |
|
|
12 |
|
# OpenMP : tested on danton (FC 14) using intel compiler v.11.1.046 (20090630) |
13 |
|
# and also v.12.0.4 (20110427) |
14 |
|
|
15 |
#------- |
#------- |
16 |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
42 |
INCLUDES='' |
INCLUDES='' |
43 |
LIBS='' |
LIBS='' |
44 |
|
|
|
if test "x$DEVEL" != x ; then |
|
|
FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian -assume byterecl -O0 -g -debug all -debug-parameters all -noalign -fp-stack-check -check all -fpe0 -traceback -ftrapuv -fp-model strict -warn all" |
|
|
else |
|
|
FFLAGS="$FFLAGS -m64 -fPIC -W0 -WB -convert big_endian -assume byterecl" |
|
|
fi |
|
|
#- might want to use '-r8' for fizhi pkg: |
|
|
#FFLAGS="$FFLAGS -r8" |
|
|
|
|
45 |
if test "x$GENERIC" != x ; then |
if test "x$GENERIC" != x ; then |
46 |
PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2 |
PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2 |
47 |
else |
else |
48 |
PROCF=-xHost |
PROCF=-xHost |
49 |
fi |
fi |
50 |
# Note that the -mp switch is for ieee "maintain precision" and is |
|
51 |
# roughly equivalent to -ieee |
FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian -assume byterecl" |
52 |
# Note the addition of -g to circumvent bug with Intel 11. |
#- might want to use '-r8' for fizhi pkg: |
53 |
if test "x$IEEE" = x ; then |
#FFLAGS="$FFLAGS -r8" |
54 |
|
|
55 |
|
if test "x$IEEE" = x ; then #- with optimisation: |
56 |
FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF" |
FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF" |
57 |
else |
else |
58 |
if test "x$DEVEL" != x ; then |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
59 |
FOPTIM="$PROCF" |
FOPTIM="-O0 -fp-model source -noalign $PROCF" |
60 |
else |
else #- development/check options: |
61 |
FOPTIM="-O0 -fp-model source -noalign $PROCF" |
#FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict" |
62 |
fi |
FFLAGS="$FFLAGS -warn all -warn nounused" |
63 |
|
FOPTIM="-fpe0 -ftz -fp-stack-check -check all -ftrapuv" |
64 |
|
FOPTIM="$FOPTIM -O0 -noalign -g -traceback $PROCF" |
65 |
|
fi |
66 |
fi |
fi |
67 |
|
|
68 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
69 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
70 |
CFLAGS="-O2 -ip -m64 -fPIC $PROCF" |
CFLAGS="-O0 -ip -m64 -fPIC $PROCF" |
71 |
|
|
72 |
if [ "x$NETCDF_ROOT" != x ] ; then |
if [ "x$NETCDF_ROOT" != x ] ; then |
73 |
INCLUDEDIRS="${NETCDF_ROOT}/include" |
INCLUDEDIRS="${NETCDF_ROOT}/include" |