default 13.2 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
set -x
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
29
#
case "${HOSTNAME}" in
30
31
# i386-apple-darwin10
    bailung*|d133*|d134*)
32
33
        CDOLIBS="--enable-nearpt3 \
                 --with-fftw3 \
34
35
36
37
                 --with-grib_api=$HOME/local/grib_api-1.13.1 \
                 --with-netcdf=$HOME/local/netcdf-c-4.3.3.1-threadsafe \
                 --with-hdf5=$HOME/local/hdf5-1.8.15-threadsafe \
                 --with-udunits2=/opt/local \
38
39
40
                 --with-curl=/opt/local \
                 --with-proj=/opt/local \
                 --with-szlib=$HOME/local"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
41

Uwe Schulzweida's avatar
Uwe Schulzweida committed
42
        if  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
43
	  ${CONFPATH}configure  \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
44
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
45
	            CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native" CXX=icpc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
46
47
48
        elif  test "$COMP" = icpc ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
49
	            CC=icpc CFLAGS="-g -std=c++11 -Wall -O2 -qopt-report=5 -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
50
51
52
        elif  test "$COMP" = clang++ ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
53
	            CC=clang++ CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
54
        elif  test "$COMP" = clang ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
55
	  ${CONFPATH}configure  \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
56
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
57
	            CC=clang CFLAGS="-g -Wall -Wwrite-strings -O3"
58
59
60
        elif  test "$COMP" = g++ ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
61
	            CC=g++ CFLAGS="-g -std=c++14 -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
62
63
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
64
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
65
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
66
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -Wwrite-strings -pedantic -O3 -march=native -fstack-protector"
67
#                    --with-libxml2=/usr 
68
69
#                    --with-magics=/Users/m214003/local/magics-2.14.9
        fi
70
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
71
    hama*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
72
73
74
75
76
#        CDOLIBS="--with-fftw3 \
#                 --with-netcdf=/opt/local \
#                 --with-hdf5=/opt/local \
#                 --with-szlib=$HOME/local \
#                 --with-proj=/opt/local \
77
#                 --with-cmor=/Users/m214003/work/CMOR \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
78
#                 --with-curl=/opt/local"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
79
80
        CDOLIBS="--enable-nearpt3 \
                 --with-fftw3 \
81
                 --with-grib_api=$HOME/local/gribapi-1.13.0 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
82
                 --with-netcdf=$HOME/local \
83
                 --with-hdf5=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
84
85
                 --with-libxml2=/usr \
                 --with-magics=$HOME/local/magics-2.25.3 \
86
                 --with-proj=/opt/local"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
87

88
89
        if  test "$COMP" = icc ; then
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
91
	            CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native" CXX=icpc
92
        elif  test "$COMP" = icpc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
93
	  ${CONFPATH}configure --enable-cxx \
94
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
95
	            CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
96
        elif  test "$COMP" = clang++ ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
97
	  ${CONFPATH}configure --enable-cxx \
98
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
99
	            CC=clang CXX=clang++ CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
100
101
102
        elif  test "$COMP" = clang ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
103
	            CC=clang CFLAGS="-g -Wall -Wwrite-strings -Ofast -march=native"
104
        elif  test "$COMP" = g++ ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
105
	  ${CONFPATH}configure --enable-cxx \
106
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
107
	            CC=gcc CXX=g++ CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3"
108
109
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
110
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
111
                    $CDOLIBS \
112
	            CC=gcc CFLAGS="-g -std=c11 -pipe -Wall -Wwrite-strings -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
113
114
#                    --with-libxml2=/usr \
#                    --with-magics=/Users/m214003/local/Magics-2.18.14nio \
115
        fi
Uwe Schulzweida's avatar
Uwe Schulzweida committed
116
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
117
118
    daint*)
        if  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
119
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/INTEL/14.0"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
120
121
122
123
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native -openmp"
        elif  test "$COMP" = pgcc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
124
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/PGI/15.3"
125
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
126
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
127
	            CC=pgcc CFLAGS="-g -O2"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
128
        elif  test "$COMP" = cray ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
