scipy sparse efficiency questions
Scipy sparse direct solvers use superlu as the backend by default. Superlu supports using previous reordering data which is particularly useful when time stepping through solutions for systems where the matrix structure does not change with time. Looking through the scipy code indicates that the internal variables do keep the c_perm and r_perm variables. I cannot see a way to use this feature with this wrapper. Have I missed something? Can I rerun the solver without re-calculating the reordering? This also applies if I use the spilu to use as a preconditioner - it appears to recalc the reordering for call. This is numerically expensive. I realise that petsc and trilinos offer a more complete solution but for the time being just want a simplified approach that I can move easily from linux/unix to windows. The latter causes plenty of problems when I have to compile my own modules - I develop on linux. Thanks John John Floyd Water, Wetlands and Coasts Science Office of Environment and Heritage Department of Premier and Cabinet john.floyd@environment.nsw.gov.au <mailto:e@environment.nsw.gov.au> Ph: 02-9995-5656 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- This email is intended for the addressee(s) named and may contain confidential and/or privileged information. If you are not the intended recipient, please notify the sender and then delete it immediately. Any views expressed in this email are those of the individual sender except where the sender expressly and with authority states them to be the views of the Office of Environment and Heritage, NSW Department of Premier and Cabinet. PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL
13.08.2013 01:38, John Floyd kirjoitti:
Scipy sparse direct solvers use superlu as the backend by default.
Superlu supports using previous reordering data which is particularly useful when time stepping through solutions for systems where the matrix structure does not change with time. Looking through the scipy code indicates that the internal variables do keep the c_perm and r_perm variables. I cannot see a way to use this feature with this wrapper.
splu and spilu accept many of SuperLU's internal parameters. However, I don't think they support keeping the sparsity structure the same. If you know how to do this via SuperLU's C-API, it is probably not a huge effort to extend Scipy's wrappers to support this. -- Pauli Virtanen
participants (2)
-
John Floyd
-
Pauli Virtanen