-
Notifications
You must be signed in to change notification settings - Fork 16
/
compile.sh
511 lines (445 loc) · 16.2 KB
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
#!/bin/bash
# This is a script for downloading, compiling and
# installing ERKALE with all of its prerequisite libraries and CMake.
# 2020-03-16 Susi Lehtola
# Set this to the number of cores +1
nprocs=9
# Archiver
export AR="ar"
# C compiler
export CC="gcc"
# C++ compiler
export CXX="g++"
# Fortran compiler
export F77="gfortran"
export FC="${F77}"
# C preprosessor
export CPP="${CC} -E"
# Fortran preprocessor
export FCCPP="${FC} -E"
# C flags to use. For older compilers you may need to specify the architecture
# by hand.
export CFLAGS="-Wall -g -O2 -fPIC"
# C++ flags to use
export CXXFLAGS="${CFLAGS}"
# Fortran flags to use
export FFLAGS="${CFLAGS}"
export FCFLAGS="${CFLAGS}"
### If not using system LAPACK/BLAS, libraries to link OpenMP OpenBLAS with
OMPLIBS="-fopenmp"
### If not using system LAPACK/BLAS, the OpenMP version of OpenBLAS
### needs to be compiled with -frecursive to make it thread safe.
FRECURSIVE="-frecursive"
### System LAPACK (+ BLAS) library to use.
## OpenBLAS
LAPACKOMP="-lopenblaso"
LAPACKSER="-lopenblas"
# MKL (with Intel compiler)
#LAPACKOMP="-mkl=parallel"
#LAPACKSER="-mkl=sequential"
## ATLAS, newer versions of Fedora / RHEL
#LAPACKOMP="-L/usr/lib64/atlas -lsatlas"
#LAPACKSER="-L/usr/lib64/atlas -lsatlas"
## ATLAS, older versions of Fedora / RHEL
#LAPACKOMP="-L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas"
#LAPACKSER="-L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas"
## Generic lapack and blas. Don't use these unless there is nothing
## else available (e.g. on Cygwin)
# LAPACKOMP="-llapack -lblas -lgfortran"
# LAPACKSER="-llapack -lblas -lgfortran"
# Use system packages?
system_cmake=0
system_gsl=0
system_libxc=0
system_libint=0
system_hdf5=0
system_blas=0
# Maximum supported angular momentum (affects libint if it's compiled)
MAXAM="6"
# Maximum optimized angular momentum (affects libint if it's
# compiled). If this is very large, libint compilation will take ages
# and the resulting libraries will be HUGE.
OPTAM="4"
# Maximum angular momentum for first ERI derivatives (affects libint
# if it's compiled)
MAXDERIV="5"
# Running on cygwin?
if [[ "$CYGWIN" != "" ]]; then
# Silence cmake warnings about changed behavior
export CMAKE_LEGACY_CYGWIN_WIN32=0
fi
# Current versions of libraries, if they are to be compiled
# GSL
export GSLVER="2.6"
## LibXC
#export XCVER="4.0.3"
# Use newest git snapshot
export XCVER="git"
# libint 1.1.6
export INTVER="0e0ffa7887e74e6ab1fb07c89be55f776c733731"
#export ARMAVER="9.200.6"
export ARMAVER="git"
export CMAKEVER="3.16.5"
# HDF5 version: MAJOR.MINOR
export HDF5MAJOR="1.12"
export HDF5MINOR="0"
# Version of OpenBLAS
export OPENBLASVER="0.3.9"
# You may need to disable AVX flags for OpenBLAS with older compilers
#export OPENBLASAVX="NO_AVX=1 NO_AVX2=1" # For very old
#export OPENBLASAVX="NO_AVX2=1" # For a little less old
############### NO CHANGES NECESSARY HEREAFTER ##################
# Current dir is
topdir="`pwd`"
srcdir=${topdir}/sources
if [ ! -d ${srcdir} ]; then
mkdir -p ${srcdir}
fi
builddir=${topdir}/build
if [ ! -d ${builddir} ]; then
mkdir -p ${builddir}
fi
# GSL
if(( ! ${system_gsl} )); then
if [ ! -f ${topdir}/gsl/lib/libgsl.a ]; then
echo -n "Compiling GSL ..."
if [ ! -d ${builddir}/gsl-${GSLVER} ]; then
if [ ! -f ${srcdir}/gsl-${GSLVER}.tar.gz ]; then
cd ${srcdir}
wget -O gsl-${GSLVER}.tar.gz ftp://ftp.gnu.org/gnu/gsl/gsl-${GSLVER}.tar.gz
fi
cd ${builddir}
tar zxf ${srcdir}/gsl-${GSLVER}.tar.gz
fi
cd ${builddir}/gsl-${GSLVER}/
./configure --enable-static --disable-shared --prefix=${topdir}/gsl --exec-prefix=${topdir}/gsl &>configure.log
make -j ${nprocs} &> make.log
make install &> install.log
make clean &> clean.log
echo " done"
fi
if [ ! -f ${topdir}/gsl/lib/libgsl.a ]; then
echo "Error compiling GSL."
[ "$PS1" ] && return || exit
fi
fi
# HDF5
if(( ! ${system_hdf5} )); then
if [ ! -f ${topdir}/hdf5/lib/libhdf5.a ]; then
echo -n "Compiling HDF5 ..."
HDF5VER="${HDF5MAJOR}.${HDF5MINOR}"
if [ ! -d ${builddir}/hdf5-${HDF5VER} ]; then
if [ ! -f ${srcdir}/hdf5-${HDF5VER}.tar.gz ]; then
cd ${srcdir}
wget -O hdf5-${HDF5VER}.tar.gz http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5MAJOR}/hdf5-${HDF5VER}/src/hdf5-${HDF5VER}.tar.gz
fi
cd ${builddir}
tar zxf ${srcdir}/hdf5-${HDF5VER}.tar.gz
fi
cd ${builddir}/hdf5-${HDF5VER}/
./configure --enable-static --disable-shared --prefix=${topdir}/hdf5 --exec-prefix=${topdir}/hdf5 --disable-hl --disable-fortran &>configure.log
make -j ${nprocs} VERBOSE=1 &> make.log
make install &> install.log
make clean &> clean.log
echo " done"
fi
if [ ! -f ${topdir}/hdf5/lib/libhdf5.a ]; then
echo "Error compiling HDF5."
[ "$PS1" ] && return || exit
fi
fi
# libXC
if(( ! ${system_libxc} )); then
if [[ "$XCVER" == "git" ]]; then
echo -n "Checking out and compiling libxc ..."
cd $builddir
if [[ ! -d libxc ]]; then
git clone https://gitlab.com/libxc/libxc.git libxc
else
cd libxc
git pull
cd ..
fi
cd libxc
if [[ ! -f configure ]]; then
autoreconf -i
fi
./configure --enable-static --disable-shared --disable-fortran --prefix=${topdir}/libxc --exec-prefix=${topdir}/libxc &>configure.log
make -j ${nprocs} &> make.log
make install &> install.log
make clean &> clean.log
echo " done"
else
if [ ! -f ${topdir}/libxc/lib/libxc.a ]; then
echo -n "Compiling libxc ..."
if [ ! -d ${builddir}/libxc-${XCVER} ]; then
if [ ! -f ${srcdir}/libxc-${XCVER}.tar.gz ]; then
cd ${srcdir}
wget -O libxc-${XCVER}.tar.gz "http://www.tddft.org/programs/octopus/down.php?file=libxc/${XCVER}/libxc-${XCVER}.tar.gz"
fi
cd ${builddir}
tar zxf ${srcdir}/libxc-${XCVER}.tar.gz
fi
cd ${builddir}/libxc-${XCVER}
./configure --enable-static --disable-shared --disable-fortran --prefix=${topdir}/libxc --exec-prefix=${topdir}/libxc &>configure.log
make -j ${nprocs} &> make.log
make install &> install.log
make clean &> clean.log
echo " done"
fi
fi
if [ ! -f ${topdir}/libxc/lib/libxc.a ]; then
echo "Error compiling libxc."
[ "$PS1" ] && return || exit
fi
fi
# libint
if(( ! ${system_libint} )); then
if [[ ! -f ${topdir}/libint/lib/libint.a || ! -f ${topdir}/libint/lib/libderiv.a ]]; then
echo -n "Compiling libint ..."
if [ ! -d ${builddir}/libint-${INTVER} ]; then
if [ ! -f ${srcdir}/libint-${INTVER}.tar.gz ]; then
cd ${srcdir}
wget -O libint-${INTVER}.tar.gz "https://github.com/evaleev/libint/archive/${INTVER}/libint-${INTVER}.tar.gz"
fi
cd ${builddir}
tar zxf ${srcdir}/libint-${INTVER}.tar.gz
fi
cd ${builddir}/libint-${INTVER}
# Use more conservative optimization flags, since libint is already highly optimized.
export ICFLAGS=`echo ${CFLAGS} |sed 's|-O2|-O1|g'`
export ICXXFLAGS=`echo ${CXXFLAGS} |sed 's|-O2|-O1|g'`
aclocal -I lib/autoconf
autoconf
./configure --enable-static --disable-shared \
--prefix=${topdir}/libint --exec-prefix=${topdir}/libint \
--with-libint-max-am=${MAXAM} --with-libint-opt-am=${OPTAM} \
--with-libderiv-max-am1=${MAXDERIV} --disable-r12 \
--with-cc="${CC}" --with-cxx="${CXX}" --with-ar=${AR} \
--with-cc-optflags="${ICFLAGS}" \
--with-cxx-optflags="${ICXXFLAGS}" &>configure.log
if [[ "$cygwin" != "" ]]; then
# Grow stack size
sed -i 's| -lm | -Wl,--stack,8388608 -lm|' src/bin/MakeVars
fi
make -j ${nprocs} &> make.log
make install &> install.log
make clean &> clean.log
echo " done"
fi
if [[ ! -f ${topdir}/libint/lib/libint.a || ! -f ${topdir}/libint/lib/libderiv.a ]]; then
echo "Error compiling libint."
[ "$PS1" ] && return || exit
fi
fi
# OpenBLAS
if(( ! ${system_blas} )); then
if [ ! -d ${builddir}/OpenBLAS-${OPENBLASVER} ]; then
if [ ! -f ${srcdir}/OpenBLAS-${OPENBLASVER}.tar.gz ]; then
cd ${srcdir}
wget -O OpenBLAS-${OPENBLASVER}.tar.gz https://github.com/xianyi/OpenBLAS/archive/v${OPENBLASVER}.tar.gz
fi
cd ${builddir}
tar zxf ${srcdir}/OpenBLAS-${OPENBLASVER}.tar.gz
fi
cd ${builddir}
# Sequential binaries
if [[ ! -d OpenBLAS-${OPENBLASVER}-seq ]]; then
cp -pr OpenBLAS-${OPENBLASVER} OpenBLAS-${OPENBLASVER}-seq
fi
if [[ ! -d OpenBLAS-${OPENBLASVER}-omp ]]; then
cp -pr OpenBLAS-${OPENBLASVER} OpenBLAS-${OPENBLASVER}-omp
fi
if [ ! -f ${topdir}/openblas/lib/libopenblas.a ]; then
echo -n "Compiling openblas, sequential ..."
# Compile library
make -C OpenBLAS-${OPENBLASVER}-seq TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=0 USE_OPENMP=0 FC=$FC CC=$CC COMMON_OPT="$CFLAGS" FCOMMON_OPT="$FFLAGS" NUM_THREADS=128 LIBPREFIX="libopenblas" INTERFACE64=0 ${OPENBLASAVX} NO_SHARED=1 &> OpenBLAS-${OPENBLASVER}-seq/make.log
make -C OpenBLAS-${OPENBLASVER}-seq install NO_SHARED=1 PREFIX=${topdir}/openblas OPENBLAS_LIBRARY_DIR=${topdir}/openblas/lib OPENBLAS_INCLUDE_DIR=${topdir}/openblas/include OPENBLAS_BINARY_DIR=${topdir}/openblas/bin OPENBLAS_CMAKE_DIR=${topdir}/openblas/cmake
echo " done"
fi
if [ ! -f ${topdir}/openblas/lib/libopenblas.a ]; then
echo "Error building sequential OpenBLAS."
[ "$PS1" ] && return || exit
fi
if [ ! -f ${topdir}/openblas/lib/libopenblaso.a ]; then
echo -n "Compiling openblas, parallel ..."
make -C OpenBLAS-${OPENBLASVER}-omp NO_SHARED=1 TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=1 FC=$FC CC=$CC COMMON_OPT="$CFLAGS" FCOMMON_OPT="$FFLAGS $FRECURSIVE" NUM_THREADS=128 LIBPREFIX="libopenblaso" INTERFACE64=0 ${OPENBLASAVX} EXTRALIB="${OMPLIBS}" &> OpenBLAS-${OPENBLASVER}-omp/make.log
make -C OpenBLAS-${OPENBLASVER}-omp install NO_SHARED=1 LIBPREFIX="libopenblaso" PREFIX=${topdir}/openblas OPENBLAS_LIBRARY_DIR=${topdir}/openblas/lib OPENBLAS_INCLUDE_DIR=${topdir}/openblas/include OPENBLAS_BINARY_DIR=${topdir}/openblas/bin OPENBLAS_CMAKE_DIR=${topdir}/openblas/cmake
echo " done"
fi
if [ ! -f ${topdir}/openblas/lib/libopenblaso.a ]; then
echo "Error building parallel OpenBLAS."
[ "$PS1" ] && return || exit
fi
fi
# Armadillo
if [ ! -d ${topdir}/armadillo-${ARMAVER} ]; then
if [[ "$ARMAVER" == "git" ]]; then
echo -n "Checking out Armadillo ..."
cd $topdir
if [[ ! -d armadillo-code ]]; then
git clone https://gitlab.com/conradsnicta/armadillo-code.git
else
cd armadillo-code
git pull
cd ..
fi
# Create unversioned symlink
if [ ! -h armadillo ]; then
ln -sf armadillo-code armadillo
fi
else
if [ ! -f ${srcdir}/armadillo-${ARMAVER}.tar.xz ]; then
cd ${srcdir}
wget -O armadillo-${ARMAVER}.tar.xz http://sourceforge.net/projects/arma/files/armadillo-${ARMAVER}.tar.xz
fi
cd ${topdir}
tar Jxf ${srcdir}/armadillo-${ARMAVER}.tar.xz
# Create unversioned symlink
if [ ! -h armadillo ]; then
ln -sf armadillo-${ARMAVER} armadillo
fi
fi
fi
echo "Done compiling libraries."
if(( ! ${system_cmake} )); then
if [ ! -f ${topdir}/cmake/bin/cmake ]; then
echo -n "Compiling CMake ..."
if [ ! -d ${builddir}/cmake-${CMAKEVER} ]; then
if [ ! -f ${srcdir}/cmake-${CMAKEVER}.tar.gz ]; then
cd ${srcdir}
majorrel=$(echo $CMAKEVER | awk --field-separator=. '{printf("%s.%s",$1,$2)}')
wget -O cmake-${CMAKEVER}.tar.gz http://www.cmake.org/files/v${majorrel}/cmake-${CMAKEVER}.tar.gz
fi
cd ${builddir}
tar zxf ${srcdir}/cmake-${CMAKEVER}.tar.gz
fi
cd ${builddir}/cmake-${CMAKEVER}
./bootstrap --prefix=${topdir}/cmake &> bootstrap.log
make -j ${nprocs} &> make.log
make install &> install.log
echo " done"
fi
cmake="${topdir}/cmake/bin/cmake"
if [ ! -f ${topdir}/cmake/bin/cmake ]; then
echo "Error compiling CMake."
[ "$PS1" ] && return || exit
fi
else
cmake="cmake"
fi
# Check out ERKALE
echo "Checking out source"
cd ${builddir}
# Check for old svn checkout
if [[ -d erkale/.svn ]]; then
echo "A subversion checkout detected. Archiving old data."
if [[ -d erkale.svn ]]; then
echo "Archival directory already exists. Please remove ${builddir}/erkale or ${builddir}/erkale.svn."
[ "$PS1" ] && return || exit
fi
mv erkale erkale.svn
fi
# Check for old git checkout
if [[ -d erkale ]]; then
cd erkale
git pull
cd ..
else
git clone https://github.com/susilehtola/erkale.git erkale
fi
echo "Done"
# Generate version file
cd erkale
svnrev=$(git rev-list --count --first-parent HEAD)
gitversion=$(git log --pretty=format:'%H' -n 1)
gitshort=$(echo $gitversion|awk '{print substr($1,1,8)}')
echo "#ifndef ERKALE_VERSION" > src/version.h
echo "#define SVNREVISION \"$svnrev\"" >> src/version.h
echo "#define GITVERSION \"$gitversion\"" >> src/version.h
echo "#define GITSHORT \"$gitshort\"" >> src/version.h
echo "#endif" >> src/version.h
cd ..
### Create config files
# Armadillo
echo "set(ARMADILLO_FOUND 1)" > erkale/cmake/FindArmadillo.cmake
echo "set(ARMADILLO_INCLUDE_DIRS \"${topdir}/armadillo/include\")" >> erkale/cmake/FindArmadillo.cmake
# GSL
echo "set(GSL_FOUND 1)" > erkale/cmake/FindGSL.cmake
if(( ${system_gsl} )); then
echo "set(GSL_INCLUDE_DIRS \"/usr/include\")" >> erkale/cmake/FindGSL.cmake
echo "set(GSL_LIBRARY_DIRS \"/usr/lib64\")" >> erkale/cmake/FindGSL.cmake
echo "set(GSL_LIBRARIES -lgsl)" >> erkale/cmake/FindGSL.cmake
else
echo "set(GSL_INCLUDE_DIRS \"${topdir}/gsl/include\")" >> erkale/cmake/FindGSL.cmake
echo "set(GSL_LIBRARY_DIRS \"${topdir}/gsl/lib\")" >> erkale/cmake/FindGSL.cmake
echo "set(GSL_LIBRARIES ${topdir}/gsl/lib/libgsl.a)" >> erkale/cmake/FindGSL.cmake
fi
# libxc
echo "set(LIBXC_FOUND 1)" > erkale/cmake/Findlibxc.cmake
if(( ${system_libxc} )); then
echo "set(LIBXC_INCLUDE_DIRS \"/usr/include\")" >> erkale/cmake/Findlibxc.cmake
echo "set(LIBXC_LIBRARY_DIRS \"/usr/lib64\")" >> erkale/cmake/Findlibxc.cmake
echo "set(LIBXC_LIBRARIES -lxc)" >> erkale/cmake/Findlibxc.cmake
else
echo "set(LIBXC_INCLUDE_DIRS \"${topdir}/libxc/include\")" >> erkale/cmake/Findlibxc.cmake
echo "set(LIBXC_LIBRARY_DIRS \"${topdir}/libxc/lib\")" >> erkale/cmake/Findlibxc.cmake
echo "set(LIBXC_LIBRARIES ${topdir}/libxc/lib/libxc.a)" >> erkale/cmake/Findlibxc.cmake
fi
# HDF5
echo "set(HDF5_FOUND 1)" > erkale/cmake/FindHDF5.cmake
if(( ${system_hdf5} )); then
echo "set(HDF5_INCLUDE_DIRS \"/usr/include\")" >> erkale/cmake/FindHDF5.cmake
echo "set(HDF5_LIBRARY_DIRS \"/usr/lib64\")" >> erkale/cmake/FindHDF5.cmake
echo "set(HDF5_LIBRARIES -lhdf5 -ldl -lz)" >> erkale/cmake/FindHDF5.cmake
else
echo "set(HDF5_INCLUDE_DIRS \"${topdir}/hdf5/include\")" >> erkale/cmake/FindHDF5.cmake
echo "set(HDF5_LIBRARY_DIRS \"${topdir}/hdf5/lib\")" >> erkale/cmake/FindHDF5.cmake
echo "set(HDF5_LIBRARIES ${topdir}/hdf5/lib/libhdf5.a -ldl -lz)" >> erkale/cmake/FindHDF5.cmake
fi
# Libint
echo "set(LIBINT_FOUND 1)" > erkale/config/libintConfig.cmake
if(( ${system_libint} )); then
echo "set(LIBINT_INCLUDE_DIRS \"/usr/include\")" >> erkale/config/libintConfig.cmake
echo "set(LIBINT_LIBRARIES -lderiv -lint)" >> erkale/config/libintConfig.cmake
else
echo "set(LIBINT_INCLUDE_DIRS \"${topdir}/libint/include\")" >> erkale/config/libintConfig.cmake
#echo "set(LIBINT_LIBRARY_DIRS \"${topdir}/libint/lib\")" >> erkale/config/libintConfig.cmake
echo "set(LIBINT_LIBRARIES ${topdir}/libint/lib/libderiv.a ${topdir}/libint/lib/libint.a)" >> erkale/config/libintConfig.cmake
fi
# BLAS
if(( ! ${system_blas} )); then
LAPACKSER="-L${topdir}/openblas/lib/ -lopenblas -lgfortran"
LAPACKOMP="-L${topdir}/openblas/lib/ -lopenblaso -lgfortran"
fi
## Build erkale
cd ${builddir}/erkale
export PKG_CONFIG_PATH=${topdir}/libxc/lib/pkgconfig/:${topdir}/gsl/lib/pkgconfig/:${PKG_CONFIG_PATH}
if [ ! -d openmp ]; then
mkdir openmp
fi
cd openmp
FC="${FC}" CC="${CC}" CXX="${CXX}" \
FCFLAGS="${FCFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
${cmake} .. \
-DSVN_VERSION=ON -DUSE_OPENMP=ON \
-DLAPACK_LIBRARIES="${LAPACKOMP}" \
-DBLAS_LIBRARIES="${LAPACKOMP}" \
-DCMAKE_INSTALL_PREFIX=${topdir}/erkale
make -j ${nprocs} VERBOSE=1
make install
cd ..
if [ ! -d serial ]; then
mkdir serial
fi
cd serial
FC="${FC}" CC="${CC}" CXX="${CXX}" \
FCFLAGS="${FCFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
${cmake} .. \
-DSVN_VERSION=ON -DUSE_OPENMP=OFF \
-DLAPACK_LIBRARIES="${LAPACKSER}" \
-DBLAS_LIBRARIES="${LAPACKSER}" \
-DCMAKE_INSTALL_PREFIX=${topdir}/erkale
make -j ${nprocs} VERBOSE=1
make install
cd ..