129
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/CRAY/8.3"
130
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
131
                    $CDOLIBS \
132
	            CC=cc CFLAGS="-g -O2 -h noomp"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
133
        else
Uwe Schulzweida's avatar
Uwe Schulzweida committed
134
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/GNU/4.9"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
135
136
137
138
139
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
        fi
	;;
140
141
# x86_64-squeeze-x64-linux
    thunder*)
142
143
144
145
146
147
        CDOLIBS="--with-grib_api=/sw/squeeze-x64/grib_api-1.13.0-static-gccsys \
                 --with-netcdf=/sw/squeeze-x64/netcdf-4.2-static \
                 --with-hdf5=/sw/squeeze-x64/hdf5-1.8.8-static \
                 --with-szlib=/sw/squeeze-x64/szip-2.1 \
                 --with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
                 --with-proj=/sw/squeeze-x64/proj-4.7.0"
148
149
150

        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
151
                    --with-fftw3 \
152
                    $CDOLIBS \
153
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
154
155
156
157
        elif  test "$COMP" = pgcc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
158
159
	else
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
160
                    --with-fftw3 \
161
                    $CDOLIBS \
162
                    CC=gcc CFLAGS='-g -Wall -O3'
163
	fi
164
	;;
165
166
167
# mistral
    mlogin*)
        CDOLIBS="--with-grib_api=/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 \
168
169
                 --with-netcdf=/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 \
                 --with-hdf5=/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 \
170
                 --with-szlib=/sw/rhel6-x64/sys/szip-2.1-gcc48 \
171
172
                 --with-udunits2=/sw/rhel6-x64/util/udunits-2.2.17-gcc48 \
                 --with-proj=/sw/rhel6-x64/graphics/proj4-4.9.1-gcc48"
173

174
        if  test "$COMP" = icc ; then
175
          ${CONFPATH}configure --prefix=$HOME/local \
176
177
178
179
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
        elif  test "$COMP" = pgcc ; then
180
          ${CONFPATH}configure --disable-openmp \
181
182
183
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
	else
184
          ${CONFPATH}configure --prefix=$HOME/local \
185
186
187
188
189
                    --with-fftw3 \
                    $CDOLIBS \
                    CC=gcc CFLAGS='-g -Wall -O3 -march=native'
	fi
	;;
190
# x86_64-unknown-linux-gnu
191
    btc*)
192
193
        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local \
194
195
196
                    --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 \
197
                    --with-fftw3 \
198
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -xCORE-AVX2"
199
200
	else
          ${CONFPATH}configure --prefix=$HOME/local \
201
202
203
                    --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 \
204
205
206
                    --with-fftw3 \
                    CC=gcc CFLAGS='-g -Wall -O3 -march=native'
	fi
207
	;;
208
209
210
211
212
213
214
215
216
217
218
219
# 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"
	;;
220
# x86_64-archlinux
Ralf Mueller's avatar
Ralf Mueller committed
221
    luthien*)
222
223
 	${CONFPATH}configure --prefix=$HOME/local \
                    --program-suffix=-dev \
224
                    --enable-maintainer-mode \
Ralf Mueller's avatar
Ralf Mueller committed
225
226
227
228
	            --with-netcdf \
	              --with-hdf5 \
                     --with-szlib \
                  --with-grib_api \
Ralf Mueller's avatar
Ralf Mueller committed
229
230
                  --with-udunits2 \
                  --with-proj \
231
                      --with-pic \
Ralf Mueller's avatar
Ralf Mueller committed
232
                      CC=gcc CFLAGS="-g -Wall -O2 -DWITH_DATA" LIBS=-lopenjpeg
233
	;;
234
235
236
237
238
239
240
241
242
243
# standard workstations at MPI-M x86_64-lenny
    mpipc* )
	${CONFPATH}configure \
               --prefix=`pwd`/build \
               --enable-maintainer-mode \
               --with-netcdf='/sw/lenny-x64/netcdf-latest-gccsys' \
               --with-hdf5='/sw/lenny-x64/hdf5-latest' \
               --with-szlib='/sw/lenny-x64/szip-latest' \
               --with-proj='/sw/lenny-x64/proj-latest' \
               --enable-ruby --enable-swig --enable-python \
244
	           CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
245
        ;;
246
# dap enabled
247
    egmont | columbine)
248
249
250
251
 	  ${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 \
                    --with-zlib=/sw/etch-ia32/zlib-1.2.3 \
252
                    --with-szlib=/sw/etch-ia32/szip-2.1 \
253
                    --withroj=/sw/etch-ia32/proj-4.6.0 \
254
	            --enable-all-static CC=icc CFLAGS="-g -fast -openmp" AR=xiar LD=xild
255
#	            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
256
    ;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
257
# i386-pc-solaris2.10
Uwe Schulzweida's avatar
Uwe Schulzweida committed
258
    grim | mil* )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
259
	${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
260
                    --with-netcdf=/client \
261
                    --with-szlib=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
262
263
264
265
                    CC=cc CFLAGS="-g -mt -fast"
	;;
# sx6-nec-superux12.2
    cs*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
266
	${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
267
         	    --with-netcdf=/pool/netcdf/netcdf-3.6.0-p1 \
268
		    CC=cc \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
269
270
271
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
    sx6)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
272
	${CONFPATH}configure --host=sx6 --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
273
                    --with-netcdf=/pool/SX-6/netcdf/netcdf-3.6.0-p1 \
274
		    CC=sxcc AR=sxar \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
275
276
277
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
    es)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
278
	${CONFPATH}configure --host=sx6 --prefix=$HOME/local/ES \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
279
                    --with-netcdf=/S/n010/home010/c0148/local/SX \
280
		    CC=escc AR=esar \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
281
282
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
283
# x86_64-unknown-linux-gnu (rhel55)
284
    wizard*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
285
        LDFLAGS="-lpng"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
286
        export LDFLAGS
287
	${CONFPATH}configure --prefix=$HOME/local/centos58-x64 \
288
289
290
                    --with-proj=/sw/centos58-x64/proj-4.7.0 \
                    --with-hdf5=/sw/centos58-x64/hdf5-1.8.10-patch1 \
                    --with-udunits2=/sw/centos58-x64/udunits-2.1.19 \
291
                    --with-grib_api=/sw/centos58-x64/grib_api-1.12.3 \
292
293
                    --with-netcdf=/sw/centos58-x64/netcdf-4.2.1.1 \
                    --with-szlib=/sw/centos58-x64/szip-2.1 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
294
                    --with-zlib=/usr \
295
	            CC=gcc CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
296
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
297
# powerpc-ibm-aix5.3.0.0
Uwe Schulzweida's avatar
Uwe Schulzweida committed
298
299
    blizzard*)
	${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
300
301
302
                    --with-netcdf=/sw/aix61/netcdf-4.2-threadsafe \
                    --with-hdf5=/sw/aix61/hdf5-1.8.8-threadsafe \
                    --with-szlib=/sw/aix61/szip-2.1-threadsafe \
303
                    --with-udunits2=/sw/aix61/udunits-2.1.14 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
304
                    --with-proj=/sw/aix53/proj-4.6.1 \
305
                    --with-curl=/sw/aix61/curl-7.21.3 \
306
                    AR="ar -X 64"  LDFLAGS="-brtl -R/sw/aix61/openssl-1.0.0d/lib:/sw/aix61/zlib-1.2.6/lib" \
307
 	            CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
308
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
309
# powerpc-ibm-aix6.0.0.0
310
    c1a*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
311
	${CONFPATH}configure --prefix=$HOME/local \
312
313
314
                    --with-netcdf=/usr/local/apps/netcdf/3.6.3/LP64 \
                    --with-hdf5=/usr/local/apps/hdf5/1.8.1/LP64 \
                    --with-szlib=/usr/local/apps/szip/2.1/LP64 \
315
                    AR="ar -X 64"  LDFLAGS="-brtl" \
316
	            CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
317
318
319
320
	;;
    *)
	echo "configuration for hostname $HOSTNAME not found!"
	;;
321
322
323
324
325
326
327
328
# 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'
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
329
esac