default 12.4 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 -Drestrict= -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 -Drestrict="
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
61
        elif  test "$COMP" = g++ ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
	            CC=g++ CFLAGS="-g -std=c++14 -Drestrict= -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
84
                 --with-hdf5=$HOME/local \
                 --with-proj=/opt/local"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
85

86
87
        if  test "$COMP" = icc ; then
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
88
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
89
	            CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native" CXX=icpc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90
91
92
        elif  test "$COMP" = clang ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
93
	            CC=clang CFLAGS="-g -Wall -Wwrite-strings -Ofast -march=native"
94
95
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
96
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
97
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
98
	            CC=gcc CFLAGS="-g -pipe -Wall -Wwrite-strings -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
99
100
#                    --with-libxml2=/usr \
#                    --with-magics=/Users/m214003/local/Magics-2.18.14nio \
101
        fi
Uwe Schulzweida's avatar
Uwe Schulzweida committed
102
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
103
104
    daint*)
        if  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
105
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/INTEL/14.0"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
106
107
108
109
	  ${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
110
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/PGI/15.3"
111
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
112
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
113
	            CC=pgcc CFLAGS="-g -O2"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
114
        elif  test "$COMP" = cray ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
115
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/CRAY/8.3"
116
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
117
                    $CDOLIBS \
118
	            CC=cc CFLAGS="-g -O2 -h noomp"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
119
        else
Uwe Schulzweida's avatar
Uwe Schulzweida committed
120
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/GNU/4.9"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
121
122
123
124
125
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
        fi
	;;
126
127
# x86_64-squeeze-x64-linux
    thunder*)
128
129
130
131
132
133
        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"
134
135
136

        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
137
                    --with-fftw3 \
138
                    $CDOLIBS \
139
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
140
141
142
143
        elif  test "$COMP" = pgcc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
144
145
	else
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
146
                    --with-fftw3 \
147
                    $CDOLIBS \
148
                    CC=gcc CFLAGS='-g -Wall -O3'
149
	fi
150
	;;
151
152
153
154
# mistral
    mlogin*)
        CDOLIBS="--with-grib_api=/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 \
                    --with-netcdf=/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 \
155
156
                    --with-hdf5=/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48"

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