[petsc-users] KSPCG solution blow up

Mark F. Adams mark.adams at columbia.edu
Mon Apr 15 16:26:36 CDT 2013


Its probably not worth trying to verify the code with ILU(3) because the space of algorithms is large as Jed points out (e.g., ILU(3) does not fully define the solver unless they use the same node ordering, shifting strategies and whatever else your ILU is doing to make ILU not suck).  It looks like you are doing 3D elasticity. Try

-pc_type gamg
-pc_gamg_agg_nsmooths 1

assuming you have v3.3 or higher.


On Apr 15, 2013, 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.
> 



More information about the petsc-users mailing list