Skip to content

Interest in adopting scipy patches? #167

Description

@dschmitz89

SuperLU is the workhorse for sparse linear solves in scipy. Currently, we vendor a copy of the superLU source and apply a few patches. Ideally, we would be able to just use your code as a submodule (or subproject so that a system installed version of superLU can be used) so that we can update without recreating the patch file etc (see discussion at scipy) . Therefore I would like to ask if our patches are of interest to you. The full patch file can be found here. SciPy is currently at commit 18958c3.

From what I understand, our patches are mostly about avoiding crashes in BLAS function for singular matrices. An example is the following:

--- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/cpanel_bmod.c
+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/cpanel_bmod.c
@@ -428,6 +428,12 @@ cpanel_bmod (
 		    CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr], 
 			   &nsupr, tempv, &incx );
 #else
+#if SCIPY_FIX
+		   if (nsupr < segsze) {
+			/* Fail early rather than passing in invalid parameters to TRSV. */
+			ABORT("failed to factorize matrix");
+		   }
+#endif

Would you accept a PR that applies such patches to SuperLU directly?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions