diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 15:54:08 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 15:54:08 +0100 |
commit | a30ffa52be405db50c660012c92e3e333412ed58 (patch) | |
tree | f157e359d62ffac34b8e513eb89b96989c17993d | |
parent | e749fafbe527ff8a6ea15bd945cc3e8d4800e7ef (diff) |
-rw-r--r-- | SpMV/baselines/cpu/Makefile | 10 | ||||
-rwxr-xr-x | SpMV/baselines/cpu/run-perf.sh | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/SpMV/baselines/cpu/Makefile b/SpMV/baselines/cpu/Makefile index 5b2367b..a24b764 100644 --- a/SpMV/baselines/cpu/Makefile +++ b/SpMV/baselines/cpu/Makefile @@ -1,7 +1,15 @@ +native ?= 1 + +CFLAGS = + +ifeq (${native}, 1) + CFLAGS += -march=native +endif + all: spmv spmv: app.c - gcc -Wall -Wextra -pedantic -march=native -O2 -o spmv -fopenmp app.c + gcc -Wall -Wextra -pedantic ${CFLAGS} -O3 -o spmv -fopenmp app.c spmv_O0: app.c gcc -o spmv_O0 -fopenmp app.c diff --git a/SpMV/baselines/cpu/run-perf.sh b/SpMV/baselines/cpu/run-perf.sh new file mode 100755 index 0000000..714498d --- /dev/null +++ b/SpMV/baselines/cpu/run-perf.sh @@ -0,0 +1,6 @@ +#!/bin/zsh + +make -B + +OMP_NUM_THREADS=1 perf stat record -o t1.perf -e ${(j:,:):-$(grep -v '^#' ../../../perf-events.txt | cut -d ' ' -f 1)} make run +OMP_NUM_THREADS=4 perf stat record -o t4.perf -e ${(j:,:):-$(grep -v '^#' ../../../perf-events.txt | cut -d ' ' -f 1)} make run |