docs(accounting): say that a TRES dimension of 0 is ignored, not blocking - #788
docs(accounting): say that a TRES dimension of 0 is ignored, not blocking#788nikhilsk wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #788 +/- ##
=======================================
Coverage 80.15% 80.15%
=======================================
Files 184 184
Lines 87772 87772
=======================================
+ Hits 70348 70349 +1
+ Misses 17424 17423 -1 🚀 New features to boost your workflow:
|
…king The limit-values section tells operators that a literal 0 means "block all" and explicitly not "no limit". That holds for job counts and wall time, but every TRES gate compares a dimension only when its cap is above zero, so maxtresperjob=cpu=0 leaves CPU uncapped. Someone reading the page would expect the opposite and get no error telling them otherwise. Documented where the TRES semantics live, with a pointer from the 0 rule that currently overstates its reach.
dc168d9 to
22fc836
Compare
There was a problem hiding this comment.
🟡 Changes recommended
One new sentence is slightly misleading (“stop a scope from running anything”) given the recommended setting actually blocks submissions, so the wording should be tightened for accuracy.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the accounting admin guide to document an important nuance in limit semantics: unlike job-count and wall-time limits, a TRES dimension set to 0 is treated as “uncapped” (ignored) rather than “block all”, aligning operator expectations with actual scheduler behavior.
Changes:
- Add a cross-reference from the general “
0means block all” rule to clarify that TRES dimensions behave differently. - Introduce a dedicated subsection explaining that
maxtres*/grptresdimensions at0are ignored while other dimensions in the same TRES string remain enforced.
File summaries
| File | Description |
|---|---|
| docs/admin-guide/accounting.rst | Clarifies and cross-references the special-case semantics for 0 within TRES caps. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| A resource therefore cannot be denied by capping it at ``0``. To keep jobs off a | ||
| resource, leave it out of what they request; to stop a scope from running | ||
| anything, use ``maxsubmitjobs=0``. |
Summary
The "Limit values" section of the accounting guide tells operators that a literal
0means block all and explicitly does not mean "no limit". That is true for job counts and wall time, but not for TRES:tres_cap_breachand its account-side twin compare a dimension only when its cap is above zero, somaxtresperjob=cpu=0leaves CPU uncapped rather than rejecting every job.An operator following the page would expect the exact opposite, and nothing errors to correct them — the cap is simply never applied.
Approach
The detail is documented where the TRES semantics already live, as a new
A TRES dimension of 0 is ignored, not "block all"subsection, with a short pointer from the0rule that currently overstates its reach. Both directions are cross-referenced so a reader arriving at either place learns the distinction.The behaviour itself is left alone. It matches Slurm, and changing it would silently turn existing
0dimensions in deployed configs into blocks.Scope
Docs only, no behaviour change. This was raised by an automated review comment on #746; the wording it commented on is pre-existing on
mainand unrelated to that PR, so it is fixed here on its own rather than folded in.Testing
Confirmed against the code that every TRES cap behaves as described:
max_tres_per_job,max_tres_per_userandgrp_tresall route through the zero-guarded comparison incrates/spur-core/src/qos.rs, and the account association path repeats the same guard incrates/spur-core/src/account_limits.rs.crates/spur-core/src/accounting.rsalready carries a test namedexceeded_caps_treats_a_zero_tres_dimension_as_uncappedasserting it.Ran the repo's
pyspellingconfig overdocs/: the new prose adds no unknown words. The full sphinx build could not run locally — the pinned doc toolchain needs Python 3.11 and this host has 3.10 — sosphinx-build -Wis left to CI.