Skip to content
Snippets Groups Projects
Commit dcd6ee3c authored by Nicolas Pfeiffer's avatar Nicolas Pfeiffer
Browse files

improved run_benchmarks script

parent ede46987
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,7 @@
benchmark_dir=build/benchmarks
result_dir=results
#benchmarks=("emper_fiber" "emper_continuation" "tbb" "fibril" "cilkplus")
benchmarks=("emper_continuation" "tbb" "fibril" "cilkplus")
benchmarks=( "serial" "emper_fiber" "emper_continuation" "tbb" "fibril" "cilkplus" )
benchmark_serial="serial"
max_cores=96
......@@ -15,57 +14,43 @@ step_size=4
run_target() {
(
EMPER_BENCH_NPROCS=$2 ./$1 > tmp
while [[ $? -ne 0 ]]; do
EMPER_BENCH_NPROCS=$2 ./$1 > tmp
done
cat tmp
) 2> /dev/null
}
#[[ -d $benchmark_dir ]] || make
make release > /dev/null || exit 1
make release &> /dev/null || exit 1
for benchmark_name in ${benchmarks[@]}; do
target_dir="$benchmark_dir/$benchmark_name"
output_parent_dir="$result_dir/$benchmark_name"
echo "$target_dir"
for target_name in $(ls $target_dir); do
target="$target_dir/$target_name"
if [[ -f $target && -x $target ]]; then
output_dir="$output_parent_dir/$target_name"
echo $target
[[ -d $output_dir ]] || mkdir -p $output_dir
false || while [[ $? -ne 0 ]]; do
EMPER_BENCH_NPROCS=1 ./$target 2> /dev/null > $output_dir/001.txt
done
run_target $target 1 > $output_dir/001.txt
if [[ $benchmark_name -ne $benchmark_serial ]]; then
for cores in $(seq $step_size $step_size $max_cores); do
false || while [[ $? -ne 0 ]]; do
EMPER_BENCH_NPROCS=$cores ./$target 2> /dev/null > $output_dir/$(printf "%03d" $cores).txt
done
run_target $target $cores > $output_dir/$(printf "%03d" $cores).txt
done
fi
fi
done
done
target_dir="$benchmark_dir/$benchmark_serial"
output_parent_dir="$result_dir/$benchmark_serial"
for target_name in $(ls $target_dir); do
target="$target_dir/$target_name"
if [[ -f $target && -x $target ]]; then
output_dir="$output_parent_dir/$target_name"
echo $target
[[ -d $output_dir ]] || mkdir -p $output_dir
false || while [[ $? -ne 0 ]]; do
EMPER_BENCH_NPROCS=1 ./$target 2> /dev/null > $output_dir/001.txt
done
fi
done
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment