Created
February 18, 2020 16:06
-
-
Save LouisJenkinsCS/5e1919fd3b05bd13ff56e9a02f829a3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
{ | |
rm -rf Atlas | |
wget https://github.com/HewlettPackard/Atlas/archive/master.tar.gz | |
if [ $? -ne 0 ]; then | |
echo 'Unable to download Atlas' | |
exit 1 | |
fi | |
tar -xzvf master.tar.gz | |
if [ $? -ne 0 ]; then | |
echo 'Unable to extract the archive' | |
exit 1 | |
fi | |
rm -f master.tar.gz | |
mv Atlas-master Atlas | |
cd Atlas | |
# Requires Atlas 3.9 | |
export PATH="/usr/lib/llvm-3.9/bin/:$PATH" | |
#build compiler | |
cd compiler-plugin | |
if [ ! -d "build-all" ]; then | |
./build_plugin | |
fi | |
#set wrapper flags | |
#export CFLAGS="-Wl,-wrap,pthread_mutex_lock" | |
#export CFLAGS="$CFLAGS -Wl,-wrap,pthread_mutex_trylock" | |
#export CFLAGS="$CFLAGS -Wl,-wrap,pthread_mutex_unlock" | |
#export CFLAGS="$CFLAGS -Wl,-wrap,pthread_create" | |
#export CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" | |
#build runtime | |
cd .. | |
cd runtime | |
sed -i 's:-O3:-O3 -fPIC -D_DISABLE_HELPER:g' CMakeLists.txt | |
echo 'add_library (atlas-shared SHARED $<TARGET_OBJECTS:Cache_flush> $<TARGET_OBJECTS:Consistency> $<TARGET_OBJECTS:Logger> $<TARGET_OBJECTS:Util> $<TARGET_OBJECTS:Pregion_mgr> $<TARGET_OBJECTS:Pmalloc>) #defaults to static build' >> CMakeLists.txt | |
sed -i 's:/dev/shm/:/mnt/ram/:g' src/util/util.cpp | |
sed -i 's:kPRegionSize_ = 4:kPRegionSize_ = 18:g' src/internal_includes/pregion_configs.hpp | |
sed -i 's:kNumArenas_ = 64:kNumArenas_ = 8:g' src/internal_includes/pregion_configs.hpp | |
#sed -i 's:kHashTableSize = 1 << 10:kHashTableSize = (uint64_t)1 << 16:g' src/internal_includes/log_configs.hpp | |
sed -i -e '582d;593,594d;596d' src/pregion_mgr/pregion_mgr.cpp | |
if [ -d "build-all" ]; | |
then | |
rm -r build-all | |
fi | |
mkdir build-all | |
cd build-all | |
cmake .. | |
make -j8 | |
if [ $? -ne 0 ]; then | |
echo 'Unable to make Atlas' | |
exit 1 | |
fi | |
#run quick tests | |
cd tests | |
./run_quick_test | |
#copy NVM-hooks to the compiler directory | |
cd ../../../.. | |
if [ ! -f "Atlas/compiler-plugin/plugin_build/NvmHooks.so" ]; then | |
cp ../build/lib/NvmHooks.so Atlas/compiler-plugin/plugin_build | |
fi | |
} | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get install -y wget | |
apt-get install -y xz-utils | |
apt-get install -y cmake | |
apt-get install -y build-essential | |
apt-get install -y python | |
wget https://bootstrap.pypa.io/get-pip.py | |
python get-pip.py | |
pip install pandas | |
apt-get install -y autoconf autogen | |
apt-get install -y numactl | |
apt-get install -y libevent-dev | |
apt-get install -y libjemalloc-dev | |
apt-get install -y llvm clang-3.9 # Atlas | |
apt-get install -y ruby # Atlas | |
apt-get install -y libboost-graph-dev # Atlas | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment