[petsc-users] KSPCG solution blow up

Hugo Gagnon opensource.petsc at user.fastmail.fm
Mon Apr 15 16:27:41 CDT 2013


All I know is that we use SPARSKIT2's iluk.

I am aware that the code snippet I gave only works in serial.
--
  Hugo Gagnon

On 2013-04-15, at 5:15 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Hugo Gagnon <opensource.petsc at user.fastmail.fm> writes:
> 
>> For the problem I'm describing my serial in-house solver does not work
>> with ILU(0) but works with ILU(3).  I have no option to run Jacobi.
>> When I apply the same problem to PETSc's PC solver with ILU(3) in
>> serial I get KSP_DIVERGED_INDEFINITE_PC
> 
> Does your in-house ILU(3) use a different ordering?  What shift scheme
> does it use?
> 
>> on the first iteration (in MPI the solution somewhat converges but
>> very slowly).
>> 
>> call KSPGetPC(Pksp,Ppc,Pierr)
>> call PCSetType(Ppc,PCILU,Pierr)
>> call PCFactorSetLevels(Ppc,3,Pierr)
>> 
>> This effectively changes the fill level from 0 to 3, right?
> 
> This only works in serial.  Check the -ksp_view output to see what is
> done.  You should just call KSPSetFromOptions() and use run-time options
> to configure the solver.  You can do it from code later, but writing
> code is slow to figure out what works.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130415/ea438822/attachment-0001.html>


More information about the petsc-users mailing list