1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-23 08:34:23 +00:00
hpc-2022-g3/OpenMP/linear-algebra/kernels/atax/.bench.sh

14 lines
312 B
Bash
Executable file

#!/bin/bash
runs=9
totalt=0.0
for i in $(seq $runs)
do
exet=$(./atax_acc)
totalt=$(awk "BEGIN{print $totalt+$exet}")
echo "Run #$i: " $(awk "BEGIN{printf(\"%.3g\", $exet)}") "seconds"
done
avgt=$(awk "BEGIN{print $totalt/$runs}")
echo "Average: " $(awk "BEGIN{printf(\"%.3g\", $avgt)}") "seconds"