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

Annotation of /MITgcm/tools/build_options/linux_amd64_ifort_beagle

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


Revision 1.6 - (hide annotations) (download)
Fri Sep 9 16:23:23 2011 UTC (12 years, 8 months ago) by jmc
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, checkpoint63c, checkpoint64, 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.5: +54 -39 lines
merge linux_amd64_ifort+mpi_beagle into linux_amd64_ifort_beagle
+ set F90C (and flags) to a reasonable compiler (needed for free format f90 files)

1 jahn 1.1 #!/bin/bash
2     #
3 jmc 1.6 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_ifort_beagle,v 1.5 2011/08/12 23:09:08 jmc Exp $
4 jmc 1.2 # $Name: $
5 jahn 1.1 #
6     # These are the build options used with the Intel 10.x compiler for
7 jmc 1.6 # testing on Beagle (with and without MPI).
8 jahn 1.1 #
9     # Use after
10     #
11     # module add mitgcm
12     #
13     # (tested with darwin/20090605 mitgcm/20090605, i.e.,
14     # intel/10.0.025 mx/1.0 netcdf/3.6.2/intel-10.0.025 mpich-mx/1.2.7..7/intel-10.0.025)
15     #
16     # These modules set FFLAGS, CFLAGS and CPPFLAGS for mpich and netcdf.
17     #
18     # The SGE -V option for exporting environment variables may also be
19     # helpful if you encounter missing-library problems. Or,
20     # alternatively, one may choose to link with one of the intel
21     # "-static" or "-i-static" flags.
22    
23 jmc 1.6 if test "x$MPI" = xtrue ; then
24     CC='mpicc'
25     FC='mpif77'
26     F90C='mpif90'
27     LINK='mpif77'
28     for path in $(echo "$CPATH" | sed 's/:/ /g'); do
29     CPPFLAGS="$CPPFLAGS -I$path"
30     done
31     else
32     CC='icc'
33     FC='ifort'
34     F90C=$FC
35     LINK=$FC
36     fi
37    
38 jahn 1.1 # the netcdf module sets CPPFLAGS, LDFLAGS and FFLAGS
39     INCLUDES="$CPPFLAGS"
40 jmc 1.6 # for static linkage:
41     #LIBS="$LDFLAGS -static"
42     # for dynamic linkage (note: needed with netcdf <- namespace conflict???)
43 jahn 1.1 LIBS="$LDFLAGS -shared-intel"
44    
45     # -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic)
46     DEFINES='-DWORDLENGTH=4 -DIFORT'
47     CPP='cpp -traditional -P'
48 jmc 1.6 F90FIXEDFORMAT='-fixed -Tf'
49 jmc 1.2 EXTENDED_SRC_FLAG='-132'
50 jmc 1.5 GET_FC_VERSION="--version"
51 jmc 1.6 OMPFLAG='-openmp'
52 jahn 1.1
53 jmc 1.6 NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mds_byteswap.F'
54     NOOPTFILES=$NOOPTFILES' mom_calc_ke.F mon_ke.F'
55 jahn 1.1
56 jmc 1.6 # ifort options:
57     # -132 fixed-form line length is 132 characters
58     # -r8 REAL is REAL*8
59     # -i4 INTEGER is INTEGER*4
60     # -w95 don't warn about use of Fortran 95 extensions
61     # -W0 disable all warning messages
62     # -WB turns a compile-time bounds check error into a warning
63     # -xT optimize for Intel Core2 and Xeon 51xx
64     # -fno-alias don't assume aliasing (assume that different variables
65     # DON'T refer to the same memory location)
66     # -assume byterecl record length in OPEN statements is in bytes
67     # -convert big_endian binary files contain big-endian data
68     # -CB check bounds
69     # -pc64 round floating point values to 64 bits
70     # one could also try
71     # -mp maintain precision
72    
73     FFLAGS="$FFLAGS -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian"
74     #- might want to use '-r8' for fizhi pkg:
75     #FFLAGS="$FFLAGS -r8"
76    
77     if test "x$IEEE" = x ; then #- with optimisation:
78 jahn 1.1 NOOPTFLAGS='-O2'
79 jmc 1.6 # use this for exact restart (slightly slower):
80     FOPTIM='-O2 -pc64 -mieee-fp -align'
81     # use this for flighty faster execution but with roundoff errors in restart:
82     # FOPTIM='-O2 -align'
83     else #- no optimisation + IEEE :
84 jahn 1.1 NOOPTFLAGS='-O0'
85     # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'
86     FOPTIM='-O0 -noalign'
87 jmc 1.6 FFLAGS="$FFLAGS -pc64"
88 jahn 1.1 fi
89    
90 jmc 1.6 F90FLAGS=$FFLAGS
91     F90OPTIM=$FOPTIM
92 jahn 1.1

  ViewVC Help
Powered by ViewVC 1.1.22