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