** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=MITgcm at /usr/local/share/lxr/lib/LXR/Common.pm line 1224.

Last-Modified: Fri, 28 Nov 2024 06:11:57 GMT Content-Type: text/html; charset=utf-8 MITgcm/MITgcm/tools/build_options/linux_amd64_ifort11
Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit c26ad343 on 2023-02-14 14:29:40 UTC
6c257dab34 Cons*0001 #!/bin/bash
                0002 #
cc910637f4 Jean*0003 #  Build options for version 11 and newer of intel compiler on Linux AMD64 platform
                0004 #  Author: Constantinos Evangelinos
                0005 
                0006 #  Tested on baudelaire (FC 13) with intel compiler v.11.1.073 (20100806)
                0007 #
4cd90c874e Jean*0008 # OpenMP : tested on danton (FC 14) using intel compiler v.11.1.046 (20090630)
909f21cbd5 Jean*0009 #                                    and (FC 14,17 & 19) v.12.0.4   (20110427)
                0010 #                                    and also (FC 19)    v.14.0.0   (20130728)
c26ad343d2 Jean*0011 #              on jaures (FC21, FC23) using intel compiler v.15.0.3 (20150407)
cc910637f4 Jean*0012 #
c26ad343d2 Jean*0013 # MPI : Tested  on danton/jaures, with and without OpenMP,
                0014 #        using version v.11.1.046, v.12.0.4, v.14.0.0 and v.15.0.3
909f21cbd5 Jean*0015 #       and  on acesgrid  (FC 15)  with intel compiler v.13.0.0.079 (20120731)
c26ad343d2 Jean*0016 #       and  on svante (FC24) with: 17.0.3 (20170404) and 2021.4.0 (20210910)
cc910637f4 Jean*0017 # ==> DON'T FORGET to set environment variable MPI_INC_DIR to the include
                0018 #     directory of your MPI implementation
6c257dab34 Cons*0019 
85e2682b36 Jean*0020 #-------
                0021 # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
                0022 #    and generally, needs to increase the stack-size:
                0023 #   -  sh,bash:
                0024 #     > export OMP_NUM_THREADS=2
                0025 #     > export KMP_STACKSIZE=400m
                0026 #   - csh,tcsh:
                0027 #     > setenv OMP_NUM_THREADS 2
                0028 #     > setenv KMP_STACKSIZE 400m
cc910637f4 Jean*0029 #  NOTE, MPI+OpenMP: might need to set KMP_STACKSIZE in ~/.tcshrc
                0030 #        (but curiously, works without OMP_NUM_THREADS in ~/.tcshrc).
85e2682b36 Jean*0031 #-------
                0032 
cc910637f4 Jean*0033 if test "x$MPI" = xtrue ; then
                0034   CC=${CC:=mpicc}
                0035   FC=${FC:=mpif77}
                0036   F90C=${F90C:=mpif90}
                0037   LINK="$F90C -shared-intel -no-ipo"
                0038 else
                0039   CC=icc
                0040   FC=ifort
                0041   F90C=ifort
15906ccca2 Jean*0042   LINK="$F90C -shared-intel"
cc910637f4 Jean*0043 fi
6c257dab34 Cons*0044 
                0045 DEFINES='-DWORDLENGTH=4'
85e2682b36 Jean*0046 F90FIXEDFORMAT='-fixed -Tf'
6c257dab34 Cons*0047 EXTENDED_SRC_FLAG='-132'
ede1bd7ab5 Jean*0048 GET_FC_VERSION="--version"
85e2682b36 Jean*0049 OMPFLAG='-openmp'
6c257dab34 Cons*0050 
ede1bd7ab5 Jean*0051 NOOPTFLAGS='-O0 -g'
6c257dab34 Cons*0052 NOOPTFILES=''
                0053 
c26ad343d2 Jean*0054 #- for setting specific options, check compiler version:
                0055 fcVers=`$FC $GET_FC_VERSION | head -n 1 | awk '{print $NF}'`
                0056 if ! [[ $fcVers =~ ^[0-9]+$ ]] ; then
                0057   echo "    un-recognized Compiler-release '$fcVers' ; ignored (-> set to 0)" ; fcVers=0 ;
                0058 else echo "    get Compiler-release: '$fcVers'" ; fi
                0059 if [ $fcVers -ge 20160301 ] ; then
                0060     OMPFLAG='-qopenmp'
                0061 fi
                0062 
6c257dab34 Cons*0063 if test "x$GENERIC" != x ; then
                0064     PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
                0065 else
                0066     PROCF=-xHost
                0067 fi
4cd90c874e Jean*0068 
5f6f59d9c2 Jean*0069 CFLAGS="-O0 -ip -m64 $PROCF"
                0070 FFLAGS="$FFLAGS -m64 -convert big_endian -assume byterecl"
                0071 #- for big setups, compile & link with "-fPIC" or set memory-model to "medium":
f42b53d908 Jean*0072 #CFLAGS="$CFLAGS -fPIC"
                0073 #FFLAGS="$FFLAGS -fPIC"
5f6f59d9c2 Jean*0074 #-  with FC 19, need to use this without -fPIC (which cancels -mcmodel option):
f42b53d908 Jean*0075  CFLAGS="$CFLAGS -mcmodel=medium"
                0076  FFLAGS="$FFLAGS -mcmodel=medium"
4cd90c874e Jean*0077 #- might want to use '-r8' for fizhi pkg:
                0078 #FFLAGS="$FFLAGS -r8"
                0079 
                0080 if test "x$IEEE" = x ; then     #- with optimisation:
909f21cbd5 Jean*0081     FOPTIM="-O2 -align -ip -fp-model source $PROCF"
6c257dab34 Cons*0082 else
4cd90c874e Jean*0083   if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :
                0084     FOPTIM="-O0 -fp-model source -noalign $PROCF"
                0085   else                          #- development/check options:
                0086    #FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict"
7b3a8d9077 Jean*0087     FOPTIM="-O0 -noalign -g -traceback $PROCF"
                0088     NOOPTFLAGS=$FOPTIM
dba3d5ad42 Jean*0089     NOOPTFILES='adread_adwrite.F'
7b3a8d9077 Jean*0090     FOPTIM="$FOPTIM -warn all -warn nounused"
                0091     FOPTIM="$FOPTIM -fpe0 -ftz -fp-stack-check -check all -ftrapuv"
4cd90c874e Jean*0092   fi
6c257dab34 Cons*0093 fi
4cd90c874e Jean*0094 
6c257dab34 Cons*0095 F90FLAGS=$FFLAGS
                0096 F90OPTIM=$FOPTIM
                0097 
cc910637f4 Jean*0098 INCLUDEDIRS=''
                0099 INCLUDES=''
                0100 LIBS=''
                0101 
6c257dab34 Cons*0102 if [ "x$NETCDF_ROOT" != x ] ; then
                0103     INCLUDEDIRS="${NETCDF_ROOT}/include"
                0104     INCLUDES="-I${NETCDF_ROOT}/include"
                0105     LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_ROOT}/lib"
                0106 elif [ "x$NETCDF_HOME" != x ]; then
                0107     INCLUDEDIRS="${NETCDF_HOME}/include"
                0108     INCLUDES="-I${NETCDF_HOME}/include"
                0109     LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_HOME}/lib"
                0110 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
                0111     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
                0112     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
                0113     INCLUDEDIRS="${NETCDF_INC}"
                0114     INCLUDES="-I${NETCDF_INC}"
                0115     LIBS="-L${NETCDF_LIB}"
                0116 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
                0117     INCLUDEDIRS="${NETCDF_INCDIR}"
                0118     INCLUDES="-I${NETCDF_INCDIR}"
                0119     LIBS="-L${NETCDF_LIBDIR}"
                0120 elif test -d /usr/include/netcdf-3 ; then
                0121     INCLUDEDIRS='/usr/include/netcdf-3'
                0122     INCLUDES='-I/usr/include/netcdf-3'
                0123     LIBS='-L/usr/lib64/netcdf-3 -L/usr/lib/netcdf-3'
                0124 elif test -d /usr/local/pkg/netcdf ; then
                0125     INCLUDEDIRS='/usr/local/pkg/netcdf/include'
                0126     INCLUDES='-I/usr/local/pkg/netcdf/include'
                0127     LIBS='-L/usr/local/pkg-x86_64/netcdf/lib64 -L/usr/local/pkg-x86_64/netcdf/lib -L/usr/local/pkg/netcdf/lib64 -L/usr/local/pkg/netcdf/lib'
                0128 elif test -d /usr/include/netcdf ; then
                0129     INCLUDEDIRS='/usr/include/netcdf'
                0130     INCLUDES='-I/usr/include/netcdf'
                0131 elif test -d /usr/local/netcdf ; then
                0132     INCLUDEDIRS='/usr/include/netcdf/include'
                0133     INCLUDES='-I/usr/local/netcdf/include'
                0134     LIBS='-L/usr/local/netcdf/lib64 -L/usr/local/netcdf/lib'
                0135 elif test -f /usr/local/include/netcdf.inc ; then
                0136     INCLUDEDIRS='/usr/local/include'
                0137     INCLUDES='-I/usr/local/include'
                0138     LIBS='-L/usr/local/lib64 -L/usr/local/lib'
                0139 fi
                0140 
cc910637f4 Jean*0141 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
                0142     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
                0143     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
15978f0412 Jean*0144     #- used for parallel (MPI) DIVA
cc910637f4 Jean*0145     MPIINCLUDEDIR="$MPI_INC_DIR"
15978f0412 Jean*0146    #MPI_HEADER_FILES='mpif.h mpiof.h'
cc910637f4 Jean*0147 fi