Skip to content
Snippets Groups Projects
Commit 5702c769 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

update superlu warning

parent 4f725e8c
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment