-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default sparse linear solver is slow for large systems #45
Comments
It will be great to have a notebook of 'recipes' for getting external sparse solvers to work with PyFVTool. For our present calculations (2D cylindrical, 375000 cells), Pypardiso works well (Win11, miniconda, specific PyFVTool environment) and decreases total calculation time by a factor up to 10x (laptops, Intel i7, 32 Gb RAM). I think we are lucky. Concerning MATLAB: you get what you pay for! I guess that MATLAB has been partnering for long with developers of sparse solvers to get these to work in a hassle-free manner and optimize the performance. This is probably true for other commercial software. Sparse array support in scientific Python still needs further work. Some ideas:
|
I will give it a shot later, when my son does not play
Totally agree. I wish it was installed by default in |
For now, Linux seems indeed to be the easiest OS for working with UMFPACK: scikit-umfpack/scikit-umfpack#85 (comment) |
In a discussion with my friend @skieninger about the speed of sparse linear solvers of Matlab versus Python for solving a large system of equation (around 1e6) , we compared the backslash solver of Matlab with scipy's SuperLU, we observed a huge difference (with Matlab much faster), which is due to the fact that
suitesparse
and its poly algorithm (umfpack
) is not installed by default in scipy. A package is available here but is a pain to install on Windows and even on WSL (or I had difficulties getting it to work easily with all the recent changes innumpy
and scipy). When it works though, it makes a huge difference. For me,Pypardiso
also did not work either with system and memory errors. I also noticed that switching between the different existingscipy
solvers can also make a significant difference.The problem is very well documented here.
To address this problem, I suggest the following list of tasks/objectives:
Here's the script I am using to test the solvers:
The text was updated successfully, but these errors were encountered: