Fix Rosenbrock N=4 regression seed for Julia 1.13 RNG stream#104
Merged
ChrisRackauckas merged 1 commit intoJun 23, 2026
Merged
Conversation
The Core test group's `julia pre` (1.13.0-rc1) job failed on the `Rosenbrock test dimension N = 4` testset: `sol.objective < 2.0e-3` (SerialPSO) reported 3.70 instead of ~1e-12. Root cause: Julia 1.13 changed the default RNG stream, so the same `Random.seed!(123)` produces a different particle population. For this non-convex N=4 problem, the 1.13 stream from seed 123 lands the swarm in a bad local basin. This is purely a seed-sensitivity artifact, not a package regression: the SerialPSO solver is deterministic given the RNG, and increasing maxiters to 10000 does not escape the basin (still 3.70). Verified locally that the algorithm is healthy: on 1.13.0-rc1, 9 of 10 tested seeds (1, 2, 3, 42, 100, 200, 321, 777, 1234) converge to <1e-9; only seed 123 fails. Switching the N=4 testset to seed 1 converges to <1e-11 on Julia 1.12 (7.46e-12) and 1.13.0-rc1 (7.12e-12), and the full N=4 testset (all SerialPSO/ParallelPSOKernel/ParallelSyncPSOKernel assertions) passes on both. The tight `< 2.0e-3` / `< 3.0e-2` tolerances are left unchanged, so the test still verifies genuine convergence. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the failing
tests / Core (julia pre)job onmain. Thejulia prechannel is currently Julia 1.13.0-rc1, and theRosenbrock test dimension N = 4testset fails there:@test sol.objective < 2.0e-3(SerialPSO) reports3.70instead of~1e-12.Root cause
Julia 1.13 changed the default RNG stream, so
Random.seed!(123)now produces a different particle population. For the non-convex N=4 Rosenbrock, the 1.13 stream from seed 123 lands the swarm in a bad local basin. This is a seed-sensitivity artifact, not a package regression.Evidence (all run locally):
3.70; increasingmaxiters1000 -> 10000 does not escape the basin (still3.70), so it is not an "under-iterated" problem.1, 2, 3, 42, 100, 123, 200, 321, 777, 1234), 9 converge to<1e-9; only seed123fails. The algorithm is healthy.2.98e-13), which is why the failure only appears on theprechannel.Fix
Switch the N=4 testset to
Random.seed!(1), which converges to<1e-11on both Julia 1.12 (7.46e-12) and 1.13.0-rc1 (7.12e-12). The tight< 2.0e-3/< 3.0e-2tolerances are left unchanged — the test still verifies genuine convergence, just from a seed that is robust across RNG-stream generations. No tolerance loosening, no skips.Local verification
Ran the full N=4 testset (every
SerialPSO/ParallelPSOKernel/ParallelSyncPSOKernelassertion) withRandom.seed!(1):+pre): all assertions PASS (SerialPSO7.12e-12, bounded/unbounded variants<1e-9).7.46e-12).Julia 1.10 (lts) shares the pre-1.13 Xoshiro stream with 1.12, so seed 1's robust convergence carries over; lts is currently green in CI.
Scope
This PR only touches the
julia pre(1.13) Core failure. The separateDowngrade / Downgrade Testsfailure (DiffEqGPU 3.9 floor) is handled by #103. TheCUDA Tests (Julia 1)failure is a self-hosted-runner infra error (could not lock config file .../.gitconfig: File exists, exit 255 in the post-test/codecov step) — not a code issue.Please ignore until reviewed by @ChrisRackauckas.