flux-framework / flux-sched

Fluxion Graph-based Scheduler
GNU Lesser General Public License v3.0
84 stars 39 forks source link

Add planner reinitialization for elasticity #1156

Closed zekemorton closed 3 weeks ago

zekemorton commented 2 months ago

When either growing or shrinking the resource graph, there is no means of reinitializing the planner with the proper resource counts. If the planner is not reinitialized, the original totals from when the graph was created will remain. If it is initialized again, it will loose all allocated counts. This PR combined with the effort from converting planner_multi into a boost multi index address this issue.

This PR adds a check in the initialization function to see if a planner already exists, and if it does, it updates the total counts rather than creating a new planner without the allocated counts.

codecov[bot] commented 3 weeks ago

Codecov Report

Merging #1156 (8f26972) into master (1c68ec6) will decrease coverage by 3.0%. Report is 34 commits behind head on master. The diff coverage is 66.6%.

:exclamation: Current head 8f26972 differs from pull request most recent head 04835ad. Consider uploading reports for the commit 04835ad to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1156 +/- ## ======================================== - Coverage 73.9% 70.9% -3.0% ======================================== Files 103 96 -7 Lines 14396 12872 -1524 ======================================== - Hits 10644 9138 -1506 + Misses 3752 3734 -18 ``` | [Files](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1156?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework) | Coverage Δ | | |---|---|---| | [resource/traversers/dfu\_impl.cpp](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1156?src=pr&el=tree&filepath=resource%2Ftraversers%2Fdfu_impl.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-cmVzb3VyY2UvdHJhdmVyc2Vycy9kZnVfaW1wbC5jcHA=) | `82.8% <66.6%> (-0.2%)` | :arrow_down: | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1156/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework)
zekemorton commented 3 weeks ago

@milroy looks like it wants another approval after rebasing