Skip to content

feat: use npsim -j/--numberOfThreads in workflows - #434

Open
wdconinc wants to merge 2 commits into
masterfrom
npsim-j
Open

wdconinc wants to merge 2 commits into
masterfrom
npsim-j

Conversation

@wdconinc

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

This PR adds -j to the npsim runs in the workflows. Slightly more efficient but more importantly it's functionality we want to ensure is exercised in a place where we can see diffs.

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue: npsim -j)
  • Optimization (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

Copilot AI lite review requested due to automatic review settings September 22, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The workflow changes use --numberOfThreads while the PR title/description state the goal is to exercise npsim -j, so the implementation and stated intent should be aligned.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

This PR updates the CI simulation runs to request multi-threaded execution in npsim, aiming to exercise thread-parallel behavior in a workflow where output diffs are visible.

Changes:

  • Add a per-run thread count argument to npsim in the “gun” workflow simulation step.
  • Add the same thread count argument to npsim in the DIS workflow simulation step.
File Description
.github/​workflows/​build-push.yml Adds CPU-thread-based parallelism configuration to npsim runs in CI workflows.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/build-push.yml
run: |
source /opt/detector/epic-main/bin/thisepic.sh
npsim \
--numberOfThreads $(getconf _NPROCESSORS_ONLN) \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that event-by-event reproducible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is designed to be (that's the part that took the two years; just getting stuff to be multithreaded isn't hard).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also enforced in DD4hep CI by running test simulations at multiple thread counts and only allowing out-of-order events, but otherwise requiring identity.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Capybara summary for PR 434

@wdconinc wdconinc changed the title feat: use npsim -j in workflows feat: use npsim -j/--numberOfThreads in workflows Sep 22, 2026
Copilot AI lite review requested due to automatic review settings October 8, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The workflow change is minimal, consistent across both npsim invocations, and does not introduce any apparent correctness or CI-configuration issues.

0 open findings

1 resolved since last review

🧠 Review effort: Lite

This branch was successfully deployed

1 active deployment
github-pages — 72d7bcdb Deployed Oct 8, 2026 by wdconinc via deploy-artifacts-page #4289
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.

3 participants