Description
While implementing parallel solvers for Goblint, it became apparent that the timing functions used in Goblint are not thread-safe. Thus, issues arise, when multiple domains running in parallel call the Timing.wrap
function
The execution with more than one parallel Domain often fails because of an assertion error in the exit
function in the module Make
of goblint_timing.ml
(line 134: assert (tree.name = name)
). I assume the likely cause for that is that the current
stack is not thread-safe.
We need a thread-safe way of Timing in Goblint.
Furthermore, it has to be decided how timing would even work with multiple parallel Domains.
When two Domains run in parallel and both provide a time value for a specific timed section, how would these time contributions be merged? Is it more reasonable to add these values or to use the largest value? Adding would more accurately show the work done, but would ignore the potential speedup through parallelization. Thus a final timing value generated by adding parallel times could potentially be longer than the whole run of Goblint.