pfor/rtbenchmarks/run_rt_imgpro

39 lines
791 B
Bash
Executable File

#!/bin/bash
binary=./release/benchmarks/imgpro
preload="LD_PRELOAD=~bachelet/local/kephren/lib64/libstdc++.so.6"
repeat=20
outdir="rtbenchmarks/data_imgpro"
[ -x "${binary}" ] || exit 1
run() {
coreset=$1
method=$2
ncores=$3
prefix="${method}:${ncores}"
for i in $(seq ${repeat}); do
t=$(eval "${preload} taskset -c ${coreset} ${binary} ${size} ${method} ${sample} ${ncores}"|cut -d' ' -f2)
echo "${prefix}:${t}"
done
}
benchCores() {
cores=(1 2 4 6 8 10 12 14 16 18)
echo "---- benchCores ----"
for method in seq omp gen_omp gen_thread; do
echo "==== ${method}"
for ncores in ${cores[@]}; do
maxcore=$((ncores*4 - 1))
coreset="$(seq -s, 0 4 ${maxcore})"
run "${coreset}" "${method}" "${ncores}"
done|tee "${outdir}/rt_cores_${method}"
done
}
eval "$*"