Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecate native dependency on umfpack #562

Open
jinningwang opened this issue Aug 15, 2024 · 3 comments
Open

Deprecate native dependency on umfpack #562

jinningwang opened this issue Aug 15, 2024 · 3 comments
Assignees

Comments

@jinningwang
Copy link
Member

Is your feature request related to a problem? Please describe.
The native dependency on umfpack via kvxopt can introduce license issue. The involved implementation in ANDES is in:

import numpy as np
from kvxopt import matrix, umfpack, klu

Further, it can be traced back to SuiteSparse via kvxopt:
https://github.com/sanurielf/kvxopt/blob/cc4cd9a4f2f27c2f5cac1363ba0f36574b16b0bd/setup.py#L76-L93

Describe the solution you'd like

For reference, package SciPy provides wrappers of umfpack (via a BSD licensed packagescikit-umfpack), but doesn't include it as a dependency.

Code:
https://github.com/scipy/scipy/blob/9e9d534b7afac90e8d2fa23be1d0ab1201c1bde1/scipy/sparse/linalg/_dsolve/linsolve.py#L13-L19

Documentation:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.use_solver.html

Dependency:
In the dependency, the package scikit-umfpack is included in [test] rather than in [build-system].
https://github.com/scipy/scipy/blob/9e9d534b7afac90e8d2fa23be1d0ab1201c1bde1/pyproject.toml#L18-L32

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

@cuihantao
Copy link
Collaborator

cuihantao commented Aug 15, 2024 via email

@jinningwang
Copy link
Member Author

I'm thinking that, maybe we can benchmark the performance of involved methods? Here is a code to my mind.

Feel free to let me know if you have any other comments.

scipy.sparse.linalg import spsolve

# assume `A` is a 2D matrix and `b` is a vector

# method1
x1 = spsolve(A, b, use_umfpack=True)

# method2
x2 = spsolve(A, b, use_umfpack=False)

@cuihantao
Copy link
Collaborator

cuihantao commented Aug 15, 2024 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants