blob: 8804c5b46abe6153ae79eb9374825d6b8a4c92e6 (
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
76
77
|
#!/bin/bash
# This script breaks up benchmark lists (only SPEC CPU2006 at the moment)
# into parts to spread out across available hardware.
# It prints out one line of benchmarks per board.
set -euf -o pipefail
scripts=$(dirname "$0")/../jenkins-scripts
# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
convert_args_to_variables "$@"
obligatory_variables bench_list bmk_hw n_boards run_profile
declare bench_list bmk_hw n_boards run_profile
board_selection="${board_selection-balance}"
c_and_cxx=(
400.perlbench 401.bzip2 403.gcc 429.mcf 433.milc 444.namd 445.gobmk
447.dealII 450.soplex 453.povray 456.hmmer 458.sjeng 462.libquantum
464.h264ref 470.lbm 471.omnetpp 473.astar 482.sphinx3 483.xalancbmk
)
fortran=(
410.bwaves 435.gromacs 436.cactusADM 454.calculix 416.gamess 434.zeusmp
437.leslie3d 459.GemsFDTD 465.tonto 481.wrf
)
all=("${c_and_cxx[@]}" "${fortran[@]}")
mapfile -t bmks < <(echo "$bench_list" \
| sed -e "s/c_and_cxx/${c_and_cxx[*]}/g" \
-e "s/fortran/${fortran[*]}/g" \
-e "s/all/${all[*]}/g" \
| tr " " "\n" \
| sort -u)
if [ x"$board_selection" != x"balance" ]; then
case "$board_selection" in
one_board)
echo "${bmks[@]}"
;;
all_boards)
while [ $n_boards -gt 0 ]; do
echo "${bmks[@]}"
n_boards=$(($n_boards-1))
done
;;
esac
exit
fi
case "$bmk_hw" in
"sq") n_cores=24 ;;
"tk1") n_cores=4 ;;
"tx1") n_cores=4 ;;
esac
case "$run_profile" in
"serial") n_cores=1 ;;
esac
while [ ${#bmks[@]} -ge 1 ]; do
# Number of jobs needed for benchmarking
n_jobs=$(((${#bmks[@]} + $n_cores - 1) / $n_cores))
if [ $n_jobs -gt $n_boards ]; then
n_jobs=$n_boards
fi
# Number of benchmarks per job
N=$(((${#bmks[@]} + $n_jobs - 1) / $n_jobs))
echo "${bmks[@]:0:$N}"
bmks=("${bmks[@]:$N}")
n_boards=$(($n_boards-1))
done
|