summaryrefslogtreecommitdiff
path: root/Microbenchmarks/CPU-DPU/dimes24-hetsim-alloc.sh
blob: bccb3ce1ffeeb772a5ff66ef765d97025e05c7ce (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
#!/bin/bash

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

run_benchmark_nmc() {
	local "$@"
	set -e
	sudo limit_ranks_to_numa_node ${numa_rank}
	./make-size.sh ${size}
	n_nops=$((size * 256))
	if make -B NR_RANKS=${nr_ranks} NR_TASKLETS=1 BL=10 DPU_BINARY=\'\"bin/dpu_size\"\' NUMA=1; then
		for l in $(seq 1 20); do
			bin/host_code -c ${numa_cpu} -w 1 -e 0 -x 1 -i 65536 -N $n_nops -I $(size -A bin/dpu_size | awk '($1 == ".text") {print $2/8}')
		done
	fi
	return $?
}

export -f run_benchmark_nmc

(

parallel -j1 --eta --joblog ${fn}.1.joblog --resume --header : \
	run_benchmark_nmc nr_ranks={nr_ranks} numa_rank={numa_rank} numa_cpu={numa_cpu} size={size} \
	::: i $(seq 1 5) \
	::: numa_rank 0 1 \
	::: numa_cpu 0 1 \
	::: nr_ranks $(seq 1 20) \
	::: size $(seq 0 16)

parallel -j1 --eta --joblog ${fn}.2.joblog --resume --header : \
	run_benchmark_nmc nr_ranks={nr_ranks} numa_rank={numa_rank} numa_cpu={numa_cpu} size={size} \
	::: i $(seq 1 5) \
	::: numa_rank any \
	::: numa_cpu 0 1 \
	::: nr_ranks $(seq 21 40) \
	::: size $(seq 0 16)

) >> ${fn}.txt