MadNLP extension

Loaded with using MadNLP. It provides SDSSolver, a MadNLP linear solver configured by the sds_* options of SDSSolverOptions; the manual page MadNLP explains its use with MadNLPGPU, the options and the fused pipeline.

SparseDirectSolverMadNLPExt.SDSSolver — Type
SDSSolver(csc; opt = SDSSolverOptions(), logger = MadNLP.MadNLPLogger())

csc is the lower triangle of the KKT matrix as MadNLP passes it: a vendor CSC (CuSparseMatrixCSC, ROCSparseMatrixCSC, oneSparseMatrixCSC) on a GPU backend, or a SparseMatrixCSC on the KernelAbstractions CPU backend, where only sds_pivoting = :bk runs (:none raises NotSupportedError: the fused pipeline needs a GPU).

The MadNLP linear solver backed by SparseDirectSolver.jl: a shell over an inner AbstractDirectSolver, a FusedSolver (the fused factorization mega-kernel and partitioned-inverse solve, with the per-architecture tuning of Fused.default_tuning) for sds_pivoting = :none, a DirectSolver (stock Bunch-Kaufman LDLᵀ, same tuning) for :bk; both are driven by refactorize!, solve! and getparam(inner, "inertia"). Available as SparseDirectSolver.SDSSolver (exported) once MadNLP is loaded.

source
SparseDirectSolverMadNLPExt.SDSSolverOptions — Type
SDSSolverOptions(; sds_factorization = :cholesky, sds_pivoting = :none,
                   sds_pivot_threshold = nothing, sds_reordering = "algo4",
                   sds_tuning = nothing, sds_user_perm = nothing)

The MadNLP options of SDSSolver, passed as keywords of madnlp or in an SDSSolverOptions. Available as SparseDirectSolver.SDSSolverOptions once MadNLP is loaded.

  • sds_factorization::Symbol = :cholesky: :cholesky factors the KKT matrix as "SPD" (the condensed-KKT default); :ldl as "S", L D Lᵀ, and reports the true inertia from the signs of D.
  • sds_pivoting::Symbol = :none: :ldl only. :none factors in identity pivot order through the fused pipeline (a FusedSolver); :bk runs the stock in-front Bunch–Kaufman path of a DirectSolver: more robust on ill-conditioned KKT systems, at the level-batched speed of the handle API.
  • sds_pivot_threshold::Union{Nothing, Float64} = nothing: :bk only, the pivot_threshold of the in-front acceptance test (nothing keeps the package default 0.01; cuDSS's default is 1.0).
  • sds_reordering::String = "algo4": the reordering_alg of the analysis ("algo4" nested dissection, "algo3" AMD, "default" the cost-model choice).
  • sds_tuning::Union{Nothing, SDSTuning} = nothing: a SDSTuning bundle of performance knobs; nothing selects the per-architecture profile of default_tuning.
  • sds_user_perm::Union{Nothing, Vector{Int}} = nothing: a 1-based permutation of length n that replaces the reordering (user_perm); every solver instance otherwise recomputes its ordering.
source