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

Annotation of /MITgcm/tools/build_options/darwin_ia32_gfortran

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


Revision 1.16 - (hide annotations) (download)
Mon Jul 22 18:40:45 2013 UTC (10 years, 9 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.15: +5 -5 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 dfer 1.1 #!/bin/bash
2 jmc 1.10 #
3 jmc 1.16 # $Header: /u/gcmpack/MITgcm/tools/build_options/darwin_ia32_gfortran,v 1.15 2012/06/22 17:06:05 jmc Exp $
4 jmc 1.10 # $Name: $
5 dfer 1.1
6 jmc 1.11 # Tested on MacBook Pro with Snow Leopard
7     #- on 20-Nov-2009, without MPI:
8     # gcc and gfortran obtained from
9 dimitri 1.9 # http://hpc.sourceforge.net/
10     # http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz?download
11     # http://prdownloads.sourceforge.net/hpc/gfortran-snwleo-intel-bin.tar.gz?download
12 jmc 1.11 #
13 jmc 1.16 # gfortran (version 4.6.0)
14 mlosch 1.13 # OpenMPI (version 1.4.3)
15 jmc 1.11
16 jmc 1.16 #-- Note: default location of NetCDF & MPI setting provided in this optfile
17 jmc 1.11 # are not standard. For this reason, you might need:
18     # 1) to set NETCDF_ROOT to where the NetCDF is installed, e.g.:
19     # export NETCDF_ROOT='/usr/NetCDF'
20     # 2) for MPI, to set environment variable MPI_INC_DIR to the include
21     # directory of your MPI implementation
22    
23     if test "x$MPI" = xtrue ; then
24     # CC=mpicc
25     FC=mpif90
26     LINK=$FC
27     else
28     # CC=gcc
29     FC=gfortran
30     LINK=$FC
31     fi
32 dfer 1.1
33 jmc 1.11 #FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) _ ## X ## _"
34     #FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X"
35     #FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
36 mlosch 1.13 # for adjoint runs we might need this
37 jmc 1.15 #MAKEDEPEND=tools_xmakedepend
38 jmc 1.11
39     S64='$(TOOLSDIR)/set64bitConst.sh'
40     DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR'
41 heimbach 1.2 CPP='/usr/bin/cpp -traditional -P'
42 jmc 1.11 EXTENDED_SRC_FLAG='-ffixed-line-length-132'
43    
44 dimitri 1.9 #Following flag is needed when using 32-bit gfortran with 64-bit gcc,
45     #as can be the case right after switching to Snow Leopard.
46     #CFLAGS='-arch i386'
47 jmc 1.11
48 dfer 1.1 NOOPTFLAGS='-O0'
49 jmc 1.11 NOOPTFILES=''
50    
51 jmc 1.15 FFLAGS="$FFLAGS -fsecond-underscore -fconvert=big-endian"
52     #- might want to use '-fdefault-real-8' for fizhi pkg:
53     #FFLAGS="$FFLAGS -fdefault-real-8 -fdefault-double-8"
54    
55 jmc 1.11 if test "x$IEEE" = x ; then #- with optimisation:
56 jmc 1.12 FFLAGS="$FFLAGS -Wunused -Wuninitialized"
57 dfer 1.1 FOPTIM='-O3 -funroll-loops'
58 dfer 1.4 NOOPTFLAGS='-O2 -funroll-loops'
59 mlosch 1.14 # do we still need these?
60     # NOOPTFILES="$NOOPTFILES gad_c4_adv_x.F gad_u3_adv_x.F"
61     # add more optimization if you are bold enough
62     # FOPTIM="$FOPTIM -ftree-vectorize"
63 mlosch 1.13 # with gcc version 4.6.0 20101106 (experimental) (GCC) I needed this
64     # for better optimization (with bugs), more recent versions of gfortran
65     # might not need this any longer
66     # FOPTIM='-O3 -funroll-loops -ftree-vectorize'
67     # NOOPTFLAGS='-O1 -funroll-loops -ftree-vectorize'
68     # NOOPTFILES='exch2_uv_agrid_3d_r4.F exch2_uv_agrid_3d_r8.F exch2_uv_agrid_3d_rl.F exch2_uv_agrid_3d_rs.F exch2_uv_bgrid_3d_r4.F exch2_uv_cgrid_3d_r4.F exch2_uv_cgrid_3d_r8.F exch2_uv_cgrid_3d_rl.F exch2_uv_cgrid_3d_rs.F exch_uv_agrid_3d_r8.F exch_uv_agrid_3d_rl.F exch_uv_agrid_3d_rs.F'
69 jmc 1.11 else #- no optimisation + IEEE :
70 jmc 1.12 FFLAGS="$FFLAGS -Wunused -ffloat-store"
71 dfer 1.1 FOPTIM='-O0'
72     fi
73    
74 jmc 1.11 INCLUDEDIRS=''
75     INCLUDES=''
76     LIBS=''
77    
78 mlosch 1.13 NETCDF_ROOT=/usr/local
79 jmc 1.11 if [ "x$NETCDF_ROOT" != x ] ; then
80     INCLUDES="-I${NETCDF_ROOT}/include"
81     LIBS="-L${NETCDF_ROOT}/lib"
82     else
83     #-- default NetCDF location: from former darwin_ia32_gfortran optfile:
84 mlosch 1.13 # If you optain netcdf libraries from fink, this is where they will
85     # be. I found that it is easier to get everything from
86     # sourceforge.net, then the libraries will be in /usr/local
87 jmc 1.11 INCLUDES='-I/sw/include'
88     LIBS='-L/sw/lib'
89     fi
90 dfer 1.1
91 jmc 1.11 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
92     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
93 jmc 1.16 #- used for parallel (MPI) DIVA
94 jmc 1.11 MPIINCLUDEDIR="$MPI_INC_DIR"
95 jmc 1.16 #MPI_HEADER_FILES='mpif.h mpiof.h'
96 jmc 1.11 elif [ "x$MPI" = xtrue ] ; then
97     #-- default MPI header location: from former darwin_ia32_gfortran+mpi optfile:
98 mlosch 1.13 INCLUDES="$INCLUDES -I/usr/local/include -I/opt/openmpi/include"
99     LIBS="$LIBS -L/usr/local/lib"
100 jmc 1.11 fi

  ViewVC Help
Powered by ViewVC 1.1.22