I need to solve linear equations system Ax = b, where A is a sparse CSR matrix with size 500 000 x 500 000. I'am using scipy.bicgstab and it takes almost 10min to solve this system on my PC and I need to repeat this calculations in loop so there's a need to speed up the calculations.

Is there a way to somehow parallelize the calculations using Python, e.g. with multiprocessing? Or maybe there is another way to shorten calculations time or split problem into many smaller ones? I've read about PyTrilinos but can't find any examples..


1 Answer 1


Take a look at the PETSc library, which has a python interface. That allows you to use MPI parallelism which scales up arbitrarily.


It has several variants of the bicgstab method, and probably 100 times more preconditioners than scipy. Speaking of which, what preconditioner are you using? That is very important in determinging your speed of convergence.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.