-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·79 lines (66 loc) · 1.81 KB
/
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
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
#!/bin/bash
set -e
if [[ $(grep docker /proc/1/cgroup) == "" ]]; then
echo "Must run this script in the repo's docker container!"
echo "Please: 1) install the docker container system,"
echo " 2) install our docker image by running './build_docker.sh',"
echo " 3) start the docker container by running './start_docker.sh'"
exit
fi
BASE_DIR=$(pwd)
rm -f setup.log
function msg() {
echo "$msg" | tee -a setup.log
}
msg "Begin PORRidge setup at $(date)"
: ${BINUTILS_PLUGIN_DIR:="/usr/include"}
if [[ ($BINUTILS_PLUGIN_DIR != "") &&
(-e $BINUTILS_PLUGIN_DIR/plugin-api.h) ]]; then
export LTO=1
else
export LTO=0
echo "Warning: no binutils plugin found, necessary for LTO"
fi
# Setup and compile our compiler
./build-llvm-linux.sh
msg "Modified clang compiled."
#git submodule update --init ./SuperMalloc
git clone https://github.com/kuszmaul/SuperMalloc.git
cd SuperMalloc
git reset --hard 709663fb
cd -
cd ./SuperMalloc/release
make
cd -
# # Build the runtime (ability to suspend/resume deques)
cd ./cilk-l
libtoolize
autoreconf -i
./remake.sh opt lto
cd -
msg "Suspendable work-stealing runtime built"
BASE_DIR=$(pwd)
if [ ! -e config.mk ]; then
echo "BUILD_DIR=$BASE_DIR/build" >> config.mk
echo "RUNTIME_HOME=$BASE_DIR/cilk-l" >> config.mk
echo "COMPILER_HOME=$BASE_DIR/llvm-cilk" >> config.mk
echo "RTS_LIB=\$(COMPILER_HOME)/lib/libcilkrts.a" >> config.mk
echo "LTO=$LTO" >> config.mk
fi
#cd ferret
#wget www.cse.wustl.edu/~utterbackr/ferret-data.tar.gz
#tar -vxzf ferret-data.tar.gz data
#rm ferret-data.tar.gz
# Now build all of the benchmarks (starting with ferret)
#cd src/
#make piper
#make cilk-future
#make serial
#cd ../../future-bench
#make all
#cd ../futurerd-bench/basic
#make all
#cd ../heartWallTracking/cilk-futures
#make all
#cd ../../bintree
#make all