[petsc-users] BoomerAMG Hypre options

Barry Smith bsmith at petsc.dev
Mon Apr 12 01:06:15 CDT 2021


  Without more information we cannot help you. I suspect you did not actually use the PCFIELDSPLIT preconditioner, you just stuck that option onto a completely different preconditioner hypre where it would be ignored. 

  The thing to understand about linear systems arising from PDE discretizations is that iterative solvers never work "black box" if the PDE is non-trivial. You need to understand the components of the PDE you are solving and how they relate to the resulting (non) linear systems and how to select and compose the preconditioner that will work for your system.  If the problem will always be of moderate size then just use direct solvers and be done. If you need to solve for very fine discretizations where direct solvers do not scale you need to invest menta/mathematical energy to understand the relationship between the PDEs you are solving and their discretization and likely need to read the iterative solver literature related to your class of problems. We are happy to help you, but can only help if you provide us with enough information about your PDE and how you discretize it and exactly what solver options you have tried.

  Barry


   

> On Apr 11, 2021, at 11:40 PM, sthavishtha bhopalam <sthavishthabr at gmail.com> wrote:
> 
> @Barry, Upon your suggestion, I added -pc_fieldsplit_detect_saddle_point to my previously used command line options. But, I get the same error message as earlier.
> 
> -------------------------------------------
> Regards
> 
> Sthavishtha
> 
> 
> 
> 
> 
> 
> On Mon, Apr 12, 2021 at 4:36 AM Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
> 
> 0 SNES Function norm 6.145506780035e-04 
>       0 KSP Residual norm 2.013603254316e+41 
> 
>   My guess is that your matrix has zeros or essentially zeros on some diagonal entries, this could be breaking 
> 
> Relax down          symmetric-SOR/Jacobi
>         Relax up            symmetric-SOR/Jacobi
> 
> since the smoother would be dividing by those numbers. Standard multigrid methods generally cannot handle such matrices without adjustments.
> 
> On approach for such problems is to use PCFIELDSPLIT and split off the zero diagonal portion while using AMG on the rest -pc_fieldsplit_detect_saddle_point  see PCFieldSplitSetDetectSaddlePoint().
> 
>   Barry
> 
> 
> 
> 
>> On Apr 11, 2021, at 1:06 PM, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> wrote:
>> 
>> On Sun, Apr 11, 2021 at 1:37 PM sthavishtha bhopalam <sthavishthabr at gmail.com <mailto:sthavishthabr at gmail.com>> wrote:
>> Hello PETSc users
>> 
>> I am trying to experiment with Hypre's BoomerAMG preconditioner which continually yields the error message "Linear solve did not converge due to DIVERGED_DTOL iterations 1". I would appreciate if someone can suggest some ways I could get BoomerAMG to yield converged results - the attached output shows a snippet of the error message. Command Line options I used for BoomerAMG : -pc_type hypre -pc_hypre_type boomeramg -pchypreboomeramgtol 1.0e-3 -pchypreboomeramgstrongthreshold 0.25 -ksp_type richardson -pc_hypre_boomeramg_max_iter 6 -snes_rtol 1.0e-3 -ksp_rtol 1.0e-3 -ksp_view -snes_view -ksp_monitor -snes_monitor -ksp_max_it 100 -ksp_converged_reason -snes_converged_reason
>> 
>> I also tried using -ksp_type gmres, different values of -pc_hypre_boomeramg_max_iter, -pchypreboomeramgstrongthreshold, -ksp_initial_guess_nonzero but all yielded the same error message.
>> 
>> However, the direct solver converges as required - the attached output shows a snippet of the norms from the SNES and KSP.
>> Command Line options I used for the direct solver : -ksp_type gmres -pc_type lu -pc_factor_shift_type nonzero -pc_factor_mat_solver_type mumps -snes_converged_reason -ksp_converged_reason -ksp_rtol 1e-3 -snes_rtol 1e-3 -ksp_monitor -snes_monitor
>> 
>> There is no particular reason for using the AMG here, but I just wanted to familiarize with it's options to see which of them need to be particularly tuned to yield converged and correct results.
>> 
>> Hypre is only going to work for a very specific set of systems. What are you solving?
>> 
>>   Thanks,
>> 
>>      Matt
>>  
>> Thanks
>> -------------------------------------------
>> Regards
>> 
>> Sthavishtha 
>> 
>> 
>> 
>> 
>> 
>> 
>> -- 
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>> 
>> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
> 

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


More information about the petsc-users mailing list