KLU.jl icon indicating copy to clipboard operation
KLU.jl copied to clipboard

Stable interface that allows for greater control

Open luke-kiernan opened this issue 10 months ago • 4 comments

I'm looking to use KLU in a package. Some of things that I'd like to be able to do are:

  1. Run symbolic factorization, without running numeric factorization.
  2. Check if the sparse structure of a matrix matches that of the current factorization.

Both of these things can be done, but they require using functions and fields that aren't exported, like KLUFactorization, klu_analyze! and rowval/colptr. That begs the question: which functionalities of KLU are stable public interface, and which are private? Are there plans to move some of these into the public interface?

luke-kiernan avatar Apr 11 '25 16:04 luke-kiernan

I doubt the upstream interfaces will change much. It is a pretty stable package. Happy to give you repo access here.

ViralBShah avatar May 23 '25 21:05 ViralBShah

I can probably move some things into a public interface this week @luke-kiernan. I have a major sparsearrays ecosystem refactoring on my local machines that is still incomplete. But I think I can finish up the solver related portions soon.

In the meantime if you make a PR that documents and exports those interfaces you need I'm happy to take a look and merge them.

rayegun avatar May 23 '25 23:05 rayegun

Okay I've opened at PR: #28.

I'm aware there's one point of ickiness in my implementation: see the warning by where I define nonzeros(K::AbstractKLUFactorization). How do we give the user the ability to change K.nzval, yet prevent against the case where users do so (or don't do so) when they expect the opposite behavior?

luke-kiernan avatar May 27 '25 17:05 luke-kiernan

@rayegun @ViralBShah any input on that PR?

luke-kiernan avatar Sep 22 '25 15:09 luke-kiernan