Skip to content

Conversation

@jClugstor
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

This makes it so that the default alg is chosen based on the primal A and b before going to make the Dual cache. This also means that for small problems GenericLU will be used, and the cache will be a normal LinearCache.

Comment on lines +132 to +204
function SciMLBase.init(prob::DualAbstractLinearProblem, alg::DefaultLinearSolver, args...; kwargs...)
if alg.alg === DefaultAlgorithmChoice.GenericLUFactorization
return __init(prob, alg, args...; kwargs...)
else
return __dual_init(prob, alg, args...; kwargs...)
end
Copy link
Member

Choose a reason for hiding this comment

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

This needs a JET test

Copy link
Member Author

Choose a reason for hiding this comment

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

Tests added. Looks good on 1.11 but fails on LTS

@ChrisRackauckas
Copy link
Member

tests fail

@jClugstor
Copy link
Member Author

CI is having some issues here, some are complaining about Pkg not being available, and one says that Julia isn't a recognized executable.

@ChrisRackauckas
Copy link
Member

NoPre is a real failure

@jClugstor
Copy link
Member Author

So the normal default algorithm @report_opt tests for both 1 and LTS are marked as broken, and they both pass.

But the default algorithm @report_opt tests for DualLinearProblems actually work on 1, but not on LTS. So if I mark them as broken they pass on LTS but not 1, and vice versa. And then one of the dense factorization JET tests fail on LTS but only on windows...

@jClugstor jClugstor force-pushed the dual_genericLU_bypass_default branch from c515eb3 to 84b2a6b Compare September 23, 2025 20:35
@jClugstor jClugstor force-pushed the dual_genericLU_bypass_default branch from 84b2a6b to eab1f06 Compare October 3, 2025 14:00
@jClugstor jClugstor force-pushed the dual_genericLU_bypass_default branch from eab1f06 to 26f36ce Compare October 6, 2025 13:32
@jClugstor
Copy link
Member Author

@ChrisRackauckas I'm not sure what to do here, the JET tests pass for 1.11, but not LTS, so whether I mark the test as broken or not there will still be a test failure.

@oscardssmith
Copy link
Member

can you mark it broken with a Version check?

@jClugstor
Copy link
Member Author

Yeah that works if that's ok to do.

@oscardssmith
Copy link
Member

@ChrisRackauckas I think this is now good to go.

@ChrisRackauckas ChrisRackauckas merged commit 89baa2d into SciML:main Oct 7, 2025
133 of 136 checks passed
@ChrisRackauckas
Copy link
Member

@hersle now try that benchmark.

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