default 22.6 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
#! /bin/sh
#
# default configuration options and compiler flags for different hosts
#
Uwe Schulzweida's avatar
Uwe Schulzweida committed
5
6
7
#
CONFPATH=`echo $0 | cut -c 1-6`
if [ "$CONFPATH" != "../../" ] ; then
8
  CONFPATH='./'
Uwe Schulzweida's avatar
Uwe Schulzweida committed
9
10
fi
#
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
COMP=""
HOSTNAME=`hostname`
#
while test $# != 0
do
  case $1 in
      CC=?*)
          COMP=`expr "X$1" : 'X[^=]*=\(.*\)'`
          ;;
      *)
          HOSTNAME=$1
          ;;
  esac
  shift
done
Uwe Schulzweida's avatar
Uwe Schulzweida committed
26
#
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
if test -z "$COMP" ; then COMP=gnu ; fi
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
#
Uwe Schulzweida's avatar
Uwe Schulzweida committed
29
set -x
Uwe Schulzweida's avatar
Uwe Schulzweida committed
30
31
#
case "${HOSTNAME}" in
32
33
# i386-apple-darwin10
    bailung*|d133*|d134*)
34
        CDOLIBS="--with-fftw3 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
35
                 --with-eccodes=$HOME/local/eccodes-2.6.0 \
36
37
                 --with-netcdf=$HOME/local/netcdf-4.4.1.1 \
                 --with-hdf5=$HOME/local/hdf5-1.8.19-threadsafe \
38
                 --with-udunits2=/opt/local \
39
                 --with-curl=/opt/local \
40
                 --with-libxml2=/opt/local \
41
42
                 --with-ossp-uuid=/opt/local \
                 --with-cmor=$HOME/local/cmor-3.3 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
43
                 --with-proj=/opt/local/lib/proj5 \
44
45
                 --with-szlib=$HOME/local"
#                 --with-magics=$HOME/local/Magics-2.25.3 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
46

Uwe Schulzweida's avatar
Uwe Schulzweida committed
47
48
        if  test "$COMP" = intel ; then
	  ${CONFPATH}configure \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
49
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
50
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib -Wl,-rpath,/opt/intel/lib" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
51
	            CXX=icpc CXXFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" \
52
	            CC=icc   CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native -fp-model strict"
53
54
        elif  test "$COMP" = pgi ; then
	  ${CONFPATH}configure --disable-openmp \
55
                    $CDOLIBS   --without-eccodes \
56
57
	            CXX=pgc++ CXXFLAGS="-g -O1" \
	            CC=pgcc   CFLAGS="-g -O1"
58
59
60
61
62
63
        elif  test "$COMP" = clang0 ; then
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O0" \
	            CC=clang    CFLAGS="-g -Wall -Wextra -O0"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
64
        elif  test "$COMP" = clang ; then
65
66
	  ${CONFPATH}configure --prefix=$HOME/local \
                    --enable-maintainer-mode \
67
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
68
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
69
70
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O3 -march=native" \
	            CC=clang    CFLAGS="-g -Wall -Wextra -O3 -march=native"
71
72
73
        elif  test "$COMP" = gnu4.9 ; then
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
74
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
75
76
	            CXX=g++-mp-4.9 CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
                    CC=gcc-mp-4.9  CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
77
78
79
        elif  test "$COMP" = gnu5 ; then
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
80
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
81
82
	            CXX=g++-mp-5 CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
                    CC=gcc-mp-5  CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
83
        elif  test "$COMP" = gnu_pic ; then
84
	  ${CONFPATH}configure  \
85
                    $CDOLIBS \
86
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
87
88
	            CXX=g++ CXXFLAGS="-g -fPIC" \
                    CC=gcc  CFLAGS="-g -fPIC"
89
90
91
        elif  test "$COMP" = gnu_stack ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
92
                    LDFLAGS="/opt/local/lib/gcc8/libstdc++.6.dylib -Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
93
94
	            CXX=g++ CXXFLAGS="-g -O2 -fstack-protector-strong" \
                    CC=gcc  CFLAGS="-g -O2 -fstack-protector-strong"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
