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

Contents of /MITgcm/tools/build_options/linux_amd64_gfortran_greenplanet

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


Revision 1.2 - (show annotations) (download)
Tue Apr 6 17:17:38 2010 UTC (13 years, 11 months ago) by yunx
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, 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, checkpoint65, checkpoint63, 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, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, HEAD
Changes since 1.1: +1 -2 lines
delect a blank line to test the mailing list.

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_gfortran_greenplanet,v 1.1 2010/04/05 20:58:31 yunx Exp $
4 # $Name: $
5 #
6 # tested on greenplanet.ps.uci.edu
7 # Linux greenplanet.ps.uci.edu 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
8 # GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
9 # Copyright (C) 2007 Free Software Foundation, Inc.
10
11 FC=gfortran
12 F90C=gfortran
13 CC=gcc
14 DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR'
15 CPP='cpp -traditional -P'
16 NOOPTFLAGS='-O0'
17 EXTENDED_SRC_FLAG='-ffixed-line-length-132'
18 OMPFLAG='-fopenmp'
19
20 if test "x$DEVEL" != x ; then
21 FFLAGS='-g -Wall -W -ffpe-trap=invalid,zero,overflow -fbounds-check'
22 else
23 FFLAGS=''
24 fi
25
26 # Requires gfortran from 2006 onwards for -fconvert=big-endian
27 FFLAGS="$FFLAGS -fconvert=big-endian -fimplicit-none"
28
29 if test "x$IEEE" = x ; then
30 # No need for IEEE-754
31 FOPTIM='-O3 -funroll-loops'
32 else
33 # Try to follow IEEE-754
34 # these may also be useful, but require specific gfortran versions:
35 # -Wnonstd-intrinsics for gfortran <= 4.3
36 # -Wintrinsics-std for gfortran >= 4.4
37 # -Wno-tabs for gfortran >= 4.3
38 FFLAGS="$FFLAGS -Waliasing -Wampersand -Wsurprising -Wline-truncation"
39 # to get plenty of warnings :
40 # FFLAGS="$FFLAGS -Wconversion -Wimplicit-interface -Wunused-labels"
41 FOPTIM='-O0'
42 # for automatic testing with testreport (but no relation with IEEE arithmetic):
43 FOPTIM="$FOPTIM -g -ffpe-trap=invalid,zero,overflow -fbounds-check"
44 fi
45 F90FLAGS=$FFLAGS
46 F90OPTIM=$FOPTIM
47 CFLAGS=$FOPTIM
48
49 if [ "x$NETCDF_ROOT" != x ] ; then
50 INCLUDEDIR="${NETCDF_ROOT}/include"
51 INCLUDES="-I${NETCDF_ROOT}/include"
52 LIBDIR="${NETCDF_ROOT}/lib"
53 LIBS="-L${NETCDF_ROOT}/lib"
54 elif [ "x$NETCDF_HOME" != x ]; then
55 INCLUDEDIR="${NETCDF_HOME}/include"
56 INCLUDES="-I${NETCDF_HOME}/include"
57 LIBDIR="${NETCDF_HOME}/lib"
58 LIBS="-L${NETCDF_HOME}/lib"
59 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
60 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
61 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
62 INCLUDEDIR="${NETCDF_INC}"
63 INCLUDES="-I${NETCDF_INC}"
64 LIBDIR="${NETCDF_LIB}"
65 LIBS="-L${NETCDF_LIB}"
66 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
67 INCLUDEDIR="${NETCDF_INCDIR}"
68 INCLUDES="-I${NETCDF_INCDIR}"
69 LIBDIR="${NETCDF_LIBDIR}"
70 LIBS="-L${NETCDF_LIBDIR}"
71 elif test -d /sopt/netcdf/netcdf3-gcc-serial; then
72 INCLUDES='-I/sopt/netcdf/netcdf3-gcc-serial/include'
73 LIBS='-L/sopt/netcdf/netcdf3-gcc-serial/lib'
74 elif test -d /usr/include/netcdf ; then
75 INCLUDES='-I/usr/include/netcdf'
76 elif test -d /usr/local/netcdf ; then
77 INCLUDES='-I/usr/local/netcdf/include'
78 LIBS='-L/usr/local/netcdf/lib'
79 elif test -d /usr/local/include/netcdf.inc ; then
80 INCLUDES='-I/usr/local/include'
81 LIBS='-L/usr/local/lib64'
82 fi

  ViewVC Help
Powered by ViewVC 1.1.22