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

Annotation of /MITgcm/tools/build_options/linux_ia32_ifort11

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


Revision 1.2 - (hide annotations) (download)
Fri Feb 19 22:26:01 2010 UTC (14 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c
Changes since 1.1: +21 -4 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 ce107 1.1 #!/bin/bash
2     #
3 jmc 1.2 # $Header: $
4     # $Name: $
5     #
6 ce107 1.1 # Constantinos Evangelinos
7     #
8     # Build options for the intel 11 fortran compiler
9    
10 jmc 1.2 #-------
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_STACK
19     #-------
20    
21 ce107 1.1 FC=ifort
22     F90C=ifort
23     CC=icc
24     LINK=ifort
25    
26     DEFINES='-DWORDLENGTH=4'
27     CPP='cpp -traditional -P'
28 jmc 1.2 F90FIXEDFORMAT='-fixed -Tf'
29 ce107 1.1 EXTENDED_SRC_FLAG='-132'
30 jmc 1.2 OMPFLAG='-openmp'
31 ce107 1.1
32     NOOPTFLAGS='-O0 -g'
33     NOOPTFILES=''
34    
35     INCLUDEDIRS=''
36     INCLUDES=''
37     LIBS=''
38    
39     if test "x$DEVEL" != x ; then
40 jmc 1.2 FFLAGS='-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 ce107 1.1 else
42 jmc 1.2 FFLAGS='-W0 -WB -convert big_endian -assume byterecl'
43 ce107 1.1 fi
44 jmc 1.2 #- might want to use '-r8' for fizhi pkg:
45     #FFLAGS="$FFLAGS -r8"
46 ce107 1.1
47     if test "x$GENERIC" != x ; then
48 jmc 1.2 PROCF=-mia32 -axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
49 ce107 1.1 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     if test "x$IEEE" = x ; then
55     FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"
56     else
57     if test "x$DEVEL" != x ; then
58     FOPTIM="$PROCF"
59     else
60     FOPTIM="-O0 -fp-model source -noalign $PROCF"
61     fi
62     fi
63     F90FLAGS=$FFLAGS
64     F90OPTIM=$FOPTIM
65     CFLAGS="-O2 -ip $PROCF"
66    
67     if [ "x$NETCDF_ROOT" != x ] ; then
68     INCLUDEDIRS="${NETCDF_ROOT}/include"
69     INCLUDES="-I${NETCDF_ROOT}/include"
70     LIBS="-L${NETCDF_ROOT}/lib"
71     elif [ "x$NETCDF_HOME" != x ]; then
72     INCLUDEDIRS="${NETCDF_HOME}/include"
73     INCLUDES="-I${NETCDF_HOME}/include"
74     LIBS="-L${NETCDF_HOME}/lib"
75     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
76     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
77     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
78     INCLUDEDIRS="${NETCDF_INC}"
79     INCLUDES="-I${NETCDF_INC}"
80     LIBS="-L${NETCDF_LIB}"
81     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
82     INCLUDEDIRS="${NETCDF_INCDIR}"
83     INCLUDES="-I${NETCDF_INCDIR}"
84     LIBS="-L${NETCDF_LIBDIR}"
85     elif test -d /usr/include/netcdf-3 ; then
86     INCLUDEDIRS='/usr/include/netcdf-3'
87     INCLUDES='-I/usr/include/netcdf-3'
88     LIBS='-L/usr/lib/netcdf-3'
89     elif test -d /usr/local/pkg/netcdf ; then
90     INCLUDEDIRS='/usr/local/pkg/netcdf/include'
91     INCLUDES='-I/usr/local/pkg/netcdf/include'
92     LIBS='-L/usr/local/pkg/netcdf/lib'
93     elif test -d /usr/include/netcdf ; then
94     INCLUDEDIRS='/usr/include/netcdf'
95     INCLUDES='-I/usr/include/netcdf'
96     elif test -d /usr/local/netcdf ; then
97     INCLUDEDIRS='/usr/include/netcdf/include'
98     INCLUDES='-I/usr/local/netcdf/include'
99     LIBS='-L/usr/local/netcdf/lib'
100     elif test -f /usr/local/include/netcdf.inc ; then
101     INCLUDEDIRS='/usr/local/include'
102     INCLUDES='-I/usr/local/include'
103     LIBS='-L/usr/local/lib'
104     fi
105    

  ViewVC Help
Powered by ViewVC 1.1.22