Document LAYUP_NUM_WORKERS, and correct the --num-workers help - #464
Open
matthewholman wants to merge 1 commit into
Open
Document LAYUP_NUM_WORKERS, and correct the --num-workers help#464matthewholman wants to merge 1 commit into
matthewholman wants to merge 1 commit into
Conversation
The environment override added in #462 was documented only in a docstring, so there was no way for a user to discover it. Adds a short README section and a docs page in the toctree. Also fixes something #462 left behind: all four CLI verbs still described -1 as "uses all available CPUs", which stopped being true. It now resolves to $LAYUP_NUM_WORKERS if set, else 1 when layup is already inside another worker process, else the CPUs actually available (the affinity mask on Linux, so taskset and cgroup limits are respected). Wrong help text is worse than absent documentation, so that is the part of this that is a defect rather than an addition. Closes #463. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #463.
The ask:
LAYUP_NUM_WORKERS(added in #462) existed only in a docstring, so a user had no way to find it. Adds a short README section and adocs/parallelism.rstpage in the toctree.Also a defect #462 left behind: all four CLI verbs —
orbitfit,convert,comet,predict— still described-1as "uses all available CPUs", which stopped being true. It now resolves to$LAYUP_NUM_WORKERSif set, else1when layup is already running inside another worker process, else the CPUs actually available (the affinity mask on Linux, sotasksetand cgroup limits are respected).Wrong help text is worse than missing documentation, so that part is a fix rather than an addition.
Text kept deliberately short in all three places, with the one thing a user actually needs to decide: set
LAYUP_NUM_WORKERSwhen layup does not own the whole machine — your own process pool, or one of several jobs on a shared node — and note that it is separate fromOMP_NUM_THREADS, which controls threads within a worker.No behaviour change. CLI tests pass (36).