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

Contents of /MITgcm/tools/build_options/linux_amd64_g77

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


Revision 1.9 - (show annotations) (download)
Mon Sep 23 23:36:05 2013 UTC (10 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64o, 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.8: +16 -12 lines
- to compile big setup, try to use "-mcmodel=medium" instead of "-fPIC":
  check that both works on baudelaire (for g77) and acesgrid (for open64);
  but only the 1rst one works with FC.19
- also remove CPP setting (was identical to genmake2 default).

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_g77,v 1.8 2011/05/16 19:03:37 jmc Exp $
4 # $Name: $
5 #
6 # Build options for g77 compiler (compat-gcc-34-g77) on Linux AMD64 platform
7 # Tested on Linux 2.4.21-102-smp (x86_64),
8 # on Fedora Core 8, 10 (e.g.: dickens), 13 (e.g.: baudelaire),
9 # 14, 15 (e.g.: acesgrid), 17, 19
10
11 CC=gcc34
12 FC=g77
13 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_EXTENDED_F77'
14 EXTENDED_SRC_FLAG='-ffixed-line-length-132'
15 GET_FC_VERSION="--version"
16
17 NOOPTFLAGS='-O0'
18 CFLAGS='-O0'
19
20 # For IEEE, use the "-ffloat-store" option
21 if test "x$IEEE" = x ; then
22 FFLAGS='-Wimplicit -Wunused -Wuninitialized'
23 FOPTIM='-O3 -funroll-loops'
24 else
25 FFLAGS='-Wimplicit -Wunused -ffloat-store'
26 # FFLAGS="$FFLAGS -g -mfpmath=sse -msse -msse2 -fbounds-check"
27 FOPTIM='-O0'
28 fi
29
30 #- for big setups, compile & link with "-fPIC" or set memory-model to "medium":
31 #CFLAGS="$CFLAGS -fPIC"
32 #FFLAGS="$FFLAGS -fPIC"
33 #- with FC 19, need to use this without -fPIC (which cancels -mcmodel option):
34 CFLAGS="$CFLAGS -mcmodel=medium"
35 FFLAGS="$FFLAGS -mcmodel=medium"
36
37 if test -d /usr/include/netcdf-3 ; then
38 #-- some FedoraCore standard location used to be "netcdf-3"
39 INCLUDES='-I/usr/include/netcdf-3'
40 if test -d /usr/lib64/netcdf-3 ; then
41 if test -f /usr/lib64/netcdf-3/libnetcdf_g77.a ; then
42 LIBS='-L/usr/lib64/netcdf-3 -lnetcdf_g77'
43 else
44 LIBS='-L/usr/lib64/netcdf-3'
45 fi
46 elif test -d /usr/lib/netcdf-3 ; then
47 if test -f /usr/lib/netcdf-3/libnetcdf_g77.a ; then
48 LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77'
49 else
50 LIBS='-L/usr/lib/netcdf-3'
51 fi
52 fi
53 elif test -d /usr/include/netcdf -o -f /usr/include/netcdf.h ; then
54 #-- allows a "compat"(gcc 3.4) 2nd version of libs for g77 , next to the
55 # standard one (for gfortran, gcc 4.x). But uses same include files.
56 if test -d /usr/include/netcdf ; then
57 INCLUDES='-I/usr/include/netcdf'
58 fi
59 if test -d /usr/lib64/netcdf34 ; then
60 if test -f /usr/lib64/netcdf34/libnetcdf_g77.a ; then
61 LIBS='-L/usr/lib64/netcdf34 -lnetcdf_g77'
62 else
63 LIBS='-L/usr/lib64/netcdf34'
64 fi
65 elif test -d /usr/lib/netcdf34 ; then
66 if test -f /usr/lib/netcdf34/libnetcdf_g77.a ; then
67 LIBS='-L/usr/lib/netcdf34 -lnetcdf_g77'
68 else
69 LIBS='-L/usr/lib/netcdf34'
70 fi
71 fi
72 elif test -d /usr/local/netcdf ; then
73 INCLUDES='-I/usr/local/netcdf/include'
74 LIBS='-L/usr/local/netcdf/lib'
75 fi

  ViewVC Help
Powered by ViewVC 1.1.22