From 93b903081231e0e3f99207384b30606b8c54e12b Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 16 Jan 2025 08:01:50 +0100 Subject: BFS: port baseline (wip) --- BFS/baselines/cpu/Makefile | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'BFS/baselines/cpu/Makefile') diff --git a/BFS/baselines/cpu/Makefile b/BFS/baselines/cpu/Makefile index 1f6ed3c..1efe457 100644 --- a/BFS/baselines/cpu/Makefile +++ b/BFS/baselines/cpu/Makefile @@ -1,8 +1,26 @@ -.PHONY: all -all: bfs +benchmark ?= 1 +debug ?= 0 +native ?= 1 +nop_sync ?= 0 +numa ?= 0 + +LDFLAGS = +CFLAGS = + +ifeq (${debug}, 1) + CFLAGS += -g +endif + +ifeq (${native}, 1) + CFLAGS += -march=native +endif + +ifeq (${numa}, 1) + LDFLAGS += -lnuma +endif bfs: app.c - gcc -Wall -Wextra -pedantic -march=native -O2 -o bfs -fopenmp app.c + gcc -Wall -Wextra -pedantic -O3 ${CFLAGS} -DNUMA=${numa} -DNUMA_MEMCPY=${numa_memcpy} -DNOP_SYNC=${nop_sync} -DWITH_BENCHMARK=${benchmark} -o bfs -fopenmp app.c ${LDFLAGS} bfs_O0: app.c gcc -o bfs_O0 -fopenmp app.c @@ -27,3 +45,5 @@ run_O2: bfs_O2 .PHONY: clean clean: rm -f bfs bfs_O0 bfs_O2 + +.PHONY: all -- cgit v1.2.3