/[MITgcm]/MITgcm/tools/build_options/linux_ia32_g77
ViewVC logotype

Contents of /MITgcm/tools/build_options/linux_ia32_g77

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


Revision 1.30 - (show annotations) (download)
Mon Jul 22 18:40:45 2013 UTC (10 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64k, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.29: +4 -4 lines
- remove MPI_HEADER_FILES_INC setting (no longer used)
- for now, comment out MPI_HEADER_FILES list (let genmake2 find which
   MPI header is needed)

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_g77,v 1.29 2011/09/08 23:13:20 jmc Exp $
4 # $Name: $
5 #
6 # tested on faulks with gcc-g77 v3.4.6 (with FC 6)
7 # tested with MPI on (old) aces cluster (gcc-g77 3.3.3, FC 2), using:
8 # module add mpich/gnu
9 # export MPI_INC_DIR=/usr/local/pkg/mpich/mpich-gcc/include
10
11 if test "x$MPI" = xtrue ; then
12 CC='mpicc'
13 FC='mpif77'
14 LINK=$FC
15 else
16 CC='gcc'
17 FC='g77'
18 LINK=$FC
19 fi
20
21 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_EXTENDED_F77'
22 CPP='cpp -traditional -P'
23 EXTENDED_SRC_FLAG='-ffixed-line-length-132'
24 GET_FC_VERSION="--version"
25
26 NOOPTFLAGS='-O0'
27 NOOPTFILES=''
28
29 has_sse2=f
30 grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t
31
32 FFLAGS="$FFLAGS -Wimplicit -Wunused"
33
34 if test "x$IEEE" = x ; then #- with optimisation:
35 #- note(jmc): on aces, sse & sse2 are faster; -O3 is not always faster than -O2
36 if test "x$has_sse2" = xt ; then
37 FFLAGS="$FFLAGS -mfpmath=sse -msse -msse2"
38 fi
39 #FOPTIM='-O3 -malign-double -funroll-loops'
40 # Problems with "-funroll-loops" for some set-up, e.g. tutorial_held_suarez_cs
41 FOPTIM='-O3 -malign-double'
42 else #- no optimisation + IEEE :
43 if test "x$has_sse2" = xt ; then
44 FFLAGS="$FFLAGS -mfpmath=sse -msse -msse2"
45 else
46 FFLAGS="$FFLAGS -ffloat-store"
47 fi
48 FOPTIM='-O0 -malign-double'
49 fi
50
51 CFLAGS="-O0"
52 GSLINC=''
53 GSLLIB='-lgsl -lgslcblas'
54 PAPIINC='-I/usr/local/pkg/papi/papi-3.0.8.1/p4/include'
55 PAPILIB='-L/usr/local/pkg/papi/papi-3.0.8.1/p4/lib -lpapi'
56
57 INCLUDEDIRS=''
58 INCLUDES=''
59 LIBS=''
60
61 if test -d /usr/include/netcdf-3 ; then
62 INCLUDES='-I/usr/include/netcdf-3'
63 if test -d /usr/lib/netcdf-3 ; then
64 if test -f /usr/lib/netcdf-3/libnetcdf_g77.a ; then
65 LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77'
66 else
67 LIBS='-L/usr/lib/netcdf-3'
68 fi
69 fi
70 elif test -d /usr/include/netcdf ; then
71 INCLUDES='-I/usr/include/netcdf'
72 elif test -d /usr/local/netcdf ; then
73 INCLUDES='-I/usr/local/netcdf/include'
74 LIBS='-L/usr/local/netcdf/lib'
75 fi
76
77 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
78 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
79 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
80 #- used for parallel (MPI) DIVA
81 MPIINCLUDEDIR="$MPI_INC_DIR"
82 #MPI_HEADER_FILES='mpif.h mpiof.h'
83 fi

  ViewVC Help
Powered by ViewVC 1.1.22