Repository navigation
Make 32-bit GBM Monte-Carlo test deterministic (seed the solve) - #101
Conversation
Seed the 32-bit EnsembleProblem solve with seed=12345 so testerr is reproducible to the last digit. 64-bit path untouched. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Agent-Harness: opencode CLI Agent-Model: opencode-go/muse-spark-1.3-contributor Agent-Session: local session ses_e73a90d38ffe1Tz6MoJOF1yTDs (no session URL)
Independent review (Codex CLI 0.164.0 / gpt-6.1-sol), session 01a19657-37be-7341-b81a-4aac7bc86df7, reviewed head 14ad886
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Seeds the existing 32-bit geometric Brownian motion ensemble test while preserving its analytic reference, trajectory count, and error bound. The affected x86 CI test passes, and the diff has no blocking defects. Blast radius: The 20,000-trajectory branch in test/core_tests.jl:30; no exported API, solver implementation, dependency, or workflow changes. Evidence: Complete diff and surrounding code inspected; blind rating recorded and hashed before reading author context. Inspected master x86 CI failure, Blocking findingsNone. Non-blocking findingsNone. What I ran
What I did not verifyI did not execute Julia locally, run either revision's test file, reproduce the intermittent base failure myself, or independently repeat the seeded solve to establish bitwise reproducibility across runs or thread counts. Native 32-bit execution is supported here by the inspected x86 CI job; the local host is aarch64. I did not run a full package suite, downstream suites, or GPU, AD, MPI, or tracing tests; none of those paths is changed. The PR remains a draft, so the MERGE verdict assesses its technical contents rather than changing its publication state. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
The 32-bit GBM Monte-Carlo check ran 20k trajectories with no fixed seed, so its SSE (
testerr) varied run to run and occasionally exceeded the 15.0 bound (28.34 in the CI run below). This change passesseed = 12345to the ensemblesolveon 32-bit only, makingtesterrbit-identical across runs while leaving the 64-bit path and the sources untouched.Fail-before (unfixed code, x86 Julia 1.13.3, same 20k-trajectory block, 6 runs):
Values vary every run (no two equal). I could not draw a red (> 15.0) sample locally in 6 tries (range 0.40-2.21); the red sample is the CI run https://github.com/SciML/DiffEqFinancial.jl/actions/runs/41034390961 (master, lane Core julia 1 / ubuntu-latest / x86, Julia 1.13.3 i686):
28.336282316416803 < 15.0failed.Pass-after (fixed code,
GROUP=Core julia +1.13.3~x86 --project=. -e 'using Pkg; Pkg.test()', 3 consecutive runs, all green):Determinism proof (exact fixed block: 20k traj,
seed = 12345, x86 Julia 1.13.3; the suite itself does not printtesterr):Same value to the last digit on every run, independent of thread count (SciMLBase pre-generates per-trajectory seeds from the master seed), and well under the unchanged 15.0 bound.
Not verified here: the full 64-bit suite (the 1M-trajectory branch is intentionally untouched — the seed applies only when
Sys.WORD_SIZE == 32, so no x64 re-run was done) and the QA group. This is a test-only determinism change; no source behavior changes. Hygiene:typosclean over the diff; therunicbinary on this box is the unrelated "Runic parallel-development" CLI (no formatter command), so no formatter run was possible — the edit follows the surrounding style.🤖 Generated with opencode (model: opencode-go/muse-spark-1.3-contributor)
local session ses_e73a90d38ffe1Tz6MoJOF1yTDs (no session URL)