scripts for learning
[Benchmarks_CSolver.git] / hexiom / learn.sh
diff --git a/hexiom/learn.sh b/hexiom/learn.sh
new file mode 100755 (executable)
index 0000000..b624784
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#Terminate the script if even one command fails
+set -e
+
+
+#Variables
+source ../common.sh
+BIN=../../bin
+BDIR=../Benchmarks/hexiom/learningset/
+
+#Checking the number of 
+if [ "$#" -lt 1 ]; then
+       echo "Illegal number of argument"
+       echo "./learn.sh [LearningSet]"
+       exit 1
+fi
+if [ "$1" -gt 2 ]; then
+       echo "Only 3 sets are available for learning. Parameter should be less than 3"
+       echo "./bench.sh [NUMBER] [--csolver/--dump]"
+       exit 1
+fi
+
+
+declare -a LearningSet=("${BDIR}38.dump ${BDIR}41.dump ${BDIR}43.dump ${BDIR}44.dump ${BDIR}46.dump ${BDIR}47.dump ${BDIR}49.dump ${BDIR}50.dump"
+"${BDIR}36.dump ${BDIR}41.dump ${BDIR}42.dump ${BDIR}44.dump ${BDIR}45.dump ${BDIR}47.dump ${BDIR}48.dump ${BDIR}50.dump" 
+"${BDIR}36.dump ${BDIR}38.dump ${BDIR}42.dump ${BDIR}43.dump ${BDIR}45.dump ${BDIR}46.dump ${BDIR}48.dump ${BDIR}49.dump")
+
+echo ${LearningSet[$1]}
+cd $BIN
+./run.sh serializestatictuner
+./run.sh runmultituner $BUDGET $ROUND ${LearningSet[$1]} - $TUNERCONF
+