/[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.2 - (show annotations) (download)
Fri Feb 19 22:26:01 2010 UTC (14 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c
Changes since 1.1: +20 -3 lines
- set OMPFLAG to be used for multi-threaded compilation (with genmake2 -mth);
  no longer need the similar +mth optfifle which will be removed soon.
- start to remove "-r8 -i4" option (more similar to other compiler optfile).

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

  ViewVC Help
Powered by ViewVC 1.1.22