mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-29 11:34:21 +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:
|
bench:
|
||||||
make clean all
|
make clean all
|
||||||
./atax_acc
|
./.bench.sh
|
||||||
|
|
Loading…
Reference in a new issue