Very brittle propagator-check performance
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- performance
Research direction
Start by reproducing the commands against tests/investigate/slowdown.16.next.lp, slowdown.16.yext.lp, slowdown.17.next.lp, and slowdown.17.yext.lp, including the 1000-sized instance. Compare behavior with and without the unused #external declaration, then trace the propagator check and clasp literal-ordering effects; done means identifying and documenting the source of the performance discrepancy.
Written by the indexing model from the issue text.
Description
I came across strange performance behavior with the propagator with the option check_only=True.
In a simple problem with a domain of size 16,17, or 1000, for one variable, depending on whether an external atom declaration is present, the performance changes dramatically. The external atom is not referenced anywhere. The discrepancy does not depend on grounding.
The presence of the external atom changes slightly the ordering of the literals clasp uses internally but the magnitude of the impact surprises me (I'd have expected a *2 factor at most).
@kstrauch94 and @MaxOstrowski , any clue what could be happening?
clingo tests/investigate/slowdown.16.next.lp -q | grep Unsat
Time : 0.082s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
clingo tests/investigate/slowdown.16.yext.lp -q | grep Unsat
Time : 0.090s (Solving: 0.01s 1st Model: 0.01s Unsat: 0.00s)
clingo tests/investigate/slowdown.17.next.lp -q | grep Unsat
Time : 9.994s (Solving: 9.92s 1st Model: 9.91s Unsat: 0.00s)
clingo tests/investigate/slowdown.17.yext.lp -q | grep Unsat
Time : 47.599s (Solving: 47.52s 1st Model: 47.52s Unsat: 0.00s)
clingo tests/investigate/slowdown.1000.next.lp -q | grep Unsat
Time : 1.914s (Solving: 1.64s 1st Model: 1.04s Unsat: 0.00s)
clingo tests/investigate/slowdown.1000.next.lp -q | grep Unsat
[interrupted after 300s]
Instance:
#const int_domain_size = 16. % or 17 or 1000
#external neverUsed. % or commented out
variable_declare(x,fromFacts).
variable_domain(x,val(int,1..int_domain_size)).
variable_define(y,operation(add,(variable(x),(val(int,1),())))).
ensure(max_domain_value,operation(eq,(variable(y),(val(int,int_domain_size+1),())))).
Tested on commit afee4769b8839efa949daf86c6acaa6fd5495eb2
- Dominant language
- Python
- Stars
- 4
- Forks
- 0
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from potassco/constraint-handler
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
potassco/constraint-handler#276 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
potassco/constraint-handler#216 · 6 comments ·
Maintainers usually reply within 1 day
-
constraint-handler 2
Difficulty 5/5 Over a week Newbie friendliness 25/100
potassco/constraint-handler#491 · 2 comments ·
Maintainers usually reply within 1 day
-
Multiple definitions that agree with each otherPossibly taken @AbdallahS claimed this 1 day ago. Openconstraint-handler 2
potassco/constraint-handler#490 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
potassco/constraint-handler#489 ·
Maintainers usually reply within 1 day
All issues in potassco/constraint-handler
Similar issues
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
backend bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
nolte/kamerplanter#3193 ·
Maintainers usually reply within 1 day
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwisePossibly taken @abdulwaarith0 claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MakazhanAlpamys/Soup#3690 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day