diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2023-06-01 15:27:02 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2023-06-01 15:27:02 +0200 |
commit | a27736998b1326f8bdf927b6f856d0592269a895 (patch) | |
tree | 8954294a3d94995bf47fc49a33a91e9b0d04df6d /BFS/baselines/cpu | |
parent | a169ff00414aec27055862bd971a85072b3babe8 (diff) |
BFS: update dfatool port; add eval scripts
Diffstat (limited to 'BFS/baselines/cpu')
-rw-r--r-- | BFS/baselines/cpu/Makefile | 2 | ||||
-rw-r--r-- | BFS/baselines/cpu/app.c | 10 | ||||
-rwxr-xr-x | BFS/baselines/cpu/run-opti.sh | 11 | ||||
-rwxr-xr-x | BFS/baselines/cpu/run.sh | 15 |
4 files changed, 28 insertions, 10 deletions
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" |