/[MITgcm]/MITgcm/tools/build_options/linux_amd64_ifort+mpi_beagle
ViewVC logotype

Annotation of /MITgcm/tools/build_options/linux_amd64_ifort+mpi_beagle

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


Revision 1.7 - (hide annotations) (download)
Thu Sep 2 14:12:41 2010 UTC (13 years, 8 months ago) by jahn
Branch: MAIN
CVS Tags: checkpoint62k, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63a, checkpoint63
Changes since 1.6: +11 -3 lines
use CPATH to avoid mpif.h warning and ieee-fp for exact checkpointing

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

  ViewVC Help
Powered by ViewVC 1.1.22