3 #Terminate the script if even one command fails
9 PARAMETERS="41 42 36 48 46 44 45 38 43 50 47 49"
13 #Checking the number of
14 if [ "$#" -lt 1 ]; then
15 echo "Illegal number of argument"
16 echo "./bench.sh [NUMBER] [--csolver/--dump]"
22 for PAR in $PARAMETERS; do
24 for ((i=0; i<"$1"; i++)); do
25 echo "begin iteration: $i" >>$TEMP
26 if [ "$#" -eq 1 ]; then
28 ./run.sh hexiom_solve.py $PAR >> $TEMP
30 DIFF=$(echo "$END - $START" | bc)
31 echo "Program Execution Time: $DIFF" >>$TEMP
33 if [ $2 = '--dump' ]; then
35 ./run.sh csolverHexiom.py $PAR --dump >> $TEMP
37 DIFF=$(echo "$END - $START" | bc)
38 echo "Program Execution Time: $DIFF" >>$TEMP
41 elif [ $2 = '--csolver' ]; then
43 ./run.sh csolverHexiom.py $PAR >> $TEMP
45 DIFF=$(echo "$END - $START" | bc)
46 echo "Program Execution Time: $DIFF" >>$TEMP
48 echo "Unknown command : " $2