95
        elif  test "$COMP" = gribapi ; then
96
	  ${CONFPATH}configure --disable-cgribex \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
97
                    $CDOLIBS \
98
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
99
	            CXX=g++ CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
100
                    CC=gcc  CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
101
        elif  test "$COMP" = hirlam_extensions ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
102
103
	  ${CONFPATH}configure --enable-hirlam-extensions \
                    $CDOLIBS \
104
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
105
	            CXX=g++ CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
106
                    CC=gcc  CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
107
108
        elif  test "$COMP" = without_threads ; then
	  ${CONFPATH}configure --without-threads \
109
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
110
111
112
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=address -fno-omit-frame-pointer" \
                    CC=clang    CFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=address -fno-omit-frame-pointer"
113
114
115
116
117
118
        elif  test "$COMP" = disable_openmp ; then
	  ${CONFPATH}configure --disable-openmp \
                    $CDOLIBS \
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=address -fno-omit-frame-pointer" \
                    CC=clang    CFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=address -fno-omit-frame-pointer"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
119
120
121
122
123
124
        elif  test "$COMP" = sanitize_address ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=address -fno-omit-frame-pointer" \
                    CC=clang    CFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=address -fno-omit-frame-pointer"
125
126
127
        elif  test "$COMP" = sanitize_undefined ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
128
129
130
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=undefined -fno-omit-frame-pointer" \
                    CC=clang    CFLAGS="-g -Wall -Wextra -O3 -march=native -fsanitize=undefined -fno-omit-frame-pointer" --disable-openmp
131
#                    --with-libxml2=/usr 
132
#                    --with-magics=/Users/m214003/local/magics-2.14.9
Uwe Schulzweida's avatar
Uwe Schulzweida committed
133
        else
134
135
136
	  ${CONFPATH}configure --prefix=$HOME/local \
                    --enable-maintainer-mode \
                    $CDOLIBS \
137
138
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
                    F77=gfortran \
139
140
	            CXX=g++ CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
                    CC=gcc  CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
141
        fi
142
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
143
    hama*)
144
#                 --with-cmor=/Users/m214003/work/CMOR \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
145
#                 --with-curl=/opt/local"
146
        CDOLIBS="--with-fftw3 \
147
                 --with-curl \
148
                 --with-szlib=$HOME/local \
149
                 --with-eccodes=$HOME/local/eccodes-2.3.0 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
150
151
                 --with-netcdf=$HOME/local/netcdf-c-4.4.1.1 \
                 --with-hdf5=$HOME/local/hdf5-1.8.18 \
152
                 --with-libxml2=/opt/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
153
154
155
                 --with-udunits2=/opt/local \
                 --with-ossp-uuid=/opt/local \
                 --with-cmor=$HOME/local/cmor-3.3 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
156
                 --with-magics=/opt/local \
157
                 --with-proj=/opt/local/lib/proj5"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
158

Uwe Schulzweida's avatar
Uwe Schulzweida committed
159
        if  test "$COMP" = intel ; then
160
	  ${CONFPATH}configure --prefix=$HOME/local \
161
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib -Wl,-rpath,/opt/intel/lib" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
162
163
	            CXX=icpc CXXFLAGS="-g -Wall -O0 -qopt-report=5 -march=native" \
	            CC=icc   CFLAGS="-g -Wall -O0 -qopt-report=5 -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
164
        elif  test "$COMP" = clang ; then
165
166
	  ${CONFPATH}configure --prefix=$HOME/local \
                    --enable-maintainer-mode \
167
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
168
169
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -pedantic -O3 -march=native" \
	            CC=clang    CFLAGS="-g -Wall -Wextra -pedantic -O3 -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
170
        elif  test "$COMP" = pgi ; then
171
	  ${CONFPATH}configure --disable-openmp \
172
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
173
174
	            CXX=pgc++ CXXFLAGS="-g -fast" \
	            CC=pgcc   CFLAGS="-g -fast"
