Skip to content

shell: determine node & core resource counts from R during init #6705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sam-maloney
Copy link
Contributor

Problem: counts for resources are currently being parsed only from jobspec, but if/once ranges are used then values cannot be determined.

Modify shell init data flow to use the actual allocation from the scheduler in R, if present, to determine resource counts for nodes & cores in jobspec_parse.

As a first step, this checks whether a resource set struct was passed to jobspec_parse, and otherwise leaves the original codepath unchanged. The slot count must still be parsed from the jobspec regardless, because it is missing from R.

The concept for this is also essentially separated off from #6632, albeit with a fair bit of re-working to keep the changes as minimal as possible. Because flux-sched already has basic support for ranges, this PR already allows jobspec with ranges for nodes and/or cores to run successfully.

@grondo
Copy link
Contributor

grondo commented Mar 13, 2025

This is great! The changes look minimal and understandable so I'll try to get a review done soon. Thanks!

Problem: counts for resources are currently being parsed only from
jobspec, but if/once ranges are used then values cannot be determined

Modify shell init data flow to use the actual allocation from the
scheduler in R, if present, to determine resource counts
@sam-maloney sam-maloney force-pushed the use-R-in-jobspec-parse branch from f031c37 to 62af7bc Compare March 21, 2025 08:38
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 72.97297% with 10 lines in your changes missing coverage. Please review.

Project coverage is 83.80%. Comparing base (a718ef5) to head (62af7bc).
Report is 104 commits behind head on master.

Files with missing lines Patch % Lines
src/shell/jobspec.c 73.52% 9 Missing ⚠️
src/shell/info.c 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6705   +/-   ##
=======================================
  Coverage   83.80%   83.80%           
=======================================
  Files         534      534           
  Lines       89164    89196   +32     
=======================================
+ Hits        74720    74754   +34     
+ Misses      14444    14442    -2     
Files with missing lines Coverage Δ
src/shell/info.c 76.47% <66.66%> (ø)
src/shell/jobspec.c 79.74% <73.52%> (-2.00%) ⬇️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants