Decreasing the memory limit. Problem still exists in our servers
[satune.git] / src / Scripts / runbench.sh
1 #!/bin/bash
2 # run as the following:
3 # ./runbench.sh [hexiom] [timeout] [tuner.conf]
4 # ./runbench.sh [nqueens] [timeout] [tuner.conf]
5 # ./runbench.sh [sudoku-csolver] [timeout] [tuner.conf]
6 # ./runbench.sh [killerSudoku] [timeout] [tuner.conf]
7
8 if [ "$#" -lt 3 ]; then
9         echo "Illegal number of argument"
10         echo "./runbench.sh [benchmark] [timeout] [tuner.conf]"
11         exit 1
12 fi
13
14
15 BIN=./bin
16 DUMP=$(find . -name "*.dump")
17 cd $BIN
18 for d in $DUMP; do
19         if [[ $d = *$1* ]] && [[ $d = *learningset* ]]; then
20                 echo "Running: ./run.sh tunerrun "."$d $2 $3 out.out"
21                 ./run.sh tunerrun "."$d $2 $3 out.out
22                 echo "Return code: $?"
23                 if [ $? -eq 141 ]; then #Dump info when SAT Solver gets killed by OS ....
24                         echo "Satune got out of memory"
25                         echo "deserializing $d ..."
26                         echo "SAT Solving time: 400000000.0"
27                         echo "CSOLVER solve time: 400000000.0"
28                 fi
29                 echo "Best tuner"
30         fi
31 done