diff --git a/OpenMP/linear-algebra/kernels/atax/.bench.sh b/OpenMP/linear-algebra/kernels/atax/.bench.sh index af2d127..bcb11f1 100755 --- a/OpenMP/linear-algebra/kernels/atax/.bench.sh +++ b/OpenMP/linear-algebra/kernels/atax/.bench.sh @@ -16,32 +16,35 @@ run_benchmarks() { echo " Average of $runs runs: " $(awk "BEGIN{printf(\"%.3g\", $avgt)}") "seconds" } -for c in $(seq 0 15) +for dataset in MINI_DATASET SMALL_DATASET STANDARD_DATASET LARGE_DATASET EXTRALARGE_DATASET do - cflags="" + for c in $(seq 0 15) + do + cflags="-D$dataset" - if (( $c & 1 )) - then - cflags="$cflags -DTOGGLE_INIT_ARRAY_1" - fi + if (( $c & 1 )) + then + cflags="$cflags -DTOGGLE_INIT_ARRAY_1" + fi - if (( $c & 2 )) - then - cflags="$cflags -DTOGGLE_INIT_ARRAY_2" - fi + if (( $c & 2 )) + then + cflags="$cflags -DTOGGLE_INIT_ARRAY_2" + fi - if (( $c & 4 )) - then - cflags="$cflags -DTOGGLE_KERNEL_ATAX_1" - fi + if (( $c & 4 )) + then + cflags="$cflags -DTOGGLE_KERNEL_ATAX_1" + fi - if (( $c & 8 )) - then - cflags="$cflags -DTOGGLE_KERNEL_ATAX_2" - fi + if (( $c & 8 )) + then + cflags="$cflags -DTOGGLE_KERNEL_ATAX_2" + fi - echo "Flags: $cflags" - make "EXTRA_CFLAGS=$cflags" clean all + echo "Flags: $cflags" + make "EXTRA_CFLAGS=$cflags" clean all - run_benchmarks + run_benchmarks + done done \ No newline at end of file diff --git a/OpenMP/linear-algebra/kernels/atax/Makefile b/OpenMP/linear-algebra/kernels/atax/Makefile index b8dd6d5..59aae0d 100644 --- a/OpenMP/linear-algebra/kernels/atax/Makefile +++ b/OpenMP/linear-algebra/kernels/atax/Makefile @@ -3,9 +3,6 @@ # -DPOLYBENCH_TIME makes Polybench output the execution time of the program CFLAGS+= -DPOLYBENCH_TIME -# -DLARGE_DATASET increases the size of arrays, making everything easier to profile -# Do not use EXTRALARGE_DATASET, int will overflow -CFLAGS+= -DLARGE_DATASET # -Wall and -Wextra enable more warnings CFLAGS+= -Wall CFLAGS+= -Wextra diff --git a/OpenMP/linear-algebra/kernels/atax/atax.h b/OpenMP/linear-algebra/kernels/atax/atax.h index 8299296..b640185 100644 --- a/OpenMP/linear-algebra/kernels/atax/atax.h +++ b/OpenMP/linear-algebra/kernels/atax/atax.h @@ -2,7 +2,7 @@ # define ATAX_H /* Default to STANDARD_DATASET. */ -# if !defined(MINI_DATASET) && !defined(SMALL_DATASET) && !defined(LARGE_DATASET) && !defined(EXTRALARGE_DATASET) +# if !defined(MINI_DATASET) && !defined(SMALL_DATASET) && !defined(STANDARD_DATASET) && !defined(LARGE_DATASET) && !defined(EXTRALARGE_DATASET) # define STANDARD_DATASET # endif