Skip to content

Add LDLFactorizations.jl as a package extension - #2933

Merged
odow merged 3 commits into
masterfrom
od/ldlfactorizations
Feb 3, 2026
Merged

Add LDLFactorizations.jl as a package extension#2933
odow merged 3 commits into
masterfrom
od/ldlfactorizations

Conversation

@odow

@odow odow commented Feb 1, 2026

Copy link
Copy Markdown
Member

Closes #1971
Closes #2931

Comment thread src/Bridges/Constraint/bridges/QuadtoSOCBridge.jl Outdated
@odow

odow commented Feb 1, 2026

Copy link
Copy Markdown
Member Author

I don't understand how the default fallback is covered. I need to investigate more. It must be getting hit by a test before we load LDLFactorizations, but that seems flakey. I need to add an explicit test.

@odow

odow commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

Another thing to consider is that this does add a dependency to MOI with respect to compat bounds. But I think we're okay to take it on. cc @amontoison

@mlubin

mlubin commented Feb 2, 2026

Copy link
Copy Markdown
Member

Maybe we should ask for a 1.0 tag on LDLFactorizations?

@amontoison

Copy link
Copy Markdown
Contributor

Did you try the ldlt from CHOLMOD?
We don't plan to break LDLFactorizations.jl anytime soon.
If I do a release 1.0, I need to update a bunch of Project.toml in JSO, is it a big deal to keep the compat entry 0.10?

@odow

odow commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

It doesn't support zero pivots:

julia> import SparseArrays

julia> A = [1.0 1.0; 1.0 1.0]
2×2 Matrix{Float64}:
 1.0  1.0
 1.0  1.0

julia> Q = SparseArrays.sparse(A);

julia> LinearAlgebra.ldlt(Q)
ERROR: ZeroPivotException: factorization encountered one or more zero pivots. Consider switching to a pivoted LU factorization.
Stacktrace:

@amontoison

Copy link
Copy Markdown
Contributor

It depends what you want to achieve at the end but why not calling again cholesky / ldlt with the keyword argument shift set to a value near epsilon machine if you have this error?

@odow

odow commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

Given $x^\top Q x$ we want $Q = A^\top A$ so we can do $|| Ax ||_2^2$. We'd prefer not to have small numerical values because these show up in the cone constraint.

@odow
odow merged commit 7b6d2a5 into master Feb 3, 2026
31 checks passed
@odow
odow deleted the od/ldlfactorizations branch February 3, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Sparse LDL for QuadtoSOC

4 participants