Skip to content

Document LAYUP_NUM_WORKERS, and correct the --num-workers help - #464

Open
matthewholman wants to merge 1 commit into
mainfrom
docs/num-workers
Open

Document LAYUP_NUM_WORKERS, and correct the --num-workers help#464
matthewholman wants to merge 1 commit into
mainfrom
docs/num-workers

Conversation

@matthewholman

Copy link
Copy Markdown
Collaborator

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 a docs/parallelism.rst page in the toctree.

Also a defect #462 left behind: all four CLI verbs — orbitfit, convert, comet, predict — 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 running 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 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_WORKERS when 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 from OMP_NUM_THREADS, which controls threads within a worker.

No behaviour change. CLI tests pass (36).

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>
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.

add to documentation about overriding number of workers

1 participant