Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portfolio of parallel solvers #2420

Merged
merged 40 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3a08d45
First attempt to have parallel solvers
ggrieco-tob Apr 3, 2021
d020669
busy waiting
ggrieco-tob Apr 3, 2021
8cb473a
fix
ggrieco-tob Apr 3, 2021
bf1001d
fixes
ggrieco-tob Apr 4, 2021
4ffa946
linted
ggrieco-tob Apr 4, 2021
265fd3f
fixed mypy types
ggrieco-tob Apr 4, 2021
a04590d
fixed tests
ggrieco-tob Apr 4, 2021
9d8e6fd
fixes
ggrieco-tob Apr 5, 2021
996060b
linted
ggrieco-tob Apr 5, 2021
46277c2
fixed mypy types
ggrieco-tob Apr 5, 2021
8ffc327
adjusted the number of workers
ggrieco-tob Apr 5, 2021
da601c9
randomize solvers
ggrieco-tob Apr 5, 2021
5f6342d
simplified code
ggrieco-tob Apr 6, 2021
6b462f4
fix
ggrieco-tob Apr 7, 2021
21eb57c
Merge branch 'master' of ssh://github.com/trailofbits/manticore into …
ggrieco-tob Apr 7, 2021
6528379
Merge remote-tracking branch 'origin/master' into dev-solver-parallel
ggrieco-tob Apr 7, 2021
a56054b
fixes
ggrieco-tob Apr 8, 2021
abda240
use portfolio by default
ggrieco-tob Apr 8, 2021
66d80fc
use the portfolio solver by default in the detectors (and reverted la…
ggrieco-tob Apr 8, 2021
f62d6ca
rewrote the recv function
ggrieco-tob Apr 9, 2021
cee68e8
fixes
ggrieco-tob Apr 9, 2021
0b09366
fixes
ggrieco-tob Apr 9, 2021
0d2d9f5
use the portfolio solver by default in the general evm tests
ggrieco-tob Apr 9, 2021
73e1508
fix
ggrieco-tob Apr 9, 2021
43614b4
more fixes
ggrieco-tob Apr 9, 2021
ff6e9a8
fixes
ggrieco-tob May 5, 2021
6b66a3a
fix
ggrieco-tob May 5, 2021
2a0f076
merge
ggrieco-tob May 6, 2021
2944bde
fix
ggrieco-tob May 6, 2021
a39e1c4
fix
ggrieco-tob May 6, 2021
6d57e18
fix
ggrieco-tob May 10, 2021
ec5f5a2
fixes
ggrieco-tob May 11, 2021
2a3f8d2
fix
ggrieco-tob May 11, 2021
f5daaa0
Merge branch 'master' into dev-solver-parallel
May 11, 2021
97b1e0d
merge
ggrieco-tob Jun 8, 2021
e0ee975
Merge branch 'dev-solver-parallel' of ssh://github.com/trailofbits/ma…
ggrieco-tob Jun 8, 2021
0c75d3e
code refactoring
ggrieco-tob Jun 8, 2021
0d6b1de
mypy fix
ggrieco-tob Jun 8, 2021
8e97c5c
linted code
ggrieco-tob Jun 8, 2021
c5a5744
Merge branch 'master' into dev-solver-parallel
ggrieco-tob Jun 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions manticore/core/manticore.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
default=False,
description="If True enables to run workers over the network UNIMPLEMENTED",
)
consts.add("procs", default=10, description="Number of parallel processes to spawn")
consts.add("procs", default=12, description="Number of parallel processes to spawn")
ekilmer marked this conversation as resolved.
Show resolved Hide resolved

proc_type = MProcessingType.threading
if sys.platform != "linux":
Expand Down Expand Up @@ -380,8 +380,10 @@ def __init__(
raise TypeError(f"Invalid initial_state type: {type(initial_state).__name__}")
self._put_state(initial_state)

nworkers = max(consts.procs / initial_state._solver.ncores, 1)
nworkers = int(nworkers)
ekilmer marked this conversation as resolved.
Show resolved Hide resolved
# Workers will use manticore __dict__ So lets spawn them last
self._workers = [self._worker_type(id=i, manticore=self) for i in range(consts.procs)]
self._workers = [self._worker_type(id=i, manticore=self) for i in range(nworkers)]

# Create log capture worker. We won't create the rest of the daemons until .run() is called
self._daemon_threads: typing.Dict[int, DaemonThread] = {
Expand Down
Loading