Repository navigation
Cap HomotopyContinuation compat at 2.18.1 in NonlinearSolveHomotopyContinuation - #913
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
HomotopyContinuation.jl v2.18.2 (released 2026-04-12, PR SciML#694 "patch decompose for dimension 0") changed the numerical behavior of path tracking on systems with no real roots. The `lib/NonlinearSolveHomotopyContinuation/test/allroots.jl` "no real solutions" testset regresses under v2.18.2: _prob = remake(prob; p = zeros(2)) _sol = solve(_prob, _alg) @test !_sol.converged @test length(_sol) == 1 # fails: Evaluated: 2 == 1 @test !SciMLBase.successful_retcode(_sol.u[1]) `HC.solve(hcsys)` continues to report `# total solutions (real): 6 (0)` (6 complex roots, 0 real) as on v2.18.1, but `HC.results(orig_sol; only_real = true)` now returns 2 near-real complex roots that survive its imaginary-part threshold after the decompose patch. Our wrapper (`solve.jl:72`) then exits the `isempty(realsols)` branch, runs the denominator/unpolynomialize pipeline, and returns an `EnsembleSolution` of length 2 instead of the length-1 sentinel the test expects. Reproducible locally on a fresh depot with only this package's deps resolved — affects every `vector u - (oop|iip) + (forwarddiff|jac|enzyme)` test case in `AllRoots` (6 failures out of 169). Manifests as consistent CI failures on `CI (NonlinearSolveHomotopyContinuation)` for every PR that resolves HomotopyContinuation v2.18.2 (e.g. SciML#910). **What we should do:** file an upstream issue against HomotopyContinuation.jl clarifying whether the tightened `only_real = true` threshold is intentional (test should relax) or regressive (upstream should tighten). Until that is resolved, cap the compat range at `2.12.0 - 2.18.1` so that our CI continues to reflect the behavior we actually test against. Lift the cap once the upstream fix or a test update lands. Bumps `NonlinearSolveHomotopyContinuation` 0.1.8 → 0.1.9. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Member
Author
|
Closing — the MWE (posted in #910) reproduces |
2 of 3 tasks
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
HomotopyContinuationcompat inlib/NonlinearSolveHomotopyContinuation/Project.tomlfrom"2.12.0"(which allows all of2.x) to"2.12.0 - 2.18.1", excludingv2.18.2which regresses theAllRoots"no real solutions" tests.NonlinearSolveHomotopyContinuationpatch0.1.8→0.1.9.Why
HomotopyContinuation.jl v2.18.2was released 2026-04-12 and includes PR #694 "patch decompose for dimension 0". This changes the numerical behavior ofHC.results(orig_sol; only_real = true)on systems with no real roots: it now surfaces 2 near-real complex roots that previously failed its imaginary-part threshold.The
AllRoots"no real solutions" testset inlib/NonlinearSolveHomotopyContinuation/test/allroots.jl:152-158:Under
v2.18.1and earlier,HC.results(; only_real = true)returns an empty vector; our wrapper hits theisempty(realsols)branch inlib/NonlinearSolveHomotopyContinuation/src/solve.jl:72and returns a length-1 sentinelEnsembleSolution. Underv2.18.2, the same call returns 2 near-real solutions, the wrapper exits that branch, runs denominator/unpolynomialize, and returns a length-2EnsembleSolution— so@test length(_sol) == 1fires withEvaluated: 2 == 1. HC's own path tracking still reports# total solutions (real): 6 (0)either way — only the post-filter is affected.Reproduces on a fresh depot against the current source, independent of any changes under review. Affects every case in the
vector u - (oop|iip) + (forwarddiff|jac|enzyme)matrix (6 failures out of 169 inAllRoots). Shows up as consistent failures onCI (NonlinearSolveHomotopyContinuation)for every PR that resolvesHC v2.18.2(e.g. #910).What we should do next
This cap is a holding pattern, not a fix:
JuliaHomotopyContinuation/HomotopyContinuation.jlasking whether the loosenedonly_real = truethreshold after Use correct constructors for JacobianOperators incopy#694 is intentional. Two possibilities:2.18.3; we can widen our compat to"2.12.0, >=2.18.3"(or just drop the cap).HC.resultsdiscarding near-real paths; instead, filter onsuccessful_retcodeor on a local imaginary-part threshold before building the ensemble. In that case the cap can be lifted once the test is updated.2.xpatch releases otherwise carry bug fixes we'd want.Test plan
lib/NonlinearSolveHomotopyContinuationtests pass locally againstHomotopyContinuation v2.18.1.v2.18.2(reproduces the 6 "no real solutions" failures independent of any NonlinearSolveBase changes).CI (NonlinearSolveHomotopyContinuation)goes green on this branch.🤖 Generated with Claude Code