From 5702c769605a0c6b0edee2cded340226a7cc70e7 Mon Sep 17 00:00:00 2001
From: Anton Akhmerov <anton.akhmerov@gmail.com>
Date: Wed, 11 Feb 2015 00:56:01 +0100
Subject: [PATCH] update superlu warning

---
 kwant/solvers/default.py | 4 ++++
 kwant/solvers/sparse.py  | 8 +++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/kwant/solvers/default.py b/kwant/solvers/default.py
index 56260d72..28145700 100644
--- a/kwant/solvers/default.py
+++ b/kwant/solvers/default.py
@@ -9,9 +9,13 @@
 __all__ = ['smatrx', 'ldos', 'wave_function', 'greens_function']
 
 # MUMPS usually works best.  Use SciPy as fallback.
+import warnings
 try:
     from . import mumps as smodule
 except ImportError:
+    warnings.warn("MUMPS is not available, "
+                  "SciPy built-in solver will be used as a fallback. "
+                  "Performance can be very poor in this case.", RuntimeWarning)
     from . import sparse as smodule
 
 hidden_instance = smodule.Solver()
diff --git a/kwant/solvers/sparse.py b/kwant/solvers/sparse.py
index 9510c529..508c9d66 100644
--- a/kwant/solvers/sparse.py
+++ b/kwant/solvers/sparse.py
@@ -88,11 +88,9 @@ if uses_umfpack:
         return solve
 else:
     # no UMFPACK found. SuperLU is being used, but usually abysmally slow
-    # (SuperLu is not bad per se, somehow the SciPy version isn't good)
-    warnings.warn("The installed SciPy does not use UMFPACK. Instead, "
-                  "SciPy will use the version of SuperLu it is shipped with. "
-                  "Performance can be very poor in this case.", RuntimeWarning)
-
+    # (SuperLu is not bad per se, somehow the SciPy version isn't good).
+    # Since scipy doesn't include UMFPACK anymore due to software rot,
+    # there is no warning here.
     factorized = linsolve.factorized
 
 
-- 
GitLab