** 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/unsupported/linux_amd64_ifort11+mpi_generic
Warning, /tools/build_options/unsupported/linux_amd64_ifort11+mpi_generic is written in an unsupported language. File is not indexed.
view on github raw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
1335f9f461 Jean* 0001 #!/bin/bash
0002 #
0003 #
0004 # Constantinos Evangelinos
0005 #
b0385e42e2 Jean* 0006 # Build options for the intel 11 & 12 fortran compiler with a generic MPI
0007 # ==> DON'T FORGET to set environment variable MPI_INC_DIR to the include
0008 # directory of your MPI implementation
0009
0010 # Tested on danton (FC 14), with and without OpenMP, using
0011 # intel compiler v.11.1.046 (20090630) and also v.12.0.4 (20110427)
1335f9f461 Jean* 0012
a2b7e9952a Jean* 0013 #-------
0014 # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
0015 # and generally, needs to increase the stack-size:
0016 # - sh,bash:
0017 # > export OMP_NUM_THREADS=2
0018 # > export KMP_STACKSIZE=400m
0019 # - csh,tcsh:
0020 # > setenv OMP_NUM_THREADS 2
0021 # > setenv KMP_STACKSIZE 400m
b0385e42e2 Jean* 0022 # NOTE: need to set KMP_STACKSIZE in ~/.tcshrc
0023 # (but curiously, works without OMP_NUM_THREADS in ~/.tcshrc).
a2b7e9952a Jean* 0024 #-------
0025
1335f9f461 Jean* 0026 FC=${FC:=mpif77}
0027 F90C=${F90C:=mpif90}
0028 CC=${CC:=mpicc}
0029 LINK="$F90C -shared-intel -no-ipo"
0030
0031 DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
0032 CPP='cpp -traditional -P'
a2b7e9952a Jean* 0033 F90FIXEDFORMAT='-fixed -Tf'
1335f9f461 Jean* 0034 EXTENDED_SRC_FLAG='-132'
b0385e42e2 Jean* 0035 GET_FC_VERSION="--version"
a2b7e9952a Jean* 0036 OMPFLAG='-openmp'
1335f9f461 Jean* 0037
b0385e42e2 Jean* 0038 NOOPTFLAGS='-O0 -g'
1335f9f461 Jean* 0039 NOOPTFILES=''
0040
0041 INCLUDEDIRS=''
0042 INCLUDES=''
0043 LIBS=''
0044
0045 if test "x$GENERIC" != x ; then
0046 PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
0047 else
0048 PROCF=-xHost
0049 fi
b0385e42e2 Jean* 0050
0051 FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian -assume byterecl"
0052 #- might want to use '-r8' for fizhi pkg:
0053 #FFLAGS="$FFLAGS -r8"
0054
0055 if test "x$IEEE" = x ; then #- with optimisation:
1335f9f461 Jean* 0056 FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"
0057 else
b0385e42e2 Jean* 0058 if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
0059 FOPTIM="-O0 -fp-model source -noalign $PROCF"
0060 else #- development/check options:
0061 #FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict"
0062 FFLAGS="$FFLAGS -warn all -warn nounused"
0063 FOPTIM="-fpe0 -ftz -fp-stack-check -check all -ftrapuv"
0064 FOPTIM="$FOPTIM -O0 -noalign -g -traceback $PROCF"
0065 fi
1335f9f461 Jean* 0066 fi
b0385e42e2 Jean* 0067
1335f9f461 Jean* 0068 F90FLAGS=$FFLAGS
0069 F90OPTIM=$FOPTIM
b0385e42e2 Jean* 0070 CFLAGS="-O0 -ip -m64 -fPIC $PROCF"
1335f9f461 Jean* 0071
0072 if [ "x$NETCDF_ROOT" != x ] ; then
0073 INCLUDEDIRS="${NETCDF_ROOT}/include"
0074 INCLUDES="-I${NETCDF_ROOT}/include"
0075 LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_ROOT}/lib"
0076 elif [ "x$NETCDF_HOME" != x ]; then
0077 INCLUDEDIRS="${NETCDF_HOME}/include"
0078 INCLUDES="-I${NETCDF_HOME}/include"
0079 LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_HOME}/lib"
0080 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
0081 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
0082 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
0083 INCLUDEDIRS="${NETCDF_INC}"
0084 INCLUDES="-I${NETCDF_INC}"
0085 LIBS="-L${NETCDF_LIB}"
0086 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
0087 INCLUDEDIRS="${NETCDF_INCDIR}"
0088 INCLUDES="-I${NETCDF_INCDIR}"
0089 LIBS="-L${NETCDF_LIBDIR}"
0090 elif test -d /usr/include/netcdf-3 ; then
0091 INCLUDEDIRS='/usr/include/netcdf-3'
0092 INCLUDES='-I/usr/include/netcdf-3'
0093 LIBS='-L/usr/lib64/netcdf-3 -L/usr/lib/netcdf-3'
0094 elif test -d /usr/local/pkg/netcdf ; then
0095 INCLUDEDIRS='/usr/local/pkg/netcdf/include'
0096 INCLUDES='-I/usr/local/pkg/netcdf/include'
0097 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'
0098 elif test -d /usr/include/netcdf ; then
0099 INCLUDEDIRS='/usr/include/netcdf'
0100 INCLUDES='-I/usr/include/netcdf'
0101 elif test -d /usr/local/netcdf ; then
0102 INCLUDEDIRS='/usr/include/netcdf/include'
0103 INCLUDES='-I/usr/local/netcdf/include'
0104 LIBS='-L/usr/local/netcdf/lib64 -L/usr/local/netcdf/lib'
0105 elif test -f /usr/local/include/netcdf.inc ; then
0106 INCLUDEDIRS='/usr/local/include'
0107 INCLUDES='-I/usr/local/include'
0108 LIBS='-L/usr/local/lib64 -L/usr/local/lib'
0109 fi
0110
0111 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
0112 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
0113 MPIINCLUDEDIR="$MPI_INC_DIR"
0114 MPI_HEADER_FILES='mpif.h mpiof.h'
0115 MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'