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

Set z3 memory limit #204

Open
daejunpark opened this issue Oct 11, 2023 · 2 comments
Open

Set z3 memory limit #204

daejunpark opened this issue Oct 11, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@daejunpark
Copy link
Collaborator

For some nonlinear queries, the peak memory usage of z3 may be quite high. If the system memory is not enough (e.g., the Github-hosted ubuntu and windows runners), such z3 process may be killed due to OOM, crashing halmos.

To prevent this, introduce an additional option, say --solver-max-memory, that sets the max memory of z3:

solver.set(max_memory=<size-in-megabytes>)

Also, set the default max memory of z3, based on the system memory size, e.g., using psutil.

@daejunpark daejunpark added the enhancement New feature or request label Oct 11, 2023
@daejunpark daejunpark self-assigned this Oct 11, 2023
@daejunpark
Copy link
Collaborator Author

Related to #125

@aviggiano
Copy link
Contributor

I think max_memory could be automatically set by default to e.g. 80%-90% of the system capacity. Then advanced users can override this value with --solver-max-memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants