summaryrefslogtreecommitdiff
path: root/BS/dimes-hetsim-hbm.sh
blob: 2aabe15f21466a14a04036fbab6010a96cc29c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash

echo PrIM BS

cd baselines/cpu
make -B NUMA=1

mkdir -p log/$(hostname)
fn=log/$(hostname)/$(date +%Y%m%d)

# upstream DPU version uses 2048576 * uint64 ≈ 16 MiB (DPU max: 64 MiB)
# upstream DPU version uses 2 queries
# * uint64 == 32 MiB
input_size_dpu=$(perl -E 'say 2 ** 22')
# * uint64 == 8 MiB
num_queries_dpu=1048576

# * uint64 == 4 GiB
input_size_hbm=$(perl -E 'say 2 ** 29')
# * uint64 == 128 MiB
num_queries_hbm=16777216

run_benchmark() {
	local "$@"
	OMP_NUM_THREADS=${nr_threads} ./bs_omp ${input_size} ${num_queries} $ram $cpu 2>&1
	return $?
}

export -f run_benchmark

(

echo "single-node execution, DPU ref (1/4)" >&2

parallel -j1 --eta --joblog ${fn}.1.joblog --header : \
	run_benchmark i={i} nr_threads={nr_threads} ram={ram} cpu={cpu} \
	input_size=${input_size_dpu} num_queries=${num_queries_dpu} \
	::: i $(seq 1 5) \
	::: nr_threads 1 2 4 8 12 16 \
	::: cpu $(seq 0 7) \
	::: ram $(seq 0 15)

echo "single-node execution, HBM ref (2/4)" >&2

parallel -j1 --eta --joblog ${fn}.2.joblog --header : \
	run_benchmark i={i} nr_threads={nr_threads} ram={ram} cpu={cpu} \
	input_size=${input_size_hbm} num_queries=${num_queries_hbm} \
	::: i $(seq 1 5) \
	::: nr_threads 1 2 4 8 12 16 \
	::: cpu $(seq 0 7) \
	::: ram $(seq 0 15)

echo "multi-node execution, DPU ref (3/4)" >&2

parallel -j1 --eta --joblog ${fn}.3.joblog --header : \
	run_benchmark i={i} nr_threads={nr_threads} ram={ram} cpu={cpu} \
	input_size=${input_size_dpu} num_queries=${num_queries_dpu} \
	::: i $(seq 1 40) \
	::: nr_threads 32 48 64 96 128 \
	::: cpu -1 \
	::: ram $(seq 0 15)

echo "multi-node execution, HBM ref (4/4)" >&2

parallel -j1 --eta --joblog ${fn}.4.joblog --header : \
	run_benchmark i={i} nr_threads={nr_threads} ram={ram} cpu={cpu} \
	input_size=${input_size_hbm} num_queries=${num_queries_hbm} \
	::: i $(seq 1 40) \
	::: nr_threads 32 48 64 96 128 \
	::: cpu -1 \
	::: ram $(seq 0 15)

) > ${fn}.txt

xz -f -v -9 -M 800M ${fn}.txt