<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>  A difficult question with no easy answers. <div class=""><br class=""></div><div class="">  First, do you have a restart system so you can save your state just before your "bad behavior" and run experiments easily at the bad point? </div><div class=""><br class=""></div><div class="">  You could try to use SLEPc to compute the first few eigenmodes (presumably associated with excessively small eigenvalues) and visualize them? You could restart with and without preconditioning to see how badly the conditioning becomes for both the system and the preconditioned system to help see if the problem comes from just the preconditioner starting to behavior poorly or because the operator starts to behave poorly.</div><div class=""><br class=""></div><div class="">  There should be a way to allow doing this directly from within the KSPSolve trivially with appropriate monitors but I suspect that does not exist because calling SLEPc trivially from PETSc is a nightmare because of the dependency diamond. </div><div class=""><br class=""></div><div class="">  Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 3, 2022, at 11:58 AM, Alfredo J Duarte Gomez <<a href="mailto:aduarteg@utexas.edu" class="">aduarteg@utexas.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Good morning PETSC team,</div><div class=""><br class=""></div><div class="">I have a bit of an open question on diagnosing preconditioner performance.</div><div class=""><br class=""></div><div class="">For a bit of background, I am using the TS object in combination with the matrix-free snes, and a custom user defined preconditioner (PCSHELL). Everything is implemented with the help of a DMDA. Smallest problem size that I can get away with is a grid with 2.1 million points with 4 fields each, for a total of 8.4 million equations.</div><div class=""><br class=""></div><div class="">The preconditioner works very well overall, but at some stages of the solution it performs poorly, evidenced by significant increases in the number of GMRES iterations and the maximum/minimum eigenvalue computed using KSPComputeExtremeSingularValues().</div><div class=""><br class=""></div><div class="">I am trying to understand the locations where the preconditioner is not working well, so for example, is there any way to map the maximum eigenvalue to a particular location/field in the DMDA. Alternatively, are there any other ways of diagnosing where the preconditioner is not doing a good job? <br class=""></div><div class=""><br class=""></div><div class="">GMRES iterations and the max/min eigenvalue provide a good overall picture, but I am struggling to get preconditioner metrics that are specific to a location and field.<br class=""></div><div class=""><br class=""></div><div class="">So far I have taken a close look at fields such as the residual, and Newton updates, but it is difficult to tell how to assess these in combination with the preconditioner.</div><div class=""><br class=""></div><div class="">I appreciate any suggestions.</div><div class=""><br class=""></div><div class="">Thank you and have a good day.<br class=""></div><div class=""><br class=""></div><div class="">-Alfredo<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class="">-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><font face="arial, sans-serif" class="">Alfredo Duarte</font><div class=""><font face="arial, sans-serif" class="">Graduate Research Assistant</font></div><div class=""><font face="arial, sans-serif" class="">The University of Texas at Austin</font></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></div></body></html>