summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2023-06-01 15:27:02 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2023-06-01 15:27:02 +0200
commita27736998b1326f8bdf927b6f856d0592269a895 (patch)
tree8954294a3d94995bf47fc49a33a91e9b0d04df6d
parenta169ff00414aec27055862bd971a85072b3babe8 (diff)
BFS: update dfatool port; add eval scripts
-rw-r--r--BFS/Makefile4
-rw-r--r--BFS/baselines/cpu/Makefile2
-rw-r--r--BFS/baselines/cpu/app.c10
-rwxr-xr-xBFS/baselines/cpu/run-opti.sh11
-rwxr-xr-xBFS/baselines/cpu/run.sh15
-rw-r--r--BFS/host/app.c10
-rwxr-xr-xBFS/run-paper-strong-full.sh22
-rwxr-xr-xBFS/run-paper-strong-rank.sh23
-rwxr-xr-xBFS/run-paper-weak.sh24
9 files changed, 102 insertions, 19 deletions
diff --git a/BFS/Makefile b/BFS/Makefile
index 2e1dcfe..a4ea69d 100644
--- a/BFS/Makefile
+++ b/BFS/Makefile
@@ -5,8 +5,6 @@ COMMON_INCLUDES := support
HOST_SOURCES := $(wildcard host/*.c)
DPU_SOURCES := $(wildcard dpu/*.c)
-.PHONY: all clean test
-
COMMON_FLAGS := -Wall -Wextra -g -I${COMMON_INCLUDES}
HOST_FLAGS := ${COMMON_FLAGS} -std=c11 -O3 `dpu-pkg-config --cflags --libs dpu` -DNR_TASKLETS=${NR_TASKLETS} -DNR_DPUS=${NR_DPUS}
DPU_FLAGS := ${COMMON_FLAGS} -O2 -DNR_TASKLETS=${NR_TASKLETS}
@@ -33,3 +31,5 @@ clean:
test: all
bin/host_code
+
+.PHONY: all clean test
diff --git a/BFS/baselines/cpu/Makefile b/BFS/baselines/cpu/Makefile
index 1b1d57c..6f082b1 100644
--- a/BFS/baselines/cpu/Makefile
+++ b/BFS/baselines/cpu/Makefile
@@ -10,6 +10,8 @@ bfs_O0: app.c
bfs_O2: app.c
gcc -O2 -o bfs_O2 -fopenmp app.c
+# each bfs invocation performs 100 iterations
+
.PHONY: run
run: bfs
./bfs -f ../../data/loc-gowalla_edges.txt
diff --git a/BFS/baselines/cpu/app.c b/BFS/baselines/cpu/app.c
index 65cd420..caf4cbc 100644
--- a/BFS/baselines/cpu/app.c
+++ b/BFS/baselines/cpu/app.c
@@ -150,18 +150,14 @@ int main(int argc, char** argv) {
}
if (isOK) {
- printf("[::] n_threads=%d e_type=%s n_elements=%d "
- "| throughput_cpu_ref_MBps=%f throughput_cpu_omp_MBps=%f\n",
+ printf("[::] BFS CPU | n_threads=%d e_type=%s n_elements=%d "
+ "| throughput_seq_MBps=%f throughput_MBps=%f",
nr_threads, "uint32_t", csrGraph.numNodes,
csrGraph.numNodes * sizeof(uint32_t) / timer.time[1],
csrGraph.numNodes * sizeof(uint32_t) / timer.time[0]);
- printf("[::] n_threads=%d e_type=%s n_elements=%d "
- "| throughput_cpu_ref_MOpps=%f throughput_cpu_omp_MOpps=%f\n",
- nr_threads, "uint32_t", csrGraph.numNodes,
+ printf(" throughput_seq_MOpps=%f throughput_MOpps=%f",
csrGraph.numNodes / timer.time[1],
csrGraph.numNodes / timer.time[0]);
- printf("[::] n_threads=%d e_type=%s n_elements=%d |",
- nr_threads, "uint32_t", csrGraph.numNodes);
printAll(&timer, 1);
}
diff --git a/BFS/baselines/cpu/run-opti.sh b/BFS/baselines/cpu/run-opti.sh
new file mode 100755
index 0000000..0a3a4a3
--- /dev/null
+++ b/BFS/baselines/cpu/run-opti.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+HOST="$(hostname)"
+
+echo $HOST
+
+make clean
+
+make run_O0 | sed 's/CPU/CPU O0/' | tee "${HOST}-O0.txt"
+
+make run_O2 | sed 's/CPU/CPU O2/' | tee "${HOST}-O2.txt"
diff --git a/BFS/baselines/cpu/run.sh b/BFS/baselines/cpu/run.sh
index 4174fc3..d0e0400 100755
--- a/BFS/baselines/cpu/run.sh
+++ b/BFS/baselines/cpu/run.sh
@@ -2,6 +2,12 @@
set -e
+HOST="$(hostname)"
+
+echo $HOST
+
+(
+
echo "prim-benchmarks BFS CPU (dfatool edition)"
echo "Started at $(date)"
echo "Revision $(git describe --always)"
@@ -9,10 +15,13 @@ echo "Revision $(git describe --always)"
# default threads: 4
# input size depends on file -> strong scaling only
+# each BFS invocation performs 100 iterations
+# roadNet-CA appears to be too small; frequently gives inf throughput
-make
-for nr_threads in 1 2 4 6 8 12 16 20 24 32; do
- for f in loc-gowalla_edges roadNet-CA; do
+make -B verbose=1
+for nr_threads in 88 64 44 1 2 4 6 8 12 16 20 24 32; do
+ for f in loc-gowalla_edges; do # roadNet-CA; do
OMP_NUM_THREADS=${nr_threads} timeout --foreground -k 1m 30m ./bfs -f ../../data/${f}.txt || true
done
done
+) | tee "${HOST}-explore.txt"
diff --git a/BFS/host/app.c b/BFS/host/app.c
index e4ed9b5..44154e2 100644
--- a/BFS/host/app.c
+++ b/BFS/host/app.c
@@ -297,18 +297,14 @@ int main(int argc, char** argv) {
}
if (status) {
- printf("[::] n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d "
- "| throughput_pim_MBps=%f throughput_MBps=%f\n",
+ printf("[::] BFS NMC | n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d "
+ "| throughput_pim_MBps=%f throughput_MBps=%f",
numDPUs, NR_TASKLETS, "uint32_t", numNodes,
numNodes * sizeof(uint32_t) / (timer.time[2]),
numNodes * sizeof(uint32_t) / (timer.time[0] + timer.time[1] + timer.time[2] + timer.time[3] + timer.time[4]));
- printf("[::] n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d "
- "| throughput_pim_MOpps=%f throughput_MOpps=%f\n",
- numDPUs, NR_TASKLETS, "uint32_t", numNodes,
+ printf(" throughput_pim_MOpps=%f throughput_MOpps=%f",
numNodes / (timer.time[2]),
numNodes / (timer.time[0] + timer.time[1] + timer.time[2] + timer.time[3] + timer.time[4]));
- printf("[::] n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d |",
- numDPUs, NR_TASKLETS, "uint32_t", numNodes);
printAll(&timer, 4);
}
diff --git a/BFS/run-paper-strong-full.sh b/BFS/run-paper-strong-full.sh
new file mode 100755
index 0000000..8d64d63
--- /dev/null
+++ b/BFS/run-paper-strong-full.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -e
+
+(
+
+echo "prim-benchmarks BFS strong-full (dfatool edition)"
+echo "Started at $(date)"
+echo "Revision $(git describe --always)"
+
+for nr_dpus in 256 512 1024 2048; do
+ for nr_tasklets in 1 2 4 8 16; do
+ echo
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} verbose=1; then
+ # repetition is not part of upstream setup
+ for i in `seq 1 50`; do
+ timeout --foreground -k 1m 3m bin/host_code -f data/loc-gowalla_edges.txt || true
+ done
+ fi
+ done
+done
+) | tee log-paper-strong-full.txt
diff --git a/BFS/run-paper-strong-rank.sh b/BFS/run-paper-strong-rank.sh
new file mode 100755
index 0000000..0b20323
--- /dev/null
+++ b/BFS/run-paper-strong-rank.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -e
+
+(
+
+echo "prim-benchmarks BFS strong-rank (dfatool edition)"
+echo "Started at $(date)"
+echo "Revision $(git describe --always)"
+
+# 256 and 512 are not part of upstream
+for nr_dpus in 256 512 1 4 16 64; do
+ for nr_tasklets in 1 2 4 8 16; do
+ echo
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} verbose=1; then
+ # repetition is not part of upstream setup
+ for i in `seq 1 50`; do
+ timeout --foreground -k 1m 3m bin/host_code -f data/loc-gowalla_edges.txt || true
+ done
+ fi
+ done
+done
+) | tee log-paper-strong-rank.txt
diff --git a/BFS/run-paper-weak.sh b/BFS/run-paper-weak.sh
new file mode 100755
index 0000000..121758a
--- /dev/null
+++ b/BFS/run-paper-weak.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+(
+
+echo "prim-benchmarks BFS weak (dfatool edition)"
+echo "Started at $(date)"
+echo "Revision $(git describe --always)"
+
+# 256 and 512 are not part of upstream
+for nr_dpus in 256 512 1 4 16 64; do
+ for nr_tasklets in 1 2 4 8 16; do
+ echo
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} verbose=1; then
+ # repetition is not part of upstream setup
+ for i in `seq 1 50`; do
+ # upstream code uses some kind of generated rMat graphs, but does not provide instructions for reproduction
+ timeout --foreground -k 1m 3m bin/host_code -f data/loc-gowalla_edges.txt || true
+ done
+ fi
+ done
+done |
+) tee log-paper-weak.txt