175
176
177
        elif  test "$COMP" = sanitize_address ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
178
179
180
181
182
183
184
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O2 -fsanitize=address -fno-omit-frame-pointer" \
                    CC=clang    CFLAGS="-g -Wall -Wextra -O2 -fsanitize=address -fno-omit-frame-pointer"
        elif  test "$COMP" = sanitize_memory ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
	            CXX=clang++ CXXFLAGS="-g -Wall -Wextra -O2 -fsanitize=memory -fno-omit-frame-pointer" \
                    CC=clang    CFLAGS="-g -Wall -Wextra -O2 -fsanitize=memory -fno-omit-frame-pointer"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
185
186
187
188
189
190
191
        elif  test "$COMP" = gnu9 ; then
	  ${CONFPATH}configure \
                    $CDOLIBS \
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
                    F77=gfortran FFLAGS="-g -O2" \
	            CXX=g++-mp-9 CXXFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q" \
	            CC=gcc-mp-9  CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q"
192
193
194
195
196
197
        elif  test "$COMP" = hirlam_extensions ; then
	  ${CONFPATH}configure  --enable-hirlam-extensions \
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
                    F77=gfortran FFLAGS="-g -O2" \
	            CXX=g++ CXXFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q" \
	            CC=gcc  CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q"
198
199
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
200
                    --enable-maintainer-mode \
201
                    $CDOLIBS LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
202
                    F77=gfortran FFLAGS="-g -O2" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
203
204
	            CXX=g++ CXXFLAGS="-g -pipe -Wall -Wextra -Wshadow -Wfloat-equal -pedantic -O3 -march=native -Wa,-q" \
	            CC=gcc  CFLAGS="-g -pipe -Wall -Wextra -Wshadow -Wfloat-equal -pedantic -O3 -march=native -Wa,-q"
205
        fi
Uwe Schulzweida's avatar
Uwe Schulzweida committed
206
	;;
207
# win7 based cygwin virtual machine
208
    cdo4windows-cyg)
Ralf Mueller's avatar
Ralf Mueller committed
209
210
        CDOLIBS="--with-netcdf=/usr/local \
                 --with-hdf5=/usr/local \
211
                 --with-grib_api=/usr/local
212
213
214
                 --with-udunits2=/usr \
                 --with-proj=/usr"

Uwe Schulzweida's avatar
Uwe Schulzweida committed
215
        if  test "$COMP" = gnu ; then
Ralf Mueller's avatar
Ralf Mueller committed
216
	  ${CONFPATH}configure --prefix=/usr/local \
217
                    $CDOLIBS \
Ralf Mueller's avatar
Ralf Mueller committed
218
	            CC=gcc CFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
219
	            CXX=g++ CXXFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
Ralf Mueller's avatar
Ralf Mueller committed
220
221
                    LDFLAGS='-L/usr/local/lib' \
                    LIBS='-lpthread -lm -lcurl -lhdf5_hl -lhdf5 -lz  -lsz -laec -ldl'
222
223
        fi
	;;
224
225
226
227
228
229
230
    cdo4win1)
        CDOLIBS="--with-netcdf \
                 --with-hdf5 \
                 --with-udunits2 \
                 --with-proj --with-eccodes=/usr/local"

        if  test "$COMP" = gnu ; then
231
          ${CONFPATH}configure --prefix=$(pwd)/build \
232
                    $CDOLIBS \
233
                    LDFLAGS="-L/usr/local/lib /usr/local/lib/libeccodes.a -leccodes -lopenjpeg" \
234
235
236
237
	            CC=gcc CFLAGS="-g -Wall -O2 -DPIC -pie -mwindows -ftree-vectorize" \
	            CXX=g++ CXXFLAGS="-g -Wall -O2 -DPIC -pie -mwindows -ftree-vectorize"
        fi
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
238
    daint*)
239
        if  test "$COMP" = intel ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
240
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/INTEL/14.0"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
241
242
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
243
244
	            CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native -openmp"
        elif  test "$COMP" = pgi ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
