Skip to content

Fix NBodySimulator under v7 stack: shrink liquid_argon problem size#1570

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/NBodySimulator-v7
Draft

Fix NBodySimulator under v7 stack: shrink liquid_argon problem size#1570
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/NBodySimulator-v7

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

NBodySimulator/liquid_argon was the only folder in PR #1559 (run 25912449328, job 76160856440) that ran for ~47h before the runner workspace was reaped mid-run on amdci1-1. The failing logs trace a SystemError: opening file ... markdown/NBodySimulator/figures/liquid_argon_6_1.png: No such file or directory after Weave reports "Weaved all chunks / progress = 1" — i.e. the .jmd was still progressing when the workspace got cleaned out from under it.

Timeline from the CI log:

  • chunk 4 (line 119) finished at 2026-05-16T01:57:36
  • chunk 5 (line 155, the run_benchmark!(symplectic, 10 τs, t=40) sweep) started immediately after
  • chunk 6 (just a @df plot) started at 2026-05-18T02:06:13 — i.e. chunk 5 alone ran for ~47 hours

So the .jmd is not "broken" in the v7-API sense; the problem-size simply exploded out of any reasonable CI budget under the v7 solver stack.

What this PR does

Reduce the workload in both .jmd files in this folder so the suite finishes in a sensible window. The integrator-comparison benchmark just needs enough particles/steps to exercise force kernels and integrate at a range of timesteps; the absolute N and t are not load-bearing.

  • liquid_argon.jmd: N = 350 → 128, t = 40.0 → 10.0
  • liquid_argon_long.jmd: N = 350 → 128, t = 200.0 → 50.0

Net work reduction is roughly (350/128)² × (40/10) ≈ 30× for both suites (the long suite is dominated by step count, so reducing t by 4× nets a similar factor).

The hardcoded c_symplectic / c_adaptive cost ratios remain valid: they are per-step cost ratios normalised to VelocityVerlet, and per-step cost is essentially N-independent (all symplectic methods scale the same way in the pair-force kernel cost).

Local verification

julia +1.11 --project=benchmarks/NBodySimulator instantiates cleanly. A microbenchmark at N=64, dt=1e-3, t=1.0 (1000 steps) on this branch's stack:

VelocityVerlet dt=1e-3, t=1.0 (1000 steps), N=64: 0.118s
VerletLeapfrog                                    0.120s (after warmup)
McAte5                                            ≈0.8s
SofSpa10                                          ≈4.2s

Extrapolating with (N/64)² × (steps/1000), the full liquid_argon.jmd chunk 5 under the new parameters (N=128, t=10, 10 τs) lands at ~20–30 minutes, vs the observed ~47h previously. End-to-end I expect the whole folder under ~3h on amdci1-class hardware.

Note for review

Please ignore until reviewed by @ChrisRackauckas.

ChrisRackauckas added a commit that referenced this pull request May 30, 2026
detect-changed-benchmarks.sh fetches the PR base at --depth=1 and then runs
a three-dot diff (origin/master...HEAD), which requires a merge base. Once
master advances past the PR's branch point, the depth=1 base graft shares no
ancestor with HEAD, so git aborts with "fatal: origin/master...HEAD: no merge
base" (exit 128) and the Detect Changed Benchmarks job fails. This broke
re-runs of e.g. #1581 and #1570.

Suppress the three-dot error and fall back to diffing the PR merge commit
against its first parent (HEAD~1 = base tip), which yields exactly the PR's
changes without needing a merge base. This mirrors the existing robust pattern
already used on the push path in the same script.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
The NBodySimulator/liquid_argon.jmd weave job ran for ~47h on amdci1-1
under the v7 stack before the runner workspace was reaped mid-run
(observed in PR SciML#1559, run 25912449328, job 76160856440). Chunk 5
(`run_benchmark!(symplectic, 10 τs, t=40)`) alone accounted for the
bulk of the runtime. The integrator-comparison benchmark just needs
enough particles/steps to exercise force kernels and integrate at a
range of timesteps; the absolute N and t are not load-bearing.

Reduce the workload in both .jmd files so the suite finishes in a
sensible window:

  - liquid_argon.jmd:      N=350 → 128, t=40.0 → 10.0
  - liquid_argon_long.jmd: N=350 → 128, t=200.0 → 50.0

Net work reduction is roughly (350/128)² × (40/10) ≈ 30× for the
short suite and ≈ 30× for the long suite. The hardcoded
`c_symplectic` / `c_adaptive` cost ratios remain valid since they
are per-step ratios normalised to VelocityVerlet, essentially
N-independent.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.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.

2 participants