Warning, /tools/build_options/linux_amd64_ifort_uv100 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
e0192e1c5d Mart*0001 #!/bin/bash
0002 #
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
0006 # remove -fPIC which carries a performance penalty of 2-6%.
0007 # b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may
0008 # perform faster than -fPIC and still support data sizes over 2GB per
0009 # process but all the libraries you link to must be compiled with
0010 # -fPIC or -mcmodel=medium
0011 # c) flags adjusted for ifort 12.1.0
0012
0013 FC=ifort
0014 F90C=ifort
0015 CC=icc
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
0021
0022 DEFINES='-DWORDLENGTH=4'
0023 CPP='cpp -traditional -P'
0024 F90FIXEDFORMAT='-fixed -Tf'
0025 EXTENDED_SRC_FLAG='-132'
0026 GET_FC_VERSION="--version"
0027 OMPFLAG='-openmp'
0028
0029 NOOPTFLAGS="-O0 -g -m64"
0030 NOOPTFILES=''
0031
0032 MCMODEL='-fPIC'
0033 # for large memory requirements uncomment this line
0034 #MCMODEL='-mcmodel=medium -shared-intel'
0035
0036 FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl $MCMODEL"
0037 #- might want to use '-r8' for fizhi pkg:
0038 #FFLAGS="$FFLAGS -r8"
0039
0040 if test "x$IEEE" = x ; then #- with optimisation:
0041 FOPTIM='-O3 -align'
0042 # does not work when -static does not work
0043 # FOPTIM='-fast -align'
0044 # instead you can use
0045 # FOPTIM='-O3 -ipo -align'
0046 else
0047 if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
0048 FOPTIM='-O0 -noalign -fp-model precise'
0049 # -fltconsistency
0050 else #- development/check options:
0051 FFLAGS="$FFLAGS -warn all -warn nounused"
0052 FOPTIM="-fpe0 -fp-model precise -fp-model except -check all -ftrapuv"
0053 FOPTIM="$FOPTIM -O0 -noalign -g -traceback"
0054 fi
0055 fi
0056
0057 F90FLAGS=$FFLAGS
0058 F90OPTIM=$FOPTIM
0059 CFLAGS="-O0 -ip $MCMODEL"
0060
0061 INCLUDEDIRS=''
0062 INCLUDES=''
0063 LIBS=''
0064
0065 if [ "x$NETCDF_ROOT" != x ] ; then
0066 INCLUDEDIRS="${NETCDF_ROOT}/include"
0067 INCLUDES="-I${NETCDF_ROOT}/include"
0068 LIBS="-L${NETCDF_ROOT}/lib"
0069 elif [ "x$NETCDF_HOME" != x ]; then
0070 INCLUDEDIRS="${NETCDF_HOME}/include"
0071 INCLUDES="-I${NETCDF_HOME}/include"
0072 LIBS="-L${NETCDF_HOME}/lib"
0073 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
0074 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
0075 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
0076 INCLUDEDIRS="${NETCDF_INC}"
0077 INCLUDES="-I${NETCDF_INC}"
0078 LIBS="-L${NETCDF_LIB}"
0079 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
0080 INCLUDEDIRS="${NETCDF_INCDIR}"
0081 INCLUDES="-I${NETCDF_INCDIR}"
0082 LIBS="-L${NETCDF_LIBDIR}"
0083 elif test -d /usr/include/netcdf-3 ; then
0084 INCLUDEDIRS='/usr/include/netcdf-3'
0085 INCLUDES='-I/usr/include/netcdf-3'
0086 LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
0087 elif test -d /usr/include/netcdf ; then
0088 INCLUDEDIRS='/usr/include/netcdf'
0089 INCLUDES='-I/usr/include/netcdf'
0090 elif test -d /usr/local/netcdf ; then
0091 INCLUDEDIRS='/usr/include/netcdf/include'
0092 INCLUDES='-I/usr/local/netcdf/include'
0093 LIBS='-L/usr/local/netcdf/lib'
0094 elif test -d /usr/local/include/netcdf.inc ; then
0095 INCLUDEDIRS='/usr/local/include'
0096 INCLUDES='-I/usr/local/include'
0097 LIBS='-L/usr/local/lib64'
0098 fi
0099 # uv100 special:
0100 # special libraries are require for specific versions of ifort/netcdf
0101 if [ "x$NETCDF_LD" != x ] ; then
0102 LIBS="$NETCDF_LD"
0103 fi
0104
0105 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
0106 LIBS="$LIBS -lmpi"
0107 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
0108 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
0109 #- used for parallel (MPI) DIVA
0110 MPIINCLUDEDIR="$MPI_INC_DIR"
0111 #MPI_HEADER_FILES='mpif.h mpiof.h'
0112 fi