Skip to content

Commit

Permalink
update setup script to download benchmark and link Qsim state files a…
Browse files Browse the repository at this point in the history
…utomatically
  • Loading branch information
sixshotx committed Apr 15, 2016
1 parent 42a7f19 commit 241bc28
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Run this script to set up the qsim environment for the first time.
# You can read the following steps to see what each is doing.
Expand All @@ -21,7 +21,7 @@ if [ -z "$QSIM_PREFIX" ]; then
fi

# install manifold-dep packages
echo "Installing dependencies..."
echo "Installing dependencies ..."
echo "sudo apt-get -y install build-essentail libconfig++-dev openmpi-bin openmpi-common libopenmpi-dev"
sudo apt-get -y install build-essential libconfig++-dev openmpi-bin openmpi-common libopenmpi-dev

Expand All @@ -30,11 +30,35 @@ echo "Building manifold components ..."
./configure QSIMINC=${QSIM_PREFIX}/include
make -j4

echo "Downloading the benchmark ..."
cd ${MANIFOLD_DIR}/simulator/smp
mkdir -p benchmark
cd benchmark
wget -c "https://www.dropbox.com/s/8551vnwhzqt9fk6/graphbig_x64.tar.gz?dl=0" -O graphbig_x64.tgz
wget -c "https://www.dropbox.com/s/rpxgwhyr41m2oa0/graphbig_a64.tar.gz?dl=0" -O graphbig_a64.tgz
wget -c "https://www.dropbox.com/s/jslv1g1v77ndq8m/splash-2.tar.gz?dl=0" -O splash_x86.tgz
echo "Uncompressing the benchmark ..."
tar -xzvf graphbig_a64.tgz
tar -xzvf graphbig_x64.tgz
tar -xzvf splash_x86.tgz
cd ..

if [ ! -f $QSIM_PREFIX/state.64 ]; then
echo "QSim state files are not found in $QSIM_PREFIX"
echo "Please run ${bold}mkstate.sh${normal} in $QSIM_PREFIX"
exit 1
else
echo "Linking QSim state files to manifold directory smp/state ..."
ln -s $QSIM_PREFIX state
fi

echo "Building simulator ..."
cd ${MANIFOLD_DIR}/simulator/smp/QsimProxy
cd QsimProxy
make -j4


if [ $? -eq "0" ]; then
echo "\n${bold}Manifold built successfully!${normal}"
echo "\n${bold}Manifold built successfully!${normal}\n\n"
echo "Simulation Example:"
echo "QsimProxy/smp_llp ../config/conf2x3_spx_torus_llp.cfg ../state/state.4 ../benchmark/graphbig_x86/bc.tar"
fi

0 comments on commit 241bc28

Please sign in to comment.