solver: remove internal errors in the solver#51642
Conversation
|
Not noticeable in github actions |
d36d9c6 to
0eaa8eb
Compare
|
@becker33 Are you fine with this? Internal errors are parsed from |
|
I really don't think this is a good idea. The error messages aren't good, but they're the only thing that tells us anything about which constraint is being violated. The first thing I do with a concretizer error that doesn't report one is make sure to add more of them until I start seeing one of them, and then I know where to start debugging. |
You can also add :- <constraint>, internal_error("<debug msg>").and: error(10, "<debug msg>") :- <constraint>.In any case, |
|
Yeah I agree these errors don't tell a user anything useful. But I disagree that it makes them useless. It's much better to give the user "something bad happened, here's the string to give the developers so they can figure it out" than to give them "nope, bad things happened. go away". But that's besides the point, I think those strings are really there for us to help with debugging and I'm surprised other folks don't find them essential to that effort. |
Never used internal errors to debug ASP, to be honest. Also, I'm not suggesting to tell users to go away 🙂 I'm just saying that between: $ spack solve zlib-ng
==> Error: Spack concretizer internal error. Please submit a bug report at https://github.com/spack/spack and include the command and environment if applicable.and: $ spack solve zlib-ng
==> Error: Spack concretizer internal error. Please submit a bug report and include the command, environment if applicable and the following error message.
zlib-ng is unsatisfiable, errors are:
internal_error("Only nodes and virtual_nodes can have version satisfaction")there isn't a lot of added value for users. In any case we should avoid parsing |
|
I'll submit a competing PR to cache the symbols, but I'd like to get rid of this part of the code - it's also one of the things that are different from the solve done within Spack and outside of Spack. |
I'm getting a 10% speedup of unit tests locally. That's saving me more time than those internal errors when troubleshooting concretization bug reports. To me the time saved from day to day is more important. |
38a72d9 to
eb89b99
Compare
|
I just re-run unit tests locally against 6a44ce5 using: $ pytest -n 8 --dist=loadfiledevelop This PR So, for me locally it's runtime reduced by 20% on this specific pair of runs.1 Footnotes
|
3075753 to
2e5f3bc
Compare
becker33
left a comment
There was a problem hiding this comment.
There are several methods on the Result class that should be removed as part of this PR.
format_coresformat_minimal_coresminimal_coresminimize_coreformat_core
We should also remove the assumptions field from the SpackSolverSetup class, and the assumptions key from the solve_kwargs dict.
We can probably also remove the cores and control fields from the Result class, as well as all the code for managing and setting them.
2e5f3bc to
d6f374e
Compare
|
@becker33 Done. Ready for a re-review. |
`internal_error` facts are parsed from `concretize.lp`, which happens hundreds of times during unit tests. Since they don't improve the error message substantially, just remove them to get faster CI. Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
d6f374e to
b74e605
Compare
internal_errorfacts are parsed fromconcretize.lp, which happens hundreds of times during unit tests. Since they don't improve the error message substantially, just remove them to get faster CI.Results on:
Before
After
