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

Diff of /MITgcm/tools/build_options/linux_amd64_ifort_beagle

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

revision 1.5 by jmc, Fri Aug 12 23:09:08 2011 UTC revision 1.6 by jmc, Fri Sep 9 16:23:23 2011 UTC
# Line 4  Line 4 
4  #  $Name$  #  $Name$
5  #  #
6  #  These are the build options used with the Intel 10.x compiler for  #  These are the build options used with the Intel 10.x compiler for
7  #  testing on Beagle without mpi.  #  testing on Beagle (with and without MPI).
8  #  #
9  #  Use after  #  Use after
10  #  #
 #    module add darwin  
11  #    module add mitgcm  #    module add mitgcm
12  #  #
13  #  (tested with darwin/20090605 mitgcm/20090605, i.e.,  #  (tested with darwin/20090605 mitgcm/20090605, i.e.,
# Line 21  Line 20 
20  #  alternatively, one may choose to link with one of the intel  #  alternatively, one may choose to link with one of the intel
21  #  "-static" or "-i-static" flags.  #  "-static" or "-i-static" flags.
22    
23  FC='ifort'  if test "x$MPI" = xtrue ; then
24  CC='icc'    CC='mpicc'
25  #F90C='mpif90 -fixed -c '    FC='mpif77'
26  LINK='ifort'    F90C='mpif90'
27      LINK='mpif77'
28      for path in $(echo "$CPATH" | sed 's/:/ /g'); do
29        CPPFLAGS="$CPPFLAGS -I$path"
30      done
31    else
32      CC='icc'
33      FC='ifort'
34      F90C=$FC
35      LINK=$FC
36    fi
37    
38  # the netcdf module sets CPPFLAGS, LDFLAGS and FFLAGS  # the netcdf module sets CPPFLAGS, LDFLAGS and FFLAGS
39  INCLUDES="$CPPFLAGS"  INCLUDES="$CPPFLAGS"
40  # -shared-intel needed with netcdf (namespace conflict???)  # for static linkage:
41    #LIBS="$LDFLAGS -static"
42    # for dynamic linkage (note: needed with netcdf <- namespace conflict???)
43  LIBS="$LDFLAGS -shared-intel"  LIBS="$LDFLAGS -shared-intel"
44    
45  # -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic)  # -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic)
46  DEFINES='-DWORDLENGTH=4 -DIFORT'  DEFINES='-DWORDLENGTH=4 -DIFORT'
47  CPP='cpp  -traditional -P'  CPP='cpp  -traditional -P'
48    F90FIXEDFORMAT='-fixed -Tf'
49  EXTENDED_SRC_FLAG='-132'  EXTENDED_SRC_FLAG='-132'
50  GET_FC_VERSION="--version"  GET_FC_VERSION="--version"
51  #OMPFLAG='-openmp'  OMPFLAG='-openmp'
52    
53  NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mom_calc_ke.F mon_ke.F'  NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mds_byteswap.F'
54    NOOPTFILES=$NOOPTFILES' mom_calc_ke.F mon_ke.F'
55    
56  if test "x$IEEE" = x ; then  # ifort options:
57      #  No need for IEEE-754  # -132        fixed-form line length is 132 characters
58    # -r8         REAL is REAL*8
59    # -i4         INTEGER is INTEGER*4
60    # -w95        don't warn about use of Fortran 95 extensions
61    # -W0         disable all warning messages
62    # -WB         turns a compile-time bounds check error into a warning
63    # -xT         optimize for Intel Core2 and Xeon 51xx
64    # -fno-alias  don't assume aliasing (assume that different variables
65    #                                    DON'T refer to the same memory location)
66    # -assume byterecl     record length in OPEN statements is in bytes
67    # -convert big_endian  binary files contain big-endian data
68    # -CB         check bounds
69    # -pc64       round floating point values to 64 bits
70    # one could also try
71    # -mp         maintain precision
72    
73    FFLAGS="$FFLAGS -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian"
74    #- might want to use '-r8' for fizhi pkg:
75    #FFLAGS="$FFLAGS -r8"
76    
77    if test "x$IEEE" = x ; then     #- with optimisation:
78      NOOPTFLAGS='-O2'      NOOPTFLAGS='-O2'
79      # use this for exact checkpointing (slightly slower):      # use this for exact restart (slightly slower):
80      # FOPTIM='-O2 -pc64 -mieee-fp -align'      FOPTIM='-O2 -pc64 -mieee-fp -align'
81      FOPTIM='-O2 -align'      # use this for flighty faster execution but with roundoff errors in restart:
82      # ifort options:      # FOPTIM='-O2 -align'
83      # -132        fixed-form line length is 132 characters  else                            #- no optimisation + IEEE :
     # -r8         REAL is REAL*8  
     # -i4         INTEGER is INTEGER*4  
     # -w95        don't warn about use of Fortran 95 extensions  
     # -W0         disable all warning messages  
     # -WB         turns a compile-time bounds check error into a warning  
     # -xT         optimize for Intel Core2 and Xeon 51xx  
     # -fno-alias  don't assume aliasing (assume that different variables DON'T refer to the same memory location)  
     # -assume byterecl     record length in OPEN statements is in bytes  
     # -convert big_endian  binary files contain big-endian data  
     FFLAGS="$FFLAGS -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian"  
 else  
     #  Try to follow IEEE-754  
84      NOOPTFLAGS='-O0'      NOOPTFLAGS='-O0'
85      # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'      # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'
86      FOPTIM='-O0 -noalign'      FOPTIM='-O0 -noalign'
87      # -pc64       round floating point values to 64 bits      FFLAGS="$FFLAGS -pc64"
     # one could also try  
     # -mp         maintain precision  
     FFLAGS="$FFLAGS -pc64 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian"  
88  fi  fi
 #- might want to use '-r8' for fizhi pkg:  
 #FFLAGS="$FFLAGS -r8"  
   
 #F90FLAGS=$FFLAGS  
 #F90OPTIM=$FOPTIM  
89    
90  NOOPTFILES=$NOOPTFILES' mds_byteswap.F'  F90FLAGS=$FFLAGS
91    F90OPTIM=$FOPTIM
92    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22