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

Annotation of /MITgcm/tools/build_options/linux_amd64_g77

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


Revision 1.8 - (hide annotations) (download)
Mon May 16 19:03:37 2011 UTC (12 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint63, checkpoint62z, checkpoint62y
Changes since 1.7: +6 -3 lines
specify CC compiler ; adjust NetCDF include dir for FC.14 standard location

1 edhill 1.1 #!/bin/bash
2     #
3 jmc 1.8 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_g77,v 1.7 2010/12/15 17:08:25 jmc Exp $
4 edhill 1.1 # $Name: $
5     #
6     # Build options for Suse 9 Opteron
7 jmc 1.3 # tested on Linux 2.4.21-102-smp (x86_64),
8     # Linux 2.6.26.8-57.fc8 (x86_64), Linux 2.6.27.9-159.fc10.x86_64
9 edhill 1.1 #
10    
11     FC=g77
12 jmc 1.8 CC=gcc34
13 jmc 1.6 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_EXTENDED_F77'
14 edhill 1.1 CPP='cpp -traditional -P'
15     NOOPTFLAGS='-O0'
16 jmc 1.3 EXTENDED_SRC_FLAG='-ffixed-line-length-132'
17 jmc 1.7 GET_FC_VERSION="--version"
18 jmc 1.6
19 edhill 1.1 # For IEEE, use the "-ffloat-store" option
20     if test "x$IEEE" = x ; then
21     FFLAGS='-Wimplicit -Wunused -Wuninitialized'
22     FOPTIM='-O3 -funroll-loops'
23     else
24     FFLAGS='-Wimplicit -Wunused -ffloat-store'
25 jmc 1.3 # FFLAGS="$FFLAGS -g -mfpmath=sse -msse -msse2 -fbounds-check"
26     FOPTIM='-O0'
27 edhill 1.1 fi
28 jmc 1.5 # for big objects:
29     FFLAGS="$FFLAGS -fPIC"
30     CFLAGS="-O0 -fPIC"
31 edhill 1.2
32     if test -d /usr/include/netcdf-3 ; then
33 jmc 1.4 #-- some FedoraCore standard location used to be "netcdf-3"
34 edhill 1.2 INCLUDES='-I/usr/include/netcdf-3'
35     if test -d /usr/lib64/netcdf-3 ; then
36     if test -f /usr/lib64/netcdf-3/libnetcdf_g77.a ; then
37     LIBS='-L/usr/lib64/netcdf-3 -lnetcdf_g77'
38     else
39     LIBS='-L/usr/lib64/netcdf-3'
40     fi
41     elif test -d /usr/lib/netcdf-3 ; then
42     if test -f /usr/lib/netcdf-3/libnetcdf_g77.a ; then
43     LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77'
44     else
45     LIBS='-L/usr/lib/netcdf-3'
46     fi
47     fi
48 jmc 1.8 elif test -d /usr/include/netcdf -o -f /usr/include/netcdf.h ; then
49 jmc 1.4 #-- allows a "compat"(gcc 3.4) 2nd version of libs for g77 , next to the
50     # standard one (for gfortran, gcc 4.x). But uses same include files.
51 jmc 1.8 if test -d /usr/include/netcdf ; then
52     INCLUDES='-I/usr/include/netcdf'
53     fi
54 jmc 1.4 if test -d /usr/lib64/netcdf34 ; then
55     if test -f /usr/lib64/netcdf34/libnetcdf_g77.a ; then
56     LIBS='-L/usr/lib64/netcdf34 -lnetcdf_g77'
57     else
58     LIBS='-L/usr/lib64/netcdf34'
59     fi
60     elif test -d /usr/lib/netcdf34 ; then
61     if test -f /usr/lib/netcdf34/libnetcdf_g77.a ; then
62     LIBS='-L/usr/lib/netcdf34 -lnetcdf_g77'
63     else
64     LIBS='-L/usr/lib/netcdf34'
65     fi
66     fi
67 edhill 1.2 elif test -d /usr/local/netcdf ; then
68     INCLUDES='-I/usr/local/netcdf/include'
69     LIBS='-L/usr/local/netcdf/lib'
70     fi
71    

  ViewVC Help
Powered by ViewVC 1.1.22