Skip to content

Parallelize refinement check using threads and message passing#117

Draft
seblund wants to merge 3 commits intomainfrom
parallel-refine
Draft

Parallelize refinement check using threads and message passing#117
seblund wants to merge 3 commits intomainfrom
parallel-refine

Conversation

@seblund
Copy link
Member

@seblund seblund commented Sep 6, 2022

As requested in #112: Make use of multi-threading in the refinement check.

Introduces a pretty simple parallelization of the refinement check, which can grow to be more complicated in the future.

The refinement check now initializes a set of worker threads that receive state pairs through a channel. The worker threads send back the results to a shared dispatcher which determines when the check is done.

The parallelization uses message passing for sending state pairs between the workers and dispatcher while the workers have a shared state PassedList behind a mutex.

The overhead of starting threads slows down very fast small queries but makes medium and large queries much faster.

Reveaal can now use all cores instead of just one!

In the future we should probably pass around a thread pool instead of initializing one at every check. When we allow evaluation of multiple queries in parallel we will also need to split resources, as queries shouldn't all use the same logical cores.

@seblund seblund marked this pull request as draft September 7, 2022 11:35
Base automatically changed from bench to main September 7, 2022 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant