Warning, /tools/build_options/linux_ia64_ifort is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
ebd5eca422 Patr*0001 #!/bin/bash
0002 #
9e7ae8fe3d Mart*0003 # Tested on uv100.awi.de (SGI UV 100, details:
0004 # http://www.sgi.com/products/servers/uv/specs.html)
0005 # a) For more speed, provided your data size does not exceed 2GB you can
888edb3ed5 Jean*0006 # remove -fPIC which carries a performance penalty of 2-6%.
5af87d1798 Jean*0007 # b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may
9e7ae8fe3d Mart*0008 # perform faster than -fPIC and still support data sizes over 2GB per
5af87d1798 Jean*0009 # process but all the libraries you link to must be compiled with
9e7ae8fe3d Mart*0010 # -fPIC or -mcmodel=medium
0011 # c) flags adjusted for ifort 12.1.0
ebd5eca422 Patr*0012
0013 FC=ifort
0014 F90C=ifort
0015 CC=icc
9e7ae8fe3d Mart*0016 # requires that all static libraries are available:
0017 #LINK='ifort -static'
0018 LINK='ifort'
0019 # for adjoint runs the default makedepend often cannot handle enough files
0020 #MAKEDEPEND=tools_xmakedepend
888edb3ed5 Jean*0021
0022 DEFINES='-DWORDLENGTH=4'
9e7ae8fe3d Mart*0023 CPP='cpp -traditional -P'
5af87d1798 Jean*0024 F90FIXEDFORMAT='-fixed -Tf'
480c36b0db Davi*0025 EXTENDED_SRC_FLAG='-132'
888edb3ed5 Jean*0026 #OMPFLAG='-openmp'
ebd5eca422 Patr*0027
5af87d1798 Jean*0028 NOOPTFLAGS="-O0 -g -m64"
0029 NOOPTFILES=''
ebd5eca422 Patr*0030
9e7ae8fe3d Mart*0031 MCMODEL='-fPIC'
0032 # for large memory requirements uncomment this line
0033 #MCMODEL='-mcmodel=medium -shared-intel'
0034
5af87d1798 Jean*0035 FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl $MCMODEL"
888edb3ed5 Jean*0036 #- might want to use '-r8' for fizhi pkg:
0037 #FFLAGS="$FFLAGS -r8"
ebd5eca422 Patr*0038
5af87d1798 Jean*0039 if test "x$IEEE" = x ; then #- with optimisation:
9e7ae8fe3d Mart*0040 FOPTIM='-O3 -align'
0041 # does not work when -static does not work
0042 # FOPTIM='-fast -align'
0043 # instead you can use
0044 # FOPTIM='-O3 -ipo -align'
ebd5eca422 Patr*0045 else
5af87d1798 Jean*0046 if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
0047 FOPTIM='-O0 -noalign -fp-model precise'
0048 # -fltconsistency
0049 else #- development/check options:
0050 FOPTIM='-O0 -noalign -fp-model precise'
0051 FOPTIM="$FOPTIM -g -check all -fpe0 -traceback -ftrapuv -fp-model except -warn all"
0052 fi
ebd5eca422 Patr*0053 fi
5af87d1798 Jean*0054
ebd5eca422 Patr*0055 F90FLAGS=$FFLAGS
0056 F90OPTIM=$FOPTIM
9e7ae8fe3d Mart*0057 CFLAGS="-O0 -ip $MCMODEL"
ebd5eca422 Patr*0058
5af87d1798 Jean*0059 INCLUDEDIRS=''
0060 INCLUDES=''
0061 LIBS=''
0062
ebd5eca422 Patr*0063 if [ "x$NETCDF_ROOT" != x ] ; then
0064 INCLUDEDIRS="${NETCDF_ROOT}/include"
0065 INCLUDES="-I${NETCDF_ROOT}/include"
0066 LIBS="-L${NETCDF_ROOT}/lib"
0067 elif [ "x$NETCDF_HOME" != x ]; then
0068 INCLUDEDIRS="${NETCDF_HOME}/include"
0069 INCLUDES="-I${NETCDF_HOME}/include"
0070 LIBS="-L${NETCDF_HOME}/lib"
0071 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
0072 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
0073 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
0074 INCLUDEDIRS="${NETCDF_INC}"
0075 INCLUDES="-I${NETCDF_INC}"
0076 LIBS="-L${NETCDF_LIB}"
0077 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
0078 INCLUDEDIRS="${NETCDF_INCDIR}"
0079 INCLUDES="-I${NETCDF_INCDIR}"
0080 LIBS="-L${NETCDF_LIBDIR}"
0081 elif test -d /usr/include/netcdf-3 ; then
0082 INCLUDEDIRS='/usr/include/netcdf-3'
0083 INCLUDES='-I/usr/include/netcdf-3'
0084 LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
0085 elif test -d /usr/include/netcdf ; then
0086 INCLUDEDIRS='/usr/include/netcdf'
0087 INCLUDES='-I/usr/include/netcdf'
0088 elif test -d /usr/local/netcdf ; then
0089 INCLUDEDIRS='/usr/include/netcdf/include'
0090 INCLUDES='-I/usr/local/netcdf/include'
0091 LIBS='-L/usr/local/netcdf/lib'
0092 elif test -d /usr/local/include/netcdf.inc ; then
0093 INCLUDEDIRS='/usr/local/include'
0094 INCLUDES='-I/usr/local/include'
0095 LIBS='-L/usr/local/lib64'
0096 fi
0097
9e7ae8fe3d Mart*0098 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
0099 LIBS="$LIBS -lmpi"
0100 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
0101 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
15978f0412 Jean*0102 #- used for parallel (MPI) DIVA
9e7ae8fe3d Mart*0103 MPIINCLUDEDIR="$MPI_INC_DIR"
15978f0412 Jean*0104 #MPI_HEADER_FILES='mpif.h mpiof.h'
9e7ae8fe3d Mart*0105 fi
0106