Skip to content

Document and cap self-energy worker CPU usage#13

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-review-suggestion
Draft

Document and cap self-energy worker CPU usage#13
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-review-suggestion

Conversation

Copy link
Copy Markdown

Copilot AI commented May 25, 2026

The review comment requested documenting the newly added n_cpus argument for compute_all_self_energy and clarifying how it interacts with n_jobs and memory-based limiting.

  • CPU cap behavior
    • _get_safe_n_jobs accepts an optional n_cpus cap and applies it before memory-based limiting.
  • Public API docs
    • compute_all_self_energy now documents n_cpus and its interaction with n_jobs and memory limits.
  • Test coverage
    • Added a targeted unit test validating that n_cpus caps auto-detected worker counts.
safe_n_jobs = _get_safe_n_jobs(
    lead_L,
    lead_R,
    requested_n_jobs=n_jobs,
    kpoint=sample_kpoint,
    n_cpus=n_cpus,
)

Agent-Logs-Url: https://github.com/deepmodeling/dpnegf/sessions/14ad07fd-c349-47e3-9ee7-c41958feca83

Co-authored-by: AsymmetryChou <73353910+AsymmetryChou@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code according to review comment Document and cap self-energy worker CPU usage May 25, 2026
Copilot AI requested a review from AsymmetryChou May 25, 2026 09:30
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