-
Notifications
You must be signed in to change notification settings - Fork 2
/
Setup.sh
executable file
·39 lines (32 loc) · 904 Bytes
/
Setup.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
set -e
#Get nlopt
wget http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz
tar -xvzf nlopt-2.4.2.tar.gz
NLOPT_PREFIX=$HOME/feedback-kde/nlopt-2.4.2
#Compile and install nlopt
cd nlopt-2.4.2
patch -p1 < ../nlopt-patch.diff
./configure --prefix=$NLOPT_PREFIX
make clean
make -j 8
make install
cd ..
export CPPFLAGS="-I$NLOPT_PREFIX/include"
export LDFLAGS="-L$NLOPT_PREFIX/lib/"
#Compile and install postgres
mkdir -p pgsql
./configure -with-opencl --prefix=$HOME/feedback-kde/pgsql
make clean
make -j 8
make install
PGBIN=$HOME/feedback-kde/pgsql/bin
#Setup
$PGBIN/initdb ./experiments
$PGBIN/pg_ctl -D ./experiments -l logfile start
sleep 3
$PGBIN/dropdb --if-exists experiments
$PGBIN/createdb experiments
cp ./analysis/conf.sh.template ./analysis/conf.sh
bash ./analysis/static/datasets/prepare.sh
bash ./analysis/static/timing/prepare_experiment.sh
$PGBIN/pg_ctl -D ./experiments -l logfile stop