Skip to content
Snippets Groups Projects
Commit 66e8b800 authored by Matthias Volk's avatar Matthias Volk
Browse files

Started on automatic build script for Storm

parent 9c0eb3b1
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Stop on first error. This is considered bad practice but it makes life easier.
set -e
# Print usage
if [ "$#" -ne 2 ]; then
echo "# Usage: ./build_storm.sh DIRECTORY GIT_USER_NAME"
exit 1
fi
# Variables
DIR=$(readlink -f $1)
USER=$2
CORES=40
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
# Prepare cluster environment (gcc, boost, etc.)
echo "# Preparing evironment."
source $SCRIPT_DIR/../prepareEnvironmentGcc.sh
echo "# Building Storm and its dependencies in directory '$DIR'. Git user is '$USER'."
mkdir -p $DIR
# IntelTBB
# Get correct library paths for Intel TBB
TBB_PREFIX=$(tr ':' '\n' <<< "$LD_LIBRARY_PATH" | grep $TBBROOT | tr '\n' ';')
TBB_PREFIX="$TBB_PREFIX$TBBROOT" # we need no ; separator because the tr command already added a trailing one
echo "# TBB Prefix: $TBB_PREFIX"
# Z3
echo "# Building Z3."
cd $DIR
if [ ! -d z3_src ]; then
git clone https://github.com/Z3Prover/z3.git z3_src
cd z3_src
# Get latest tag
latestTag=$(git tag -l | sort -Vf | tail -1) # Sorted alphabetically and ignore case
echo "# Using Z3 tag $latestTag"
git checkout $latestTag
fi
cd $DIR
if [ ! -d z3 ]; then
cd z3_src
python scripts/mk_make.py --prefix=$DIR/z3
cd build
make -j$CORES
make install -j$CORES
fi
echo "# Building Z3 finished."
# Carl
echo "# Building Carl."
cd $DIR
if [ ! -d carl ]; then
git clone https://$USER@srv-i2.informatik.rwth-aachen.de/scm/git/carl.git -b master14
fi
cd carl
mkdir -p build
cd build
if [ ! -f CMakeCache.txt ]; then
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON
fi
make lib_carl -j$CORES
echo "# Building Carl finished."
# Storm
cd $DIR
echo "# Building Storm."
if [ ! -d storm ]; then
git clone https://$USER@srv-i2.informatik.rwth-aachen.de/scm/git/storm.git
fi
cd storm
mkdir -p build
cd build
if [ ! -f CMakeCache.txt ]; then
cmake .. -DCMAKE_BUILD_TYPE=Release -DSTORM_DEVELOPER=OFF -DSTORM_LOG_DISABLE_DEBUG=ON \
-DZ3_ROOT=$DIR/z3 \
-DSTORM_USE_INTELTBB=ON -DTBB_ROOT="$TBB_PREFIX" \
-DSTORM_USE_GUROBI=ON \
-DSTORM_CARL_DIR_HINT=$DIR/carl/build
fi
make binaries -j$CORES
echo "# Building Storm finished."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment