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

Diff of /MITgcm/tools/build_options/linux_ia64_ifort

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

revision 1.1 by heimbach, Tue Sep 30 21:47:15 2008 UTC revision 1.6 by mlosch, Wed Jan 11 17:34:00 2012 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #  #
3  # Composed and tested by ce107 on ross/weddell (Opteron system)  # $Header$
4  # Should work fine on EM64T and other AMD64 compatible Intel systems  # $Name$
5  # a) Processor specific flags:  
6  #    1) for more speed on Core2 processors replace -xW with -xT  # Tested on uv100.awi.de (SGI UV 100, details:
7  #    2) for more speed on Pentium4 based EM64T processors replaces -xW with -xP  #                         http://www.sgi.com/products/servers/uv/specs.html)
8  # b) For more speed, provided your data size doesn't exceed 2GB you can  # a) For more speed, provided your data size does not exceed 2GB you can
9  # remove -fPIC which carries a performance penalty of 2-6%.  #    remove -fPIC which carries a performance penalty of 2-6%.
10  # c) Provided that the libraries you link to are compiled with -fPIC this  # b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may
11  # optfile should work.  #    perform faster than -fPIC and still support data sizes over 2GB per
12  # d) You can replace -fPIC with -mcmodel=medium which may perform faster  #    process but all the libraries you link to must be compiled with
13  # then -fPIC and still support data sizes over 2GB per process but all  #    -fPIC or -mcmodel=medium
14  # the libraries you link to myst be compiled with -fPIC or -mcmodel=medium  # c) flags adjusted for ifort 12.1.0
 # e) Changed from -O3 to -O2 to avoid buggy Intel v.10 compilers. Speed  
 # impact appears to be minimal.  
 #  
 # DON'T FORGET to set environment variable MPI_INC_DIR to the include  
 # directory of your MPI implementation  
15    
16  FC=ifort  FC=ifort
17  F90C=ifort  F90C=ifort
18  CC=icc  CC=icc
19  F90FIXEDFORMAT='-fixed -Tf'  # requires that all static libraries are available:
20  DEFINES='-DWORDLENGTH=4'  #LINK='ifort -static'
21  LINK='ifort -static'  LINK='ifort'
22  CPP='cpp  -traditional -P'  # for adjoint runs the default makedepend often cannot handle enough files
23    #MAKEDEPEND=tools_xmakedepend
24    
25  NOOPTFLAGS='-O0 -g -m64 -fPIC'  DEFINES='-DWORDLENGTH=4'
26  NOOPTFILES=''  CPP='cpp -traditional -P'
27    F90FIXEDFORMAT='-fixed -Tf'
28    EXTENDED_SRC_FLAG='-132'
29    #OMPFLAG='-openmp'
30    
31  INCLUDEDIRS=''  INCLUDEDIRS=''
32  INCLUDES=''  INCLUDES=''
33  LIBS=''  LIBS=''
34    
35    MCMODEL='-fPIC'
36    # for large memory requirements uncomment this line
37    #MCMODEL='-mcmodel=medium -shared-intel'
38    FFLAGS="-W0 -WB -convert big_endian -assume byterecl $MCMODEL"
39    
40    NOOPTFLAGS="-O0 -g -m64"
41    NOOPTFILES=''
42    
43  if test "x$DEVEL" != x ; then  if test "x$DEVEL" != x ; then
44      FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all'      FFLAGS="$FFLAGS -O0 -g -noalign -check all -fpe0 -traceback -ftrapuv -fp-model precise -fp-model except -warn all"
45  else  else
46      FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC'      FFLAGS="$FFLAGS"
47  fi  fi
48    #- might want to use '-r8' for fizhi pkg:
49    #FFLAGS="$FFLAGS -r8"
50    
51  #  Note that the -mp switch is for ieee "maintain precision" and is  #  Note that the -mp switch is for ieee "maintain precision" and is
52  #  roughly equivalent to -ieee  #  roughly equivalent to -ieee
53  if test "x$IEEE" = x ; then  if test "x$IEEE" = x ; then
54      #  No need for IEEE-754      #  No need for IEEE-754
55      FOPTIM='-O2 -align'      FOPTIM='-O3 -align'
56    # does not work when -static does not work
57    #    FOPTIM='-fast -align'
58    # instead you can use
59    #    FOPTIM='-O3 -ipo -align'
60  else  else
61      #  Try to follow IEEE-754      #  Try to follow IEEE-754
62      FOPTIM='-O2 -align -mp'      FOPTIM='-O0 -noalign -fp-model precise'
63    # -fltconsistency'
64  fi  fi
65  F90FLAGS=$FFLAGS  F90FLAGS=$FFLAGS
66  F90OPTIM=$FOPTIM  F90OPTIM=$FOPTIM
67  CFLAGS='-O2 -ip -fPIC'  CFLAGS="-O0 -ip $MCMODEL"
68    
69  if [ "x$NETCDF_ROOT" != x ] ; then  if [ "x$NETCDF_ROOT" != x ] ; then
70      INCLUDEDIRS="${NETCDF_ROOT}/include"      INCLUDEDIRS="${NETCDF_ROOT}/include"
# Line 87  elif test -d /usr/local/include/netcdf.i Line 101  elif test -d /usr/local/include/netcdf.i
101      LIBS='-L/usr/local/lib64'      LIBS='-L/usr/local/lib64'
102  fi  fi
103    
104    if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
105        LIBS="$LIBS -lmpi"
106        INCLUDES="$INCLUDES -I$MPI_INC_DIR"
107        INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
108        MPIINCLUDEDIR="$MPI_INC_DIR"
109        MPI_HEADER_FILES='mpif.h mpiof.h'
110        MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'
111    fi
112    

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

  ViewVC Help
Powered by ViewVC 1.1.22