[scripts] Do not benchmark `2Hive` configuration
@@ -10,8 +10,12 @@ if [[ ! -f $app ]]; then
exit -1
fi
+# Create log
+mailfile=email_$1
+
# Run all three scenarios
-scenarios=('Original' '1Hive' '2Hives' '4Hives')
+scenarios=('Original' '1Hive' '4Hives')
+echo "Benchmarked: $1" > $mailfile
for scenario in "${scenarios[@]}"; do
echo $scenario
# Do some changes to get the correct HW state
@@ -29,11 +33,17 @@ for scenario in "${scenarios[@]}"; do
num_hives=4
fi
# Run the benchmark
- buildpath=build_$scenario
+ buildpath=build_$1_$scenario
result_dir=results/$(date +"%Y%m%d_%H%M%S_$1_$scenario")
+ mkdir -p $result_dir
+ log_file=$result_dir/benchmark_log_$1_$scenario
rm -rf $buildpath
buildpath=$buildpath result_dir=$result_dir num_hives=$num_hives app=$1 \
- make benchmark > log_$1_$scenario &
+ make benchmark > $log_file &
+ # Prepare notification email
+ echo "Scenario $scenario:" >> $mailfile
+ echo " - Buildpath=$(pwd)/$buildpath" >> $mailfile
+ echo " - ResultDir=$(pwd)/$result_dir" >> $mailfile
# Sleep until the compilation is done.
while [ ! -f $buildpath/trace_hart_0000.dasm ]; do sleep 5; done
# Revert changes done for each scenario
@@ -47,10 +57,6 @@ done
wait
-# All benchmarks are completed
-echo "Benchmark logs:" > log_all
-for scenario in "${scenarios[@]}"; do
- cat log_$1_$scenario >> log_all
-done
-
-echo "Done" > mail -s "Benchmarking completed" $USER@iis.ee.ethz.ch
+[[ -n "$2" ]] && echo "User notes: $2" >> $mailfile
+mail -s "Benchmarking $1 completed" $USER@iis.ee.ethz.ch < $mailfile
+rm $mailfile
