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

Diff of /MITgcm/tools/build_options/linux_amd64_ifort11

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

revision 1.2 by jmc, Fri Feb 19 22:26:01 2010 UTC revision 1.14 by jmc, Tue Oct 22 21:13:17 2013 UTC
# Line 2  Line 2 
2  #  #
3  # $Header$  # $Header$
4  # $Name$  # $Name$
5    
6    #  Build options for version 11 and newer of intel compiler on Linux AMD64 platform
7    #  Author: Constantinos Evangelinos
8    
9    #  Tested on baudelaire (FC 13) with intel compiler v.11.1.073 (20100806)
10  #  #
11  #  Constantinos Evangelinos  # OpenMP : tested on danton (FC 14) using intel compiler v.11.1.046 (20090630)
12    #                                    and (FC 14,17 & 19) v.12.0.4   (20110427)
13    #                                    and also (FC 19)    v.14.0.0   (20130728)
14  #  #
15  #  Build options for the intel 11 fortran compiler  # MPI : Tested  on danton, with and without OpenMP,
16    #        using intel compiler v.11.1.046 and v.12.0.4 and also v.14.0.0
17    #       and  on acesgrid  (FC 15)  with intel compiler v.13.0.0.079 (20120731)
18    # ==> DON'T FORGET to set environment variable MPI_INC_DIR to the include
19    #     directory of your MPI implementation
20    
21  #-------  #-------
22  # run with OpenMP: needs to set environment var. OMP_NUM_THREADS  # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
# Line 16  Line 27 
27  #   - csh,tcsh:  #   - csh,tcsh:
28  #     > setenv OMP_NUM_THREADS 2  #     > setenv OMP_NUM_THREADS 2
29  #     > setenv KMP_STACKSIZE 400m  #     > setenv KMP_STACKSIZE 400m
30    #  NOTE, MPI+OpenMP: might need to set KMP_STACKSIZE in ~/.tcshrc
31    #        (but curiously, works without OMP_NUM_THREADS in ~/.tcshrc).
32  #-------  #-------
33    
34  FC=ifort  if test "x$MPI" = xtrue ; then
35  F90C=ifort    CC=${CC:=mpicc}
36  CC=icc    FC=${FC:=mpif77}
37  LINK=ifort    F90C=${F90C:=mpif90}
38      LINK="$F90C -shared-intel -no-ipo"
39    else
40      CC=icc
41      FC=ifort
42      F90C=ifort
43      LINK="$F90C -shared-intel"
44    fi
45    
46  DEFINES='-DWORDLENGTH=4'  DEFINES='-DWORDLENGTH=4'
 CPP='cpp  -traditional -P'  
47  F90FIXEDFORMAT='-fixed -Tf'  F90FIXEDFORMAT='-fixed -Tf'
48  EXTENDED_SRC_FLAG='-132'  EXTENDED_SRC_FLAG='-132'
49    GET_FC_VERSION="--version"
50  OMPFLAG='-openmp'  OMPFLAG='-openmp'
51    
52  NOOPTFLAGS='-O0 -g -m64 -fPIC'  NOOPTFLAGS='-O0 -g'
53  NOOPTFILES=''  NOOPTFILES=''
54    
 INCLUDEDIRS=''  
 INCLUDES=''  
 LIBS=''  
   
 if test "x$DEVEL" != x ; then  
     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'  
 else  
     FFLAGS='-m64 -fPIC -W0 -WB -convert big_endian -assume byterecl'  
 fi  
 #- might want to use '-r8' for fizhi pkg:  
 #FFLAGS="$FFLAGS -r8"  
   
55  if test "x$GENERIC" != x ; then  if test "x$GENERIC" != x ; then
56      PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2      PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
57  else  else
58      PROCF=-xHost      PROCF=-xHost
59  fi  fi
60  #  Note that the -mp switch is for ieee "maintain precision" and is  
61  #  roughly equivalent to -ieee  CFLAGS="-O0 -ip -m64 $PROCF"
62  #  Note the addition of -g to circumvent bug with Intel 11.  FFLAGS="$FFLAGS -m64 -convert big_endian -assume byterecl"
63  if test "x$IEEE" = x ; then  #- for big setups, compile & link with "-fPIC" or set memory-model to "medium":
64      FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"  #CFLAGS="$CFLAGS -fPIC"
65    #FFLAGS="$FFLAGS -fPIC"
66    #-  with FC 19, need to use this without -fPIC (which cancels -mcmodel option):
67     CFLAGS="$CFLAGS -mcmodel=medium"
68     FFLAGS="$FFLAGS -mcmodel=medium"
69    #- might want to use '-r8' for fizhi pkg:
70    #FFLAGS="$FFLAGS -r8"
71    
72    if test "x$IEEE" = x ; then     #- with optimisation:
73        FOPTIM="-O2 -align -ip -fp-model source $PROCF"
74  else  else
75      if test "x$DEVEL" != x ; then    if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :
76          FOPTIM="$PROCF"      FOPTIM="-O0 -fp-model source -noalign $PROCF"
77      else    else                          #- development/check options:
78          FOPTIM="-O0 -fp-model source -noalign $PROCF"     #FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict"
79      fi      FOPTIM="-O0 -noalign -g -traceback $PROCF"
80        NOOPTFLAGS=$FOPTIM
81        NOOPTFILES='adread_adwrite.F mdsio_rw_field.F mdsio_rw_slice.F'
82        NOOPTFILES="$NOOPTFILES mdsio_readvector.F mdsio_writevector.F"
83        FOPTIM="$FOPTIM -warn all -warn nounused"
84        FOPTIM="$FOPTIM -fpe0 -ftz -fp-stack-check -check all -ftrapuv"
85      fi
86  fi  fi
87    
88  F90FLAGS=$FFLAGS  F90FLAGS=$FFLAGS
89  F90OPTIM=$FOPTIM  F90OPTIM=$FOPTIM
90  CFLAGS="-O2 -ip -m64 -fPIC $PROCF"  
91    INCLUDEDIRS=''
92    INCLUDES=''
93    LIBS=''
94    
95  if [ "x$NETCDF_ROOT" != x ] ; then  if [ "x$NETCDF_ROOT" != x ] ; then
96      INCLUDEDIRS="${NETCDF_ROOT}/include"      INCLUDEDIRS="${NETCDF_ROOT}/include"
# Line 104  elif test -f /usr/local/include/netcdf.i Line 131  elif test -f /usr/local/include/netcdf.i
131      LIBS='-L/usr/local/lib64 -L/usr/local/lib'      LIBS='-L/usr/local/lib64 -L/usr/local/lib'
132  fi  fi
133    
134    if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
135        INCLUDES="$INCLUDES -I$MPI_INC_DIR"
136        INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
137        #- used for parallel (MPI) DIVA
138        MPIINCLUDEDIR="$MPI_INC_DIR"
139       #MPI_HEADER_FILES='mpif.h mpiof.h'
140    fi

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22