mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-25 17:44:23 +00:00
Create bench
target for calculating the average of 9 runs
This commit is contained in:
parent
8cb741d24d
commit
e23d565fd2
2 changed files with 15 additions and 1 deletions
14
OpenMP/linear-algebra/kernels/atax/.bench.sh
Executable file
14
OpenMP/linear-algebra/kernels/atax/.bench.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/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: $exet seconds"
|
||||
done
|
||||
|
||||
avgt=$(awk "BEGIN{print $totalt/$runs}")
|
||||
echo "Average: $avgt seconds"
|
|
@ -21,4 +21,4 @@ MAKEFLAGS+= --silent
|
|||
|
||||
bench:
|
||||
make clean all
|
||||
./atax_acc
|
||||
./.bench.sh
|
||||
|
|
Loading…
Reference in a new issue