Skip to content

Commit

Permalink
Merge pull request flux-framework#1314 from milroy/issue-1260
Browse files Browse the repository at this point in the history
Don't prune traversal by leaf vertex subplans
  • Loading branch information
mergify[bot] authored Nov 7, 2024
2 parents 1c1f8d6 + ee57490 commit 8183356
Show file tree
Hide file tree
Showing 7 changed files with 2,436 additions and 40 deletions.
8 changes: 8 additions & 0 deletions resource/traversers/dfu_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ int dfu_impl_t::by_subplan (const jobmeta_t &meta,
int saved_errno = errno;
planner_multi_t *p = (*m_graph)[u].idata.subplans[s];

if (!p) {
// Subplan is null if u is a leaf.
// TODO: handle the unlikely case
// where the subplan is null for another
// reason
rc = 0;
goto done;
}
if (resource.user_data.empty ()) {
// If user_data is empty, no data is available to prune with.
rc = 0;
Expand Down
2 changes: 2 additions & 0 deletions t/data/resource/commands/advanced/cmds06.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
match allocate @TEST_SRCDIR@/data/resource/jobspecs/issues/issue1260.yaml
quit
19 changes: 19 additions & 0 deletions t/data/resource/expected/advanced/006.R.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---------ssd0[1024:x]
------------core0[1:x]
------------core1[1:x]
------------core2[1:x]
------------core3[1:x]
------------core4[1:x]
------------core5[1:x]
------------core6[1:x]
------------core7[1:x]
------------core8[1:x]
------------core9[1:x]
---------compute-01[1:x]
------rack0[1:s]
---compute0[1:s]
INFO: =============================
INFO: JOBID=1
INFO: RESOURCES=ALLOCATED
INFO: SCHEDULED AT=Now
INFO: =============================
Loading

0 comments on commit 8183356

Please sign in to comment.