[petsc-users] Using PETSC iterative solvers for a multiple righthand side problem

Barry Smith bsmith at mcs.anl.gov
Tue Nov 25 07:01:08 CST 2014


   We do not support a "generic" multiple right hand sides; solving one at a time is reasonably efficient (that is for iterative solvers you wouldn't  see more than roughly a speedup of 50% no matter how many right hand sides you have.)

   However with direct solvers you can see much more dramatic improvement. How large is your linear system and do you want to do the solves in parallel? You can use MatMatSolve() for multiple right hand sides with direct solvers.

  Barry

> On Nov 25, 2014, at 5:14 AM, Kirill Voronin <kvoronin at labchem.sscc.ru> wrote:
> 
> 
> Hello everyone!
> 
> Roughly speaking, the question is - what are the possibilities to solve
> the linear system Ax = b with multiple righthand sides?
> 
> I am solving using PETSC a linear system Ax = b. Solution method is
> BiCGStab with my user-defined preconditioner.
> 
> Can I somehow exploit the fact that I will need to solve a lot of systems
> with the same matrix but different righthand sides?
> I mean, can I simultaneously calculate all the solution vectors for all
> righthand sides like it is done, e.g., in PARDISO?
> 
> As far as I understand, the only way is to call KSP_solve in a loop over
> all righthand sides, each time finding only one solution for the current
> righthand side (changing inside the loop). Am I right?
> 
> I would greatly appreciate any help! Thanks in advance!
> 
> 
> Best regards,
> 
> Kirill Voronin
> 



More information about the petsc-users mailing list