diff --git a/OpenMP/linear-algebra/kernels/atax/.bench.sh b/OpenMP/linear-algebra/kernels/atax/.bench.sh index f72b048..752c97c 100755 --- a/OpenMP/linear-algebra/kernels/atax/.bench.sh +++ b/OpenMP/linear-algebra/kernels/atax/.bench.sh @@ -6,7 +6,7 @@ run_benchmarks() { for i in $(seq $runs) do - exet=$(./atax_acc) + exet=$(./atax.elf) totalt=$(awk "BEGIN{print $totalt+$exet}") echo -n "." # echo "Run #$i: " $(awk "BEGIN{printf(\"%.3g\", $exet)}") "seconds" @@ -43,7 +43,7 @@ do fi echo "Flags: $cxxflags" - make --silent "EXTRA_CXXFLAGS=$cxxflags" clean all + make --silent "EXTRA_CXXFLAGS=$cxxflags" "atax.elf" run_benchmarks done diff --git a/OpenMP/linear-algebra/kernels/atax/Makefile b/OpenMP/linear-algebra/kernels/atax/Makefile index c8b4d0d..5975e40 100644 --- a/OpenMP/linear-algebra/kernels/atax/Makefile +++ b/OpenMP/linear-algebra/kernels/atax/Makefile @@ -1,7 +1,3 @@ --include ../../../utilities/options.mk --include ../../../utilities/c2.mk - - # -DPOLYBENCH_TIME makes Polybench output the execution time of the program CXXFLAGS+= -DPOLYBENCH_TIME # -Wall and -Wextra enable more warnings @@ -15,16 +11,25 @@ CXXFLAGS+= ${EXTRA_CXXFLAGS} # Select the location of the local CUDA install CUDA_HOME:=/opt/cuda # Specify the directory of the nvc compiler -NVCC=$(CUDA_HOME)/bin/nvcc +NVCC:=$(CUDA_HOME)/bin/nvcc # Specify the flags for the nvc compiler NVCFLAGS:=$(CXXFLAGS) $(NVOPT) +INCPATHS:=-I../../../utilities + + # Create an automake definition for .cu files -$(BUILD_DIR)/%.cu.o: %.cu - $(MKDIR_P) $(dir $@) +%.cu.o: $(NVCC) $(NVCFLAGS) -c $< -o $@ +%.exe: %.cu.o + $(NVCC) $(NVCFLAGS) $(INCPATHS) $^ -o $@ $(LDFLAGS) + +%.elf: %.cu.o + $(NVCC) $(NVCFLAGS) $(INCPATHS) $^ -o $@ $(LDFLAGS) + + .PHONY: bench bench: