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

Contents of /MITgcm/tools/build_options/linux_amd64_ifort11

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


Revision 1.6 - (show annotations) (download)
Thu Jul 7 22:58:36 2011 UTC (12 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63a, checkpoint63
Changes since 1.5: +23 -20 lines
non DEVEL: remove "-W0 -WB" from FFLAGS; DEVEL: add "-warn nounused" (to reduce
 Nb of warnings) and comment out few other flags.
CFLAGS: reduce optimisation (not much to optimise anyway in MITgcm C-routines)

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_ifort11,v 1.5 2010/12/15 17:08:25 jmc Exp $
4 # $Name: $
5 #
6 # Constantinos Evangelinos
7 #
8 # Build options for the intel 11 & 12 fortran compiler
9 #
10 # Tested on baudelaire (FC 13) with intel compiler v.11.1.073 (20100806)
11
12 # OpenMP : tested on danton (FC 14) using intel compiler v.11.1.046 (20090630)
13 # and also v.12.0.4 (20110427)
14
15 #-------
16 # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
17 # and generally, needs to increase the stack-size:
18 # - sh,bash:
19 # > export OMP_NUM_THREADS=2
20 # > export KMP_STACKSIZE=400m
21 # - csh,tcsh:
22 # > setenv OMP_NUM_THREADS 2
23 # > setenv KMP_STACKSIZE 400m
24 #-------
25
26 FC=ifort
27 F90C=ifort
28 CC=icc
29 LINK=ifort
30
31 DEFINES='-DWORDLENGTH=4'
32 CPP='cpp -traditional -P'
33 F90FIXEDFORMAT='-fixed -Tf'
34 EXTENDED_SRC_FLAG='-132'
35 GET_FC_VERSION="--version"
36 OMPFLAG='-openmp'
37
38 NOOPTFLAGS='-O0 -g'
39 NOOPTFILES=''
40
41 INCLUDEDIRS=''
42 INCLUDES=''
43 LIBS=''
44
45 if test "x$GENERIC" != x ; then
46 PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
47 else
48 PROCF=-xHost
49 fi
50
51 FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian -assume byterecl"
52 #- might want to use '-r8' for fizhi pkg:
53 #FFLAGS="$FFLAGS -r8"
54
55 if test "x$IEEE" = x ; then #- with optimisation:
56 FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"
57 else
58 if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
59 FOPTIM="-O0 -fp-model source -noalign $PROCF"
60 else #- development/check options:
61 #FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict"
62 FFLAGS="$FFLAGS -warn all -warn nounused"
63 FOPTIM="-fpe0 -ftz -fp-stack-check -check all -ftrapuv"
64 FOPTIM="$FOPTIM -O0 -noalign -g -traceback $PROCF"
65 fi
66 fi
67
68 F90FLAGS=$FFLAGS
69 F90OPTIM=$FOPTIM
70 CFLAGS="-O0 -ip -m64 -fPIC $PROCF"
71
72 if [ "x$NETCDF_ROOT" != x ] ; then
73 INCLUDEDIRS="${NETCDF_ROOT}/include"
74 INCLUDES="-I${NETCDF_ROOT}/include"
75 LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_ROOT}/lib"
76 elif [ "x$NETCDF_HOME" != x ]; then
77 INCLUDEDIRS="${NETCDF_HOME}/include"
78 INCLUDES="-I${NETCDF_HOME}/include"
79 LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_HOME}/lib"
80 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
81 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
82 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
83 INCLUDEDIRS="${NETCDF_INC}"
84 INCLUDES="-I${NETCDF_INC}"
85 LIBS="-L${NETCDF_LIB}"
86 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
87 INCLUDEDIRS="${NETCDF_INCDIR}"
88 INCLUDES="-I${NETCDF_INCDIR}"
89 LIBS="-L${NETCDF_LIBDIR}"
90 elif test -d /usr/include/netcdf-3 ; then
91 INCLUDEDIRS='/usr/include/netcdf-3'
92 INCLUDES='-I/usr/include/netcdf-3'
93 LIBS='-L/usr/lib64/netcdf-3 -L/usr/lib/netcdf-3'
94 elif test -d /usr/local/pkg/netcdf ; then
95 INCLUDEDIRS='/usr/local/pkg/netcdf/include'
96 INCLUDES='-I/usr/local/pkg/netcdf/include'
97 LIBS='-L/usr/local/pkg-x86_64/netcdf/lib64 -L/usr/local/pkg-x86_64/netcdf/lib -L/usr/local/pkg/netcdf/lib64 -L/usr/local/pkg/netcdf/lib'
98 elif test -d /usr/include/netcdf ; then
99 INCLUDEDIRS='/usr/include/netcdf'
100 INCLUDES='-I/usr/include/netcdf'
101 elif test -d /usr/local/netcdf ; then
102 INCLUDEDIRS='/usr/include/netcdf/include'
103 INCLUDES='-I/usr/local/netcdf/include'
104 LIBS='-L/usr/local/netcdf/lib64 -L/usr/local/netcdf/lib'
105 elif test -f /usr/local/include/netcdf.inc ; then
106 INCLUDEDIRS='/usr/local/include'
107 INCLUDES='-I/usr/local/include'
108 LIBS='-L/usr/local/lib64 -L/usr/local/lib'
109 fi

  ViewVC Help
Powered by ViewVC 1.1.22