-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeasure_speedup.sh
executable file
·33 lines (27 loc) · 1.28 KB
/
measure_speedup.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
#!/bin/bash
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
export LD_PRELOAD="/usr/local/lib/libtcmalloc.so"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
export PATH="$SCRIPT_DIR/build/run/bin:$PATH"
echo Running IKOS...
read IKOS_EC IKOS_T <<< $(runexec --quiet --no-container --walltimelimit=14400 --output=/dev/null -- ./run_ikos.sh --rm-db -q -w --display-times=no --display-summary=no --progress=no --inline-all --no-checks --no-fixpoint-cache --proc=inter $@ \
| awk -F= '/exitcode|walltime/ {print $2}')
if [[ $IKOS_EC != 0 ]]
then
echo "IKOS failed with exitcode $IKOS_EC"
exit $IKOS_EC
fi
echo Running PIKOS...
read PIKOS_EC PIKOS_T <<< $(runexec --quiet --no-container --walltimelimit=14400 --output=/dev/null -- ./run_pikos.sh --rm-db -q -w --display-times=no --display-summary=no --progress=no --inline-all --no-checks --no-fixpoint-cache --proc=inter $@ \
| awk -F= '/exitcode|walltime/ {print $2}')
if [[ $PIKOS_EC != 0 ]]
then
echo "PIKOS failed with exitcode $PIKOS_EC"
exit $PIKOS_EC
fi
IKOS_T=${IKOS_T%?}
PIKOS_T=${PIKOS_T%?}
SPEEDUP=$(bc -l <<< "$IKOS_T/$PIKOS_T")
printf "Running time of IKOS = %.5f seconds.\n" $IKOS_T
printf "Running time of PIKOS = %.5f seconds.\n" $PIKOS_T
printf "Speedup (running time of IKOS / running time of PIKOS) = %.2fx.\n" $SPEEDUP