245
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/PGI/15.3"
246
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
247
                    $CDOLIBS \
248
	            CC=pgcc CXX=pgc++ CFLAGS="-g -O2"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
249
        elif  test "$COMP" = cray ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
250
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/CRAY/8.3"
251
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
252
                    $CDOLIBS \
253
	            CC=cc CXX=CC CFLAGS="-g -O2 -h noomp"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
254
        else
Uwe Schulzweida's avatar
Uwe Schulzweida committed
255
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/GNU/4.9"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
256
257
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
258
	            CC=gcc CXX=g++ CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
259
260
        fi
	;;
261
# stretch workstation x64
Uwe Schulzweida's avatar
Uwe Schulzweida committed
262
    breeze*)
263
        CDOLIBS="--with-netcdf=/sw/stretch-x64/netcdf/netcdf_c-4.6.1 \
264
                 --with-fftw3 \
265
266
                 --with-udunits2=/sw/stretch-x64/sys/udunits-2.2.24-gccsys"
        if  test "$COMP" = intel ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
267
          ${CONFPATH}configure  \
268
269
270
                    $CDOLIBS \
	            CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
        elif  test "$COMP" = pgi ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
271
          ${CONFPATH}configure  \
272
273
                    $CDOLIBS \
	            CC=pgcc CXX=pgc++ CFLAGS="-g"
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
        elif  test "$COMP" = clang4 ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++-4.0 CXXFLAGS="-g -Wall -Wextra -O3 -march=native" \
                    CC=clang-4.0    CFLAGS="-g -Wall -Wextra -O3 -march=native"
        elif  test "$COMP" = sanitize_address ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++-4.0 CXXFLAGS="-g -Wall -Wextra -O2 -fsanitize=address -fno-omit-frame-pointer" \
                    CC=clang-4.0    CFLAGS="-g -Wall -Wextra -O2"
        elif  test "$COMP" = sanitize_memory ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
                    LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.6.0/lib" \
	            CXX=clang++-4.0 CXXFLAGS="-g -Wall -Wextra -O2 -fsanitize=memory  -fsanitize-memory-track-origins -fno-omit-frame-pointer" \
                    CC=clang-4.0    CFLAGS="-g -Wall -Wextra -O2"
292
293
294
295
296
297
        elif  test "$COMP" = gnu_stack ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
	            CXX=g++ CXXFLAGS="-g -O2 -fstack-protector-strong" \
                    CC=gcc  CFLAGS="-g -O2 -fstack-protector-strong"
 	else
298
          ${CONFPATH}configure \
299
                    $CDOLIBS \
300
301
	            CXX=g++ CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
	            CC=gcc  CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
302
	fi
303
	;;
304
# mistral
305
    mlogin* | mistral*)
306
        CDOLIBS="--with-eccodes=/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64 \
307
                 --with-netcdf=/sw/rhel6-x64/netcdf/netcdf_c-4.6.1-gcc64 \
308
                 --with-hdf5=/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
309
                 --with-szlib=/sw/rhel6-x64/sys/libaec-0.3.4-gcc48 \
310
                 --with-udunits2=/sw/rhel6-x64/util/udunits-2.2.17-gcc48 \
311
                 --with-fftw3 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
312
313
                 --with-curl \
                 --with-ossp-uuid \
314
                 --with-proj=/sw/rhel6-x64/graphics/proj5-5.2.0-gcc64 \
315
                 --with-cmor=/sw/rhel6-x64/cmor-3.3.3-gcc64"
316
#                 --with-magics=/sw/rhel6-x64/graphics/magicsxx-2.33.0-gfxonly-gcc48 \
317

318
        if  test "$COMP" = intel ; then
Ralf Mueller's avatar
Ralf Mueller committed
319
          ${CONFPATH}configure --prefix=$HOME/local \
320
                    $CDOLIBS \
321
                    LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
322
                    F77=ifort FFLAGS="-g -O2" \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
323
324
	            CXX=icpc CXXFLAGS="-g -Wall -O2 -march=core-avx2" \
	            CC=icc   CFLAGS="-g -Wall -O2 -march=core-avx2"
325
        elif  test "$COMP" = pgi ; then
326
          ${CONFPATH}configure --disable-openmp \
327
                    $CDOLIBS \
328
                    LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
329
330
	            CXX=pgc++ CXXFLAGS="-g -fast" \
	            CC=pgcc   CFLAGS="-g -fast"
331
332
333
        elif  test "$COMP" = gnu_pic ; then
          ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
334
                    LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
335
336
337
                    F77=gfortran FFLAGS="-g -O2" \
                    CXX=g++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2 -fPIC' \
                    CC=gcc  CFLAGS='-g -Wall -O3 -march=native -mavx2 -fPIC'
338
	else
339
          ${CONFPATH}configure --prefix=$HOME/local \
340
                    $CDOLIBS \
341
                    LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
342
                    F77=gfortran FFLAGS="-g -O2" \
343
344
                    CXX=g++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2' \
                    CC=gcc  CFLAGS='-g -Wall -O3 -march=native -mavx2'
345
346
	fi
	;;
347
# x86_64-unknown-linux-gnu
348
    btc*)
349
350
        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local \
351
352
353
                    --with-grib_api=/lustre/sw/rhel6-x64/grib_api/grib_api-1.13.0-intel15 \
	            --with-netcdf=/lustre/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-intel15 \
                    --with-hdf5=/lustre/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-intel15 \
354
                    --with-fftw3 \
355
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -xCORE-AVX2"
356
357
	else
          ${CONFPATH}configure --prefix=$HOME/local \
358
359
360
                    --with-grib_api=/lustre/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 \
	            --with-netcdf=/lustre/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 \
                    --with-hdf5=/lustre/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 \
361
362
363
                    --with-fftw3 \
                    CC=gcc CFLAGS='-g -Wall -O3 -march=native'
	fi
364
	;;
365
366
367
368
369
370
371
372
373
374
375
376
# ia64-xxx-linux
    ds*)
	${CONFPATH}configure --prefix=$HOME/local \
                    --with-netcdf=/pool/ia64/netcdf/netcdf-3.6.0-p1 \
                    --with-szlib=$HOME/local \
                    CC=icc CFLAGS="-g -O2 -Wall -fno-alias -DMIN_BUF_SIZE=4194304"
	;;
    wasser*)
	${CONFPATH}configure --prefix=$HOME/local \
                    --with-netcdf=/home/dkrz/m214089/local/ia64 \
                    CC=icc CFLAGS="-g -O2 -Wall -fno-alias"
	;;
377
# x86_64-archlinux
378
    melian*)
379
      case "$COMP" in
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
        gcc)
 	${CONFPATH}configure --prefix=$HOME/local \
                    --program-suffix=-dev \
                    --enable-data \
	            --with-magics \
	            --with-netcdf \
	              --with-hdf5 \
                     --with-szlib \
                  --with-grib_api \
                  --with-eccodes  \
                  --with-grib_api \
                  --with-fftw3    \
                  --with-proj     \
                      --with-pic  \
                      CC=gcc CXX=g++ CPPFLAGS=-I/usr/include/magics \
                      CFLAGS="-g -Wall -O3 -ftree-vectorize" CXXFLAGS="-g -Wall -O3 -ftree-vectorize"  \
                      LIBS="-lopenjpeg"
        ;;
        clang)
399
400
 	${CONFPATH}configure --prefix=$HOME/local \
                    --program-suffix=-dev \
401
                    --enable-data \
402
	            --with-magics \
Ralf Mueller's avatar
Ralf Mueller committed
403
404
405
406
	            --with-netcdf \
	              --with-hdf5 \
                     --with-szlib \
                  --with-grib_api \
407
                  --with-eccodes  \
408
409
410
411
                  --with-grib_api \
                  --with-fftw3    \
                  --with-proj     \
                      --with-pic  \
