Skip to content

Commit 691816b

Browse files
Improve job scheduling when running regression tests with -jN
Currently the regression test suite directories are listed and executed in alphabetical order. However, because the runtimes of the various test suites are not uniform, this leads to poor utilisation of the parallel jobs. For instance, consider four tests, A, B, C and D. Lets assume the runtimes for these hypothetical tests are: A 100 B 50 C 50 D 100 further, lets assume we have two cores to run on. The tests are run in alphabetical order, leading to a job schedule that looks something like: Time Core Test 0 1 A 0 2 B 50 2 C 100 1 D 100 2 <idle> 200 - All tests complete However, if jobs are scheduled in roughly decending runtime order, we get a job schedule that looks roughly like: Time Core Test 0 1 A 0 2 D 100 1 B 100 2 C 150 - All tests complete This commit re-orders the list of regression suite directories into roughly decending runtime order.
1 parent 87526e0 commit 691816b

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

regression/CMakeLists.txt

+18-14
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,29 @@ macro(add_test_pl_tests cmdline)
2020
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -K KNOWNBUG ${ARGN})
2121
endmacro(add_test_pl_tests)
2222

23-
add_subdirectory(ansi-c)
23+
# For the best possible utilisation of multiple cores when
24+
# running tests in parallel, it is important that these directories are
25+
# listed with decreasing runtimes (i.e. longest running at the top)
2426
add_subdirectory(cbmc)
25-
add_subdirectory(cbmc-cover)
26-
add_subdirectory(cbmc-cpp)
2727
add_subdirectory(cbmc-java)
28-
add_subdirectory(cbmc-java-inheritance)
29-
add_subdirectory(cpp)
3028
add_subdirectory(goto-analyzer)
31-
add_subdirectory(goto-analyzer-taint)
32-
add_subdirectory(goto-cc-cbmc)
33-
add_subdirectory(goto-cc-goto-analyzer)
34-
add_subdirectory(goto-diff)
29+
add_subdirectory(ansi-c)
30+
add_subdirectory(jbmc-strings)
3531
add_subdirectory(goto-instrument)
32+
add_subdirectory(cpp)
33+
add_subdirectory(strings-smoke-tests)
34+
add_subdirectory(cbmc-cover)
3635
add_subdirectory(goto-instrument-typedef)
36+
add_subdirectory(strings)
37+
add_subdirectory(invariants)
38+
add_subdirectory(goto-diff)
39+
add_subdirectory(test-script)
40+
add_subdirectory(goto-analyzer-taint)
41+
add_subdirectory(cbmc-java-inheritance)
3742
if(NOT WIN32)
3843
add_subdirectory(goto-gcc)
3944
endif()
40-
add_subdirectory(invariants)
41-
add_subdirectory(jbmc-strings)
42-
add_subdirectory(strings)
43-
add_subdirectory(strings-smoke-tests)
44-
add_subdirectory(test-script)
45+
add_subdirectory(goto-cc-cbmc)
46+
add_subdirectory(cbmc-cpp)
47+
add_subdirectory(goto-cc-goto-analyzer)
48+

regression/Makefile

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
DIRS = ansi-c \
2-
cbmc \
3-
cbmc-cover \
4-
cbmc-cpp \
1+
# For the best possible utilisation of multiple cores when
2+
# running tests in parallel, it is important that these directories are
3+
# listed with decreasing runtimes (i.e. longest running at the top)
4+
DIRS = cbmc \
55
cbmc-java \
6-
cbmc-java-inheritance \
7-
cpp \
86
goto-analyzer \
9-
goto-analyzer-taint \
10-
goto-cc-cbmc \
11-
goto-cc-goto-analyzer \
12-
goto-diff \
13-
goto-gcc \
7+
ansi-c \
8+
jbmc-strings \
149
goto-instrument \
10+
cpp \
11+
strings-smoke-tests \
12+
cbmc-cover \
1513
goto-instrument-typedef \
16-
invariants \
1714
strings \
18-
jbmc-strings \
19-
strings-smoke-tests \
15+
invariants \
16+
goto-diff \
2017
test-script \
18+
goto-analyzer-taint \
19+
cbmc-java-inheritance \
20+
goto-gcc \
21+
goto-cc-cbmc \
22+
cbmc-cpp \
23+
goto-cc-goto-analyzer \
2124
# Empty last line
2225

2326
# Tests under goto-gcc cannot be run on Windows, so appveyor.yml unlinks

0 commit comments

Comments
 (0)