[petsc-dev] gamg regression

Stephan Kramer s.kramer at imperial.ac.uk
Tue Jun 16 12:21:14 CDT 2015


Dear petsc-devs

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:

https://lists.mcs.anl.gov/mailman/htdig/petsc-dev/2015-April/017535.html

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.

So my question: is the change from PREONLY+LU to GMRES+LU intentional?

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:

call PCSetup(pc, ierr) ! this is the GAMG pc
call PCMGGETCoarseSolve(pc, ksp_coarse, ierr)
call KSPSetType(ksp_coarse, PREONLY, ierr)

Cheers
Stephan



More information about the petsc-dev mailing list