<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">I am experimenting with the threshold parameter. </div><div class=""><br class=""></div><div class="">As described in the manual:  <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">“ <span style="font-family: -webkit-standard; font-size: medium; background-color: rgb(255, 255, 255);" class="">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.</span>"</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I did some experimentation for my problem: </div><div class=""><br class=""></div><div class="">1) <span style="color: rgb(242, 242, 242); font-family: Monaco; font-size: 10px; background-color: rgba(0, 0, 0, 0.85098);" class="">-pc_mg_levels 3 -mg_levels_ksp_max_it 3 -pc_gamg_square_graph 1 -pc_gamg_threshold 0   :</span> 22 KSP iterations, 39 seconds</div><div class=""><div><div class="">2) <span style="color: rgb(242, 242, 242); font-family: Monaco; font-size: 10px; background-color: rgba(0, 0, 0, 0.85098);" class="">-pc_mg_levels 3 -mg_levels_ksp_max_it 3 -pc_gamg_square_graph 1 -pc_gamg_threshold 0.5 :</span> Did not converge in over 1000 KSP iterations</div><div class=""></div><div><div class=""><br class=""></div><div class="">According to the manual reducing the threshold value would result in slower convergence rates. However, I am observing opposite behavior. </div><div class=""><br class=""></div><div class="">Is this problem specific? Or maybe I am misunderstanding something here. </div><div class=""><br class=""></div><div class="">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 (?). </div><div class=""><br class=""></div><div class="">I would appreciate some guidance here. </div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Manav</div><div class=""><br class=""></div></div><blockquote type="cite" class=""><div class="">On Oct 29, 2018, at 1:03 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" class="">bhatiamanav@gmail.com</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">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? <br class=""></blockquote><br class="">Adding levels replaces a direct solve with a deeper V-cycle.  When MG is<br class="">behaving well, this makes little difference because the coarse<br class="">approximations are no worse than the approximations made in the first<br class="">coarsening (from fine level to first coarsened level).  But there are<br class="">many stubborn problems for which it does hurt, as you have seen.<br class=""></div></div></blockquote></div><br class=""></div></body></html>