Skip to content

Fix scan platform probes: own-cgroup memory limit, OMP_PLACES binding, scan file growth on rerun - #817

Open
jtravs wants to merge 3 commits into
mainfrom
fix/scan-platform-probes
Open

jtravs wants to merge 3 commits into
mainfrom
fix/scan-platform-probes

Conversation

@jtravs

@jtravs jtravs commented Nov 13, 2026

Copy link
Copy Markdown
Contributor
  • Scan workers are sized from the root cgroup's memory limit, and a failing probe raises outside SolpropError #170: scan admission reads the tightest memory limit on the process's own cgroup path (v2 memory.max and v1 memory.limit_in_bytes, walking up to the mount) instead of the root group's. A malformed limit file or a malformed SOLPROP_SCAN_CPU_OFFSET/COUNT raises DriverError naming it. The path walk is shared with the existing CPU-quota reader. Tests use fake cgroup trees.
  • OMP_PLACES without OMP_PROC_BIND caps every thread pool at the bound core #172: allowed_cpus treats binding as on when OMP_PROC_BIND is anything but false, or when it is unset and OMP_PLACES is set, as libgomp does. Checked on Linux with libgomp: OMP_PLACES=cores alone bound the main thread to one core. libomp was not checked.
  • A scan file grows on every rerun, even when no point changed #169: a scan rerun that commits nothing no longer rebuilds layouts. A durable current flag is cleared before a commit and set after the rebuild is flushed, so an interrupted close still rebuilds next time. No-op reruns now grow the file only by the execution row (~6 kB here, HDF5's per-dataset cost). A rerun that commits points still copies layouts; that cost is documented in the guide, and a follow-up is proposed separately.

Closes #170
Closes #172
Closes #169

🤖 Generated with Claude Code

https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH

jtravs and others added 3 commits November 13, 2026 17:43
The scan admission read only the root cgroup's memory.max (and the v1
equivalent), so under a cgroup manager without Slurm variables the
workers were admitted against the whole machine. cgroup_memory in
solprop._process now follows /proc/self/cgroup up to the mount, as the
CPU quota reader does, taking the tightest memory.max or
memory.limit_in_bytes. An unreadable or malformed limit file and a
malformed SOLPROP_SCAN_CPU_OFFSET or SOLPROP_SCAN_CPU_COUNT now raise
DriverError naming the file or variable.

Closes #170

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
libgomp binds the main thread to its first place when OMP_PLACES is set
and OMP_PROC_BIND is unset (measured with OMP_PLACES=cores: one core's
two hardware threads). allowed_cpus checked only OMP_PROC_BIND, so that
binding was believed as the grant and every pool sized to one core.
OMP_PROC_BIND=false still turns binding off.

Closes #172

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
Every close deleted and rebuilt the consolidated layouts, and HDF5 does
not reclaim a deleted group's space, so an unchanged rerun grew the
file. A commit now marks the layouts stale durably before it writes,
and close rebuilds only stale layouts, so a run killed before
consolidating is still rebuilt by the next close. The guide states
what a rerun that commits points costs.

Closes #169

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
@jtravs
jtravs marked this pull request as ready for review November 13, 2026 19:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T19:31:30.555059Z 263d05f Draft marked ready
🔒 Security Review ✅ Completed 2026-11-13T19:33:03.038886Z 263d05f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant