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

Stack overflow when running ILP extraction, but only after adding an objective function #56

Closed
gussmith23 opened this issue Oct 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@gussmith23
Copy link
Owner

Strange bug I've been hunting all day.

Originally, I'd set up the most basic set of constraints in an ILP program and pushed it through the solver. I realized, though, that without an objective function, it will just set all of the values to 1.0. So I chose the most basic objective I could: minimize the sum of all of the eclass boolean variables. In some sense, it's like extracting the smallest program, as we do with the normal egg extractor.

I started running into a bunch of problems, though, with the stack overflowing.

First, some routines inside of lp-modeler were not happy with the size of the model, it seemed. I was running into this problem: rust-or/rust-lp-modeler#37

Then, though I think (I'm not sure, should check) that I sidestepped those issues by avoiding having the problematic routines run in lp-modeler, I'm still getting stack overflows. Strangely, I'm having trouble tracking them down, too. They may also be happening during panic!(), as I've put some panic!()s in for testing. (A solution Jared suggested is to use exit() instead of panic!() to avoid unwinding the stack...there may be issues with this still on Mac).

I've tried upping the stack size, but initial testing doesn't seem to indicate that it's helping. Also, doing this in a sustainable way with cargo seems like a pain! I've been avoiding doing it, but may be stuck now.

I am also going to try running on the linux machine. Maybe the easiest way out.

@gussmith23 gussmith23 added the bug Something isn't working label Oct 13, 2020
@gussmith23 gussmith23 added this to the 2020week42 milestone Oct 13, 2020
@gussmith23 gussmith23 self-assigned this Oct 13, 2020
@gussmith23
Copy link
Owner Author

This seems to all be related to the fact that I need to recurse through the egraph, which is seemingly always going to cause a stack overflow on my Mac. And upping the stack size on Mac doesn't seem trivial.

@gussmith23
Copy link
Owner Author

This was due to a bug in the worklist creation algorithm 😓 this may come back up in the future, but for now it's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant