<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 16, 2015 at 12:21 PM, Stephan Kramer <span dir="ltr"><<a href="mailto:s.kramer@imperial.ac.uk" target="_blank">s.kramer@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear petsc-devs<br>
<br>
I spent quite some time chasing a regression using gamg. This is solving a 2D Stokes problem for velocity only in a cylindrical domain with free slip and large viscosity contrasts - for which we found gamg to perform very well. That is, everything worked fine for petsc 3.5 but stopped working on petsc-master giving KSP_DIVERGED_INDEFINITE_PC. At first I thought it was to do with how I setup the nullspace (we were using KSPSetNullSpace before), but am convinced I'm doing the right thing now with MatSetNullSpace. I also found this earlier thread:<br>
<br>
<a href="https://lists.mcs.anl.gov/mailman/htdig/petsc-dev/2015-April/017535.html" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/mailman/htdig/petsc-dev/2015-April/017535.html</a><br>
<br>
and set back the defaults using -pc_gamg_coarse_eq_limit 800 -pc_gamg_square_graph 100. This did resolve a lot of the changes I saw in the output of -ksp_view (comparing v3.5.2 and master), but did not fix the problem. I did see one last important difference though: with petsc 3.5.2. it was using PREONLY+LU at the coarse level, whereas with master it seems to be using GMRES+LU. Changing this back to PREONLY+LU everything works again as before.<br>
<br>
So my question: is the change from PREONLY+LU to GMRES+LU intentional?<br></blockquote><div><br></div><div>I did have problems problems with MG setting this to GMRES and I had to hard wire it ... it used to set PREONLY as the default ...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Second question (less important): I didn't manage to change this at the command line. I would have thought -mg_coarse_ksp_type preonly should have done the trick but seemed to be ignored. Instead I had to do it with some calls in the code:<br>
<br></blockquote><div><br></div><div>Damn, this is a bug.   I will look at this and figure out how to make PREONLY the default and get -mg_coarse_ksp_type working.</div><div><br></div><div>Mark</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
call PCSetup(pc, ierr) ! this is the GAMG pc<br>
call PCMGGETCoarseSolve(pc, ksp_coarse, ierr)<br>
call KSPSetType(ksp_coarse, PREONLY, ierr)<br>
<br>
Cheers<span><font color="#888888"><br>
Stephan<br>
</font></span></blockquote></div><br></div></div>