Open kmemarian opened 2 weeks ago
cc @yav
I don't see a way around (1), but we could change (2) to start a solver only when it needs to evaluate in the context of a model, and end the solver when it is done. It will likely make model evaluation a bit slower because we'll pay the start up cost multiple times, but I am not sure if that matters.
Another option for (2) would be to change the API to bracket calls to the model evaluator (e..g, something like with_model_evaluator f
where f
will be given a solver setup with the particular model.
Thoughts?
When running the CN ci tests (
tests/run-cn.sh
) on macOS (tested on 14.5) 10 tests fail because thecn
process runs out of file descriptors (the macOS's default soft limit appears to be 256):I think that the issue is a result of:
Simple_smt.new_solver
opens 3 pipes as a result of the call toUnix.open_process_args_full
.Solver.model_evaluator _ _
(called fromSolver.provable
) creates a new solver, whose lifetime extends until the end of the execution of CN (?).