I am experimenting with the threshold parameter. 

As described in the manual:  
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html
 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html>


“ Conversely reducing the threshold increases the rate of coarsening 
(aggressive coarsening) and thereby reduces the complexity of the coarse grids, 
and generally results in slower solver converge rates."


I did some experimentation for my problem: 

1) -pc_mg_levels 3 -mg_levels_ksp_max_it 3 -pc_gamg_square_graph 1 
-pc_gamg_threshold 0   : 22 KSP iterations, 39 seconds
2) -pc_mg_levels 3 -mg_levels_ksp_max_it 3 -pc_gamg_square_graph 1 
-pc_gamg_threshold 0.5 : Did not converge in over 1000 KSP iterations

According to the manual reducing the threshold value would result in slower 
convergence rates. However, I am observing opposite behavior. 

Is this problem specific? Or maybe I am misunderstanding something here. 

Also, I am assuming that the threshold refers to some parameter in the 
connectivity graph, which is independent of the entries in the matrix. So, the 
value of threshold is independent of the magnitudes of the entries in the 
matrix (?). 

I would appreciate some guidance here. 

Regards,
Manav

> On Oct 29, 2018, at 1:03 PM, Jed Brown <[email protected]> wrote:
> 
> Manav Bhatia <[email protected]> writes:
> 
>> I also observed that the number of KSP iterations increases with an increase 
>> in the levels of AMG. Is this true, in general, for all/most applications? 
> 
> Adding levels replaces a direct solve with a deeper V-cycle.  When MG is
> behaving well, this makes little difference because the coarse
> approximations are no worse than the approximations made in the first
> coarsening (from fine level to first coarsened level).  But there are
> many stubborn problems for which it does hurt, as you have seen.

Reply via email to