/[MITgcm]/MITgcm/tools/build_options/linux_ia32_open64+mth
ViewVC logotype

Contents of /MITgcm/tools/build_options/linux_ia32_open64+mth

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Fri Aug 14 20:28:19 2009 UTC (14 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62b, checkpoint62a, checkpoint61x, checkpoint61y, checkpoint61v, checkpoint61w, checkpoint61u, checkpoint61z, checkpoint62
Changes since 1.1: +9 -6 lines
-reduce optimisation to just -O2 (-O3 unsafe on ao: break ideal_2D_ocean)
-multi-threaded: put 2 files in nooptlist (seem to fix monitor Pb with open64/4.1)

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_open64+mth,v 1.1 2009/06/22 23:13:30 ce107 Exp $
4 # $Name: $
5 #
6 # Multithreaded tests require
7 # export OMP_SLAVE_STACK_SIZE=400m
8 # export OMP_NUM_THREADS=2
9 #
10 # Note: use just -O2 optimisation to avoid some wierd problems with -O3
11 # on aces (open64/4.1 & 4.2) (ideal_2D_ocean)
12
13 CC=opencc
14 FC=openf90
15 F90C=openf90
16 F90FIXEDFORMAT='-fixedform -x f95'
17 LD=openf90
18 DEFINES='-DWORDLENGTH=4 -DUSE_OMP_THREADING'
19 CPP='cpp -traditional -P'
20 MAKEDEPEND=/usr/X11R6/bin/makedepend
21 NOOPTFLAGS='-O0 -g'
22 # to avoid a bug in ealier version (4.1) of compiler with openMP:
23 NOOPTFILES='mon_set_iounit.F mon_init.F'
24
25 if test "x$DEVEL" != x ; then
26 FFLAGS='-m32 -convert big_endian -openmp -ffortran-bounds-check -trapuv -g'
27 else
28 FFLAGS='-m32 -convert big_endian -openmp'
29 fi
30
31 if test "x$IEEE" = x ; then
32 # No need for IEEE-754
33 FOPTIM='-O2 -LNO:fusion=2 -OPT:roundoff=1:IEEE_arithmetic=3 -OPT:early_mp=ON' # -funsafe-math-optimizations'
34 else
35 # Try to follow IEEE-754
36 FOPTIM='-O2 -LNO:fusion=2 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math -OPT:early_mp=ON'
37 fi
38
39 F90FLAGS=$FFLAGS
40 F90OPTIM=$FOPTIM
41 CFLAGS='-O2 -m32 -openmp'
42 GSLLIB='-lgsl -lgslcblas'
43
44 if [ "x$NETCDF_ROOT" != x ] ; then
45 INCLUDEDIR="${NETCDF_ROOT}/include"
46 INCLUDES="-I${NETCDF_ROOT}/include"
47 LIBDIR="${NETCDF_ROOT}/lib"
48 LIBS="-L${NETCDF_ROOT}/lib"
49 elif [ "x$NETCDF_HOME" != x ]; then
50 INCLUDEDIR="${NETCDF_HOME}/include"
51 INCLUDES="-I${NETCDF_HOME}/include"
52 LIBDIR="${NETCDF_HOME}/lib"
53 LIBS="-L${NETCDF_HOME}/lib"
54 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
55 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
56 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
57 INCLUDEDIR="${NETCDF_INC}"
58 INCLUDES="-I${NETCDF_INC}"
59 LIBDIR="${NETCDF_LIB}"
60 LIBS="-L${NETCDF_LIB}"
61 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
62 INCLUDEDIR="${NETCDF_INCDIR}"
63 INCLUDES="-I${NETCDF_INCDIR}"
64 LIBDIR="${NETCDF_LIBDIR}"
65 LIBS="-L${NETCDF_LIBDIR}"
66 elif test -d /usr/include/netcdf-3 ; then
67 INCLUDES='-I/usr/include/netcdf-3'
68 LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77'
69 elif test -d /usr/include/netcdf ; then
70 INCLUDES='-I/usr/include/netcdf'
71 elif test -d /usr/local/netcdf ; then
72 INCLUDES='-I/usr/local/netcdf/include'
73 LIBS='-L/usr/local/netcdf/lib'
74 elif test -d /usr/local/include/netcdf.inc ; then
75 INCLUDES='-I/usr/local/include'
76 LIBS='-L/usr/local/lib'
77 fi

  ViewVC Help
Powered by ViewVC 1.1.22