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

Diff of /MITgcm/tools/build_options/linux_amd64_ifort11+mpi_generic

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

revision 1.2 by jmc, Sun Mar 21 17:59:13 2010 UTC revision 1.3 by jmc, Thu Jul 7 22:59:02 2011 UTC
# Line 5  Line 5 
5  #  #
6  #  Constantinos Evangelinos  #  Constantinos Evangelinos
7  #  #
8  #  Build options for the intel 11 fortran compiler with a generic MPI  #  Build options for the intel 11 & 12 fortran compiler with a generic MPI
9  # DON'T FORGET to set environment variable MPI_INC_DIR to the include  # ==> DON'T FORGET to set environment variable MPI_INC_DIR to the include
10  # directory of your MPI implementation  #  directory of your MPI implementation
11    
12    #  Tested  on danton (FC 14), with and without OpenMP, using
13    #          intel compiler v.11.1.046 (20090630) and also  v.12.0.4   (20110427)
14    
15  #-------  #-------
16  # run with OpenMP: needs to set environment var. OMP_NUM_THREADS  # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
# Line 18  Line 21 
21  #   - csh,tcsh:  #   - csh,tcsh:
22  #     > setenv OMP_NUM_THREADS 2  #     > setenv OMP_NUM_THREADS 2
23  #     > setenv KMP_STACKSIZE 400m  #     > setenv KMP_STACKSIZE 400m
24  #  NOTE: need to set KMP_STACKSIZE in ~/.tcshrc (but curiously, works  #  NOTE: need to set KMP_STACKSIZE in ~/.tcshrc
25  #  without OMP_NUM_THREADS in ~/.tcshrc).  #        (but curiously, works without OMP_NUM_THREADS in ~/.tcshrc).
26  #-------  #-------
27    
28  FC=${FC:=mpif77}  FC=${FC:=mpif77}
# Line 31  DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MP Line 34  DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MP
34  CPP='cpp  -traditional -P'  CPP='cpp  -traditional -P'
35  F90FIXEDFORMAT='-fixed -Tf'  F90FIXEDFORMAT='-fixed -Tf'
36  EXTENDED_SRC_FLAG='-132'  EXTENDED_SRC_FLAG='-132'
37    GET_FC_VERSION="--version"
38  OMPFLAG='-openmp'  OMPFLAG='-openmp'
39    
40  NOOPTFLAGS='-O0 -g -m64 -fPIC'  NOOPTFLAGS='-O0 -g'
41  NOOPTFILES=''  NOOPTFILES=''
42    
43  INCLUDEDIRS=''  INCLUDEDIRS=''
44  INCLUDES=''  INCLUDES=''
45  LIBS=''  LIBS=''
46    
 if test "x$DEVEL" != x ; then  
     FFLAGS="$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="$FFLAGS -m64 -fPIC -W0 -WB -convert big_endian -assume byterecl"  
 fi  
 #- might want to use '-r8' for fizhi pkg:  
 #FFLAGS="$FFLAGS -r8"  
   
47  if test "x$GENERIC" != x ; then  if test "x$GENERIC" != x ; then
48      PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2      PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
49  else  else
50      PROCF=-xHost      PROCF=-xHost
51  fi  fi
52  #  Note that the -mp switch is for ieee "maintain precision" and is  
53  #  roughly equivalent to -ieee  FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian -assume byterecl"
54  #  Note the addition of -g to circumvent bug with Intel 11.  #- might want to use '-r8' for fizhi pkg:
55  if test "x$IEEE" = x ; then  #FFLAGS="$FFLAGS -r8"
56    
57    if test "x$IEEE" = x ; then     #- with optimisation:
58      FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"      FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"
59  else  else
60      if test "x$DEVEL" != x ; then    if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :
61          FOPTIM="$PROCF"      FOPTIM="-O0 -fp-model source -noalign $PROCF"
62      else    else                          #- development/check options:
63          FOPTIM="-O0 -fp-model source -noalign $PROCF"     #FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict"
64      fi      FFLAGS="$FFLAGS -warn all -warn nounused"
65        FOPTIM="-fpe0 -ftz -fp-stack-check -check all -ftrapuv"
66        FOPTIM="$FOPTIM -O0 -noalign -g -traceback $PROCF"
67      fi
68  fi  fi
69    
70  F90FLAGS=$FFLAGS  F90FLAGS=$FFLAGS
71  F90OPTIM=$FOPTIM  F90OPTIM=$FOPTIM
72  CFLAGS="-O2 -ip -m64 -fPIC $PROCF"  CFLAGS="-O0 -ip -m64 -fPIC $PROCF"
73    
74  if [ "x$NETCDF_ROOT" != x ] ; then  if [ "x$NETCDF_ROOT" != x ] ; then
75      INCLUDEDIRS="${NETCDF_ROOT}/include"      INCLUDEDIRS="${NETCDF_ROOT}/include"

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

  ViewVC Help
Powered by ViewVC 1.1.22