/[MITgcm]/MITgcm/tools/build_options/linux_ia64_ifort_ollie
ViewVC logotype

Annotation of /MITgcm/tools/build_options/linux_ia64_ifort_ollie

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Jun 21 13:29:22 2016 UTC (7 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint65y
Changes since 1.1: +5 -2 lines
add obcs_init_fixed.F to the NOOPTFILES and reduce the optimization level for
NOOPTFILES from -O3 to -O1 so that exp4 passes "./testreport -fast"

1 mlosch 1.1 #!/bin/bash
2     #
3 mlosch 1.2 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia64_ifort_ollie,v 1.1 2016/06/02 07:29:26 mlosch Exp $
4 mlosch 1.1 # $Name: $
5     #
6     # derived from linux_amd64_ifort, tested on ollie.awi.de (CRAY CS400)
7     #
8     # requires these modules
9     # module purge (to remove you have anything that may conflict with ifort)
10     # module load intel.compiler
11     # module load intel.mpi
12     # module load netcdf/4.4.0_intel
13    
14     # - For more speed, provided your data size doesn't exceed 2GB you can
15     # remove -fPIC which carries a performance penalty of 2-6%.
16     # - Provided that the libraries you link to are compiled with -fPIC this
17     # optfile should work.
18     # - You can replace -fPIC with -mcmodel=medium which may perform faster
19     # than -fPIC and still support data sizes over 2GB per process but all
20     # the libraries you link to must be compiled with -fPIC or -mcmodel=medium
21     #
22     # MPI : DON'T FORGET to set environment variable MPI_INC_DIR to the include
23     # directory of your MPI implementation
24    
25     if test "x$MPI" = xtrue ; then
26     CC=mpiicc
27     FC=mpiifort
28     F90C=mpiifort
29     # LINK="$F90C -ipo"
30     else
31     CC=icc
32     FC=ifort
33     F90C=ifort
34     # LINK="$F90C -ipo"
35     fi
36    
37     DEFINES='-DWORDLENGTH=4'
38     CPP='cpp -traditional -P'
39     F90FIXEDFORMAT='-fixed -Tf'
40     EXTENDED_SRC_FLAG='-132'
41     GET_FC_VERSION="--version"
42     OMPFLAG='-openmp'
43    
44 mlosch 1.2 NOOPTFLAGS='-O0'
45 mlosch 1.1 NOOPTFILES=''
46    
47     FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl"
48     FFLAGS="$FFLAGS -fPIC"
49     #- might want to use '-r8' for fizhi pkg:
50     #FFLAGS="$FFLAGS -r8"
51    
52     if test "x$IEEE" = x ; then #- with optimisation:
53     # FOPTIM='-O2 -align -xHost -ipo'
54     # fast does not work because there are no static netcdf libaries
55     # FOPTIM='-fast'
56     # so we spell it out (-ipo makes linking very slow, so we will skip that, too)
57     # FOPTIM='-ipo -align -O3 -no-prec-div -fp-model fast=2 -xHost'
58     FOPTIM='-align -O3 -no-prec-div -fp-model fast=2 -xHost'
59 mlosch 1.2 # reduce optimization level a little for some files
60     NOOPTFLAGS='-align -O1 -no-prec-div -fp-model fast=2 -xHost'
61     NOOPTFILES='obcs_init_fixed.F'
62 mlosch 1.1 else
63     if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
64     # "-mp" is for ieee "maintain precision"
65     FOPTIM='-O0 -noalign -xHost -ip -mp'
66     else #- development/check options:
67     # FFLAGS="$FFLAGS -warn all -warn nounused"
68     FFLAGS="$FFLAGS -warn unused"
69     FOPTIM="-fpe0 -check all -ftrapuv"
70     FOPTIM="$FOPTIM -O0 -noalign -g -traceback"
71     fi
72     fi
73    
74     F90FLAGS=$FFLAGS
75     F90OPTIM=$FOPTIM
76     CFLAGS='-O0 -fPIC -ip'
77    
78     INCLUDEDIRS=''
79     INCLUDES=''
80     LIBS=''
81    
82     if [ "x$NETCDF_ROOT" != x ] ; then
83     INCLUDEDIRS="${NETCDF_ROOT}/include"
84     INCLUDES="-I${NETCDF_ROOT}/include"
85     LIBS="-L${NETCDF_ROOT}/lib"
86     elif [ "x$NETCDF_HOME" != x ]; then
87     INCLUDEDIRS="${NETCDF_HOME}/include"
88     INCLUDES="-I${NETCDF_HOME}/include"
89     LIBS="-L${NETCDF_HOME}/lib"
90     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
91     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
92     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
93     INCLUDEDIRS="${NETCDF_INC}"
94     INCLUDES="-I${NETCDF_INC}"
95     LIBS="-L${NETCDF_LIB}"
96     fi
97    
98     if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
99     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
100     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
101     #- used for parallel (MPI) DIVA
102     MPIINCLUDEDIR="$MPI_INC_DIR"
103     #MPI_HEADER_FILES='mpif.h mpiof.h'
104     fi

  ViewVC Help
Powered by ViewVC 1.1.22