412
413
414
                      CC=clang CXX=clang++ CPPFLAGS=-I/usr/include/magics \
                      CFLAGS="-g -Wall -ftree-vectorize" CXXFLAGS="-g -Wall -ftree-vectorize"  \
                      LIBS="-lopenjpeg"
415
416
417
        ;;
      esac
    ;;
Ralf Mueller's avatar
Ralf Mueller committed
418
419
# standard workstations at MPI-M debian jessie
    mpipc149)
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
      CDOLIBS="--prefix=`pwd`/build \
              --enable-maintainer-mode \
              --with-netcdf=/sw/jessie-x64/netcdf-4.3.3.1-gccsys \
              --with-hdf5=/sw/jessie-x64/hdf5-1.8.16-gccsys/ \
              --with-szlib=/sw/jessie-x64/szip-2.1-gccsys \
              --with-udunits2=/sw/jessie-x64/udunits-2.2.20-gccsys \
              --enable-ruby --enable-swig --enable-python "
      case "$COMP" in
        gcc)
          ${CONFPATH}configure \
            $CDOLIBS \
            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2" LIBS='-lm  -lpthread '
          ;;
        g++) # jessie used gcc 6.1.1
          ${CONFPATH}configure \
            $CDOLIBS \
            --enable-cxx \
437
            CC=gcc CXX=g++ CFLAGS="-std=c++11 -g -Wall -W -Wfloat-equal -pedantic -O2" LIBS='-lm  -lpthread '
438
439
440
441
442
443
          ;;
        clang)
          ${CONFPATH}configure \
            $CDOLIBS \
            --disable-openmp \
            CC=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang CXX=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang++
Ralf Mueller's avatar
Ralf Mueller committed
444
        ;;
445
446
447
448
449
450
451
452
453
        clang++) # recent clang-3.8
          ${CONFPATH}configure \
            $CDOLIBS \
            --disable-openmp \
            --enable-cxx \
            CC=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang CXX=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang++
        ;;
      esac
      ;;
454
455
456
457
458
# standard workstations at MPI-M x86_64-lenny
    mpipc* )
	${CONFPATH}configure \
               --prefix=`pwd`/build \
               --enable-maintainer-mode \
Ralf Mueller's avatar
Ralf Mueller committed
459
460
461
462
               --with-netcdf='/sw/squeeze-x64/netcdf-latest-gccsys' \
               --with-hdf5='/sw/squeeze-x64/hdf5-latest' \
               --with-szlib='/sw/squeeze-x64/szip-latest' \
               --with-proj='/sw/squeeze-x64/proj-latest' \
463
               --enable-ruby --enable-swig --enable-python \
464
	           CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
465
        ;;
466
# dap enabled
467
    egmont | columbine)
468
469
470
 	  ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/etch-ia32 \
	            --with-netcdf=/sw/etch-ia32/netcdf-4.1.1-gcc \
	            --with-hdf5=/sw/etch-ia32/hdf5-1.8.4-threadsafe \
471
                    --with-szlib=/sw/etch-ia32/szip-2.1 \
472
	            --enable-all-static CC=icc CFLAGS="-g -fast -openmp" AR=xiar LD=xild
473
#	            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
474
    ;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
475
# i386-pc-solaris2.10
Uwe Schulzweida's avatar
Uwe Schulzweida committed
476
    grim | mil* )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
477
	${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
478
                    --with-netcdf=/client \
479
                    --with-szlib=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
480
481
                    CC=cc CFLAGS="-g -mt -fast"
	;;
482
483
484
485
486
487
488
489
# x86_64-unknown-linux-gnu (cray)
    brisi*)
        ${CONFPATH}configure  \
                    --with-netcdf=/opt/cray/netcdf/4.3.2/INTEL/140 \
                    --with-hdf5=/opt/cray/hdf5/1.8.13/INTEL/140 \
                    --with-fftw3 \
                    CC=gcc CFLAGS='-g -Wall -O3'
	;;
490
491
492
493
494
495

    *)
      echo "Could not find host!!!";
      echo "hostname used is: '${HOSTNAME}'"
      exit 1;
      ;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
496
esac