diff --git a/OpenMP/linear-algebra/kernels/atax/.bench.sh b/OpenMP/linear-algebra/kernels/atax/.bench.sh new file mode 100755 index 0000000..b79e6c0 --- /dev/null +++ b/OpenMP/linear-algebra/kernels/atax/.bench.sh @@ -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" diff --git a/OpenMP/linear-algebra/kernels/atax/Makefile b/OpenMP/linear-algebra/kernels/atax/Makefile index b0afc30..96c7b77 100644 --- a/OpenMP/linear-algebra/kernels/atax/Makefile +++ b/OpenMP/linear-algebra/kernels/atax/Makefile @@ -21,4 +21,4 @@ MAKEFLAGS+= --silent bench: make clean all - ./atax_acc + ./.bench.sh