Skip to content

Make cycle detection optional, to speed-up grounding and solving#38587

Closed
alalazo wants to merge 1 commit intospack:developfrom
alalazo:solver/avoid_enforcing_absence_of_cycles_in_asp
Closed

Make cycle detection optional, to speed-up grounding and solving#38587
alalazo wants to merge 1 commit intospack:developfrom
alalazo:solver/avoid_enforcing_absence_of_cycles_in_asp

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Jun 27, 2023

Extracted from #38447

A detailed profiling showed that computing paths is a very time consuming operation, even for our moderately small DAGs. Avoiding the computation of all possible paths speeds-up the solver greatly.

Currently we just assume that a solution has no cycle, and if we detect cycles after a fast solve, we fall back to recompute with the cycle detection rule enabled in ASP.

@spackbot-app spackbot-app bot added the core PR affects Spack core functionality label Jun 27, 2023
@alalazo alalazo force-pushed the solver/avoid_enforcing_absence_of_cycles_in_asp branch from a6b28ce to a848218 Compare June 27, 2023 12:12
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Jun 27, 2023

radiuss.a8482188a3911bb475cab08c990ff14621089fdf.csv
radiuss.txt
radiuss.develop.csv

develop: ab10b64
PR: a848218

radiuss

Table results
Spec solved Total time [develop, secs.] Total time [PR, secs.] Speedup [%]
aluminum 16.5196 9.91313 39.9918
ascent 34.8887 25.2956 27.4965
axom 33.4953 23.8483 28.8011
blt 15.5509 9.87819 36.4785
caliper 16.6038 10.7399 35.3164
care 18.0125 11.5426 35.9192
chai 16.9916 11.1167 34.5754
conduit 17.5482 11.3916 35.0837
dihydrogen 17.7962 12.1227 31.8802
flux-core 16.9423 10.5252 37.876
flux-sched 17.0717 10.5817 38.0159
flux-security 15.8433 9.72876 38.5937
glvis 32.6045 22.5783 30.7511
hydrogen 17.159 11.1505 35.0168
hypre 18.5629 12.1392 34.6051
lbann 34.1581 23.9789 29.8003
lvarray 22.1816 14.7164 33.6548
mfem 30.7452 22.1693 27.8933
py-hatchet 21.3366 12.0511 43.5191
py-maestrowf 17.3604 10.7609 38.0147
py-merlin 18.6975 11.0834 40.7226
py-shroud 15.5136 9.51647 38.6571
raja 16.1953 9.98528 38.3445
samrai 15.8303 9.66025 38.9762
scr 17.7084 10.3433 41.5912
sundials 27.2129 18.7805 30.9867
umpire 16.0796 10.2071 36.5215
visit 33.8808 67.329 -98.7229
xbraid 16.1668 9.78267 39.4892
zfp 15.5569 10.2322 34.227

visit is twice as slow since it first fails the fast concretization and then it falls back to the previous logic program with cycle detection.

@alalazo alalazo deleted the solver/avoid_enforcing_absence_of_cycles_in_asp branch August 16, 2023 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

concretization core PR affects Spack core functionality performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant