Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/linux_ia64_ifort_ollie is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 83a28d7f on 2021-01-07 11:34:22 UTC
39fe3d57e7 Mart*0001 #!/bin/bash
                0002 #
                0003 #
                0004 # derived from linux_amd64_ifort, tested on ollie.awi.de (CRAY CS400)
                0005 #
                0006 # requires these modules
                0007 # module purge (to remove you have anything that may conflict with ifort)
                0008 # module load intel.compiler
                0009 # module load intel.mpi
                0010 # module load netcdf/4.4.0_intel
                0011 
                0012 # - For more speed, provided your data size doesn't exceed 2GB you can
                0013 # remove -fPIC which carries a performance penalty of 2-6%.
                0014 # - Provided that the libraries you link to are compiled with -fPIC this
                0015 # optfile should work.
                0016 # - You can replace -fPIC with -mcmodel=medium which may perform faster
                0017 # than -fPIC and still support data sizes over 2GB per process but all
                0018 # the libraries you link to must be compiled with -fPIC or -mcmodel=medium
                0019 #
                0020 # MPI : DON'T FORGET to set environment variable MPI_INC_DIR to the include
                0021 #       directory of your MPI implementation
                0022 
                0023 if test "x$MPI" = xtrue ; then
                0024   CC=mpiicc
                0025   FC=mpiifort
                0026   F90C=mpiifort
                0027 #  LINK="$F90C -ipo"
                0028 else
                0029   CC=icc
                0030   FC=ifort
                0031   F90C=ifort
                0032 #  LINK="$F90C -ipo"
                0033 fi
                0034 
                0035 DEFINES='-DWORDLENGTH=4'
                0036 CPP='cpp -traditional -P'
                0037 F90FIXEDFORMAT='-fixed -Tf'
                0038 EXTENDED_SRC_FLAG='-132'
                0039 GET_FC_VERSION="--version"
492841d31e Mart*0040 OMPFLAG='-qopenmp'
39fe3d57e7 Mart*0041 
a2d8b5ae3d Mart*0042 NOOPTFLAGS='-O0'
39fe3d57e7 Mart*0043 NOOPTFILES=''
                0044 
                0045 FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl"
                0046 FFLAGS="$FFLAGS -fPIC"
                0047 #- might want to use '-r8' for fizhi pkg:
                0048 #FFLAGS="$FFLAGS -r8"
                0049 
                0050 if test "x$IEEE" = x ; then     #- with optimisation:
                0051 #    FOPTIM='-O2 -align -xHost -ipo'
                0052 # fast does not work because there are no static netcdf libaries
                0053 #    FOPTIM='-fast'
                0054 # so we spell it out (-ipo makes linking very slow, so we will skip that, too)
                0055 #    FOPTIM='-ipo -align -O3 -no-prec-div -fp-model fast=2 -xHost'
                0056     FOPTIM='-align -O3 -no-prec-div -fp-model fast=2 -xHost'
a2d8b5ae3d Mart*0057 # reduce optimization level a little for some files
                0058     NOOPTFLAGS='-align -O1 -no-prec-div -fp-model fast=2 -xHost'
                0059     NOOPTFILES='obcs_init_fixed.F'
39fe3d57e7 Mart*0060 else
                0061   if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :
83a28d7f65 Mart*0062     # "-fp-model [keyword]" is the recommended method of controlling precision
                0063     FOPTIM='-O0 -noalign -xHost -ip -fp-model consistent'
                0064 # alternatives, see man pages for details
                0065 #   FOPTIM='-O0 -noalign -xHost -ip -mp1'
                0066 #   FOPTIM='-O0 -noalign -xHost -ip -fp-model precise'
                0067 #   FOPTIM='-O0 -noalign -xHost -ip -mieee-fp'
39fe3d57e7 Mart*0068   else                          #- development/check options:
                0069 #    FFLAGS="$FFLAGS -warn all -warn nounused"
                0070     FFLAGS="$FFLAGS -warn unused"
83a28d7f65 Mart*0071     FOPTIM="-fpe0 -check all -ftrapuv -fp-model precise"
39fe3d57e7 Mart*0072     FOPTIM="$FOPTIM -O0 -noalign -g -traceback"
                0073   fi
                0074 fi
                0075 
                0076 F90FLAGS=$FFLAGS
                0077 F90OPTIM=$FOPTIM
                0078 CFLAGS='-O0 -fPIC -ip'
                0079 
                0080 INCLUDEDIRS=''
                0081 INCLUDES=''
                0082 LIBS=''
                0083 
f606cc0984 Mart*0084 # the extra -Wl,-rpath,${NETCDF_LIB} makes sure that the path to the
                0085 # dynamics libraries is hardwired in the executable and does not depend
                0086 # on which module you have loaded
39fe3d57e7 Mart*0087 if [ "x$NETCDF_ROOT" != x ] ; then
                0088     INCLUDEDIRS="${NETCDF_ROOT}/include"
                0089     INCLUDES="-I${NETCDF_ROOT}/include"
f606cc0984 Mart*0090     LIBS="-L${NETCDF_ROOT}/lib -Wl,-rpath,${NETCDF_ROOT}/lib"
39fe3d57e7 Mart*0091 elif [ "x$NETCDF_HOME" != x ]; then
                0092     INCLUDEDIRS="${NETCDF_HOME}/include"
                0093     INCLUDES="-I${NETCDF_HOME}/include"
f606cc0984 Mart*0094     LIBS="-L${NETCDF_HOME}/lib -Wl,-rpath,${NETCDF_HOME}/lib"
39fe3d57e7 Mart*0095 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
                0096     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
                0097     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
                0098     INCLUDEDIRS="${NETCDF_INC}"
                0099     INCLUDES="-I${NETCDF_INC}"
f606cc0984 Mart*0100     LIBS="-L${NETCDF_LIB} -Wl,-rpath,${NETCDF_LIB}"
39fe3d57e7 Mart*0101 fi
                0102 
                0103 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
                0104     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
                0105     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
                0106     #- used for parallel (MPI) DIVA
                0107     MPIINCLUDEDIR="$MPI_INC_DIR"
                0108    #MPI_HEADER_FILES='mpif.h mpiof.h'
                0109 fi