1 |
ce107 |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
jmc |
1.3 |
# $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia64_open64,v 1.2 2008/01/17 05:39:52 utke Exp $ |
4 |
ce107 |
1.1 |
# $Name: $ |
5 |
|
|
# |
6 |
jmc |
1.3 |
#== Warning ==> comments below have been copied from optfile linux_amd64_open64 |
7 |
|
|
# and do not strickly apply to this file <== |
8 |
ce107 |
1.1 |
# Build options for Fedore Core 4 x86-64 Opteron |
9 |
|
|
# tested on (Linux batsi.mit.edu 2.6.14-1.1656_FC4smp #1 SMP Thu Jan 5 22:26:33 EST 2006 x86_64 x86_64 x86_64 GNU/Linux) system 20071121 |
10 |
|
|
# |
11 |
jmc |
1.3 |
# Multithreaded tests require |
12 |
|
|
# export OMP_SLAVE_STACK_SIZE=400m |
13 |
|
|
# export OMP_NUM_THREADS=2 |
14 |
ce107 |
1.1 |
|
15 |
|
|
CC=opencc |
16 |
|
|
FC=openf90 |
17 |
utke |
1.2 |
F90C=openf90 |
18 |
jmc |
1.3 |
LINK=openf90 |
19 |
|
|
|
20 |
ce107 |
1.1 |
DEFINES='-DWORDLENGTH=4' |
21 |
|
|
CPP='cpp -traditional -P' |
22 |
jmc |
1.3 |
#MAKEDEPEND=/usr/X11R6/bin/makedepend |
23 |
|
|
EXTENDED_SRC_FLAG='-extend-source' |
24 |
|
|
F90FIXEDFORMAT='-fixedform -x f95' |
25 |
|
|
GET_FC_VERSION="--version" |
26 |
|
|
OMPFLAG='-openmp' |
27 |
|
|
#OMPFLAG='-openmp -OPT:early_mp=ON' |
28 |
|
|
|
29 |
ce107 |
1.1 |
NOOPTFLAGS='-O0 -g' |
30 |
|
|
NOOPTFILES='' |
31 |
|
|
|
32 |
jmc |
1.3 |
FFLAGS="$FFLAGS -convert big_endian" |
33 |
|
|
|
34 |
ce107 |
1.1 |
if test "x$DEVEL" != x ; then |
35 |
jmc |
1.3 |
FFLAGS="$FFLAGS -ffortran-bounds-check -trapuv -g" |
36 |
ce107 |
1.1 |
fi |
37 |
|
|
|
38 |
jmc |
1.3 |
if test "x$IEEE" = x ; then #- with optimisation: |
39 |
ce107 |
1.1 |
FOPTIM='-O3 -LNO:fusion=2 -OPT:roundoff=1:IEEE_arithmetic=3' # -funsafe-math-optimizations' |
40 |
jmc |
1.3 |
else #- no optimisation + IEEE : |
41 |
|
|
FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math' |
42 |
ce107 |
1.1 |
fi |
43 |
|
|
|
44 |
|
|
F90FLAGS=$FFLAGS |
45 |
|
|
F90OPTIM=$FOPTIM |
46 |
jmc |
1.3 |
CFLAGS='-O0' |
47 |
ce107 |
1.1 |
GSLLIB='-lgsl -lgslcblas' |
48 |
|
|
|
49 |
|
|
if [ "x$NETCDF_ROOT" != x ] ; then |
50 |
|
|
INCLUDEDIR="${NETCDF_ROOT}/include" |
51 |
|
|
INCLUDES="-I${NETCDF_ROOT}/include" |
52 |
|
|
LIBDIR="${NETCDF_ROOT}/lib" |
53 |
|
|
LIBS="-L${NETCDF_ROOT}/lib" |
54 |
|
|
elif [ "x$NETCDF_HOME" != x ]; then |
55 |
|
|
INCLUDEDIR="${NETCDF_HOME}/include" |
56 |
|
|
INCLUDES="-I${NETCDF_HOME}/include" |
57 |
|
|
LIBDIR="${NETCDF_HOME}/lib" |
58 |
|
|
LIBS="-L${NETCDF_HOME}/lib" |
59 |
|
|
elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then |
60 |
|
|
NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'` |
61 |
|
|
NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'` |
62 |
|
|
INCLUDEDIR="${NETCDF_INC}" |
63 |
|
|
INCLUDES="-I${NETCDF_INC}" |
64 |
|
|
LIBDIR="${NETCDF_LIB}" |
65 |
|
|
LIBS="-L${NETCDF_LIB}" |
66 |
|
|
elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then |
67 |
|
|
INCLUDEDIR="${NETCDF_INCDIR}" |
68 |
|
|
INCLUDES="-I${NETCDF_INCDIR}" |
69 |
|
|
LIBDIR="${NETCDF_LIBDIR}" |
70 |
|
|
LIBS="-L${NETCDF_LIBDIR}" |
71 |
|
|
elif test -d /usr/include/netcdf-3 ; then |
72 |
|
|
INCLUDES='-I/usr/include/netcdf-3' |
73 |
|
|
LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77' |
74 |
|
|
elif test -d /usr/include/netcdf ; then |
75 |
|
|
INCLUDES='-I/usr/include/netcdf' |
76 |
|
|
elif test -d /usr/local/netcdf ; then |
77 |
|
|
INCLUDES='-I/usr/local/netcdf/include' |
78 |
|
|
LIBS='-L/usr/local/netcdf/lib' |
79 |
|
|
elif test -d /usr/local/include/netcdf.inc ; then |
80 |
|
|
INCLUDES='-I/usr/local/include' |
81 |
|
|
LIBS='-L/usr/local/lib' |
82 |
|
|
fi |
83 |
|
|
|