<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 30, 2018 at 5:23 PM Appel, Thibaut via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear users,<br>
<br>
Following a suggestion from Matthew Knepley I’ve been trying to apply fieldsplit/gamg for my set of PDEs but I’m still encountering issues despite various tests. pc_gamg simply won’t start.<br>
Note that direct solvers always yield the correct, physical result.<br>
Removing the fieldsplit to focus on the gamg bit and trying to solve the linear system on a modest size problem still gives, with<br>
<br>
'-ksp_monitor -ksp_rtol 1.0e-10 -ksp_gmres_restart 300 -ksp_type gmres -pc_type gamg'<br>
<br>
[3]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[3]PETSC ERROR: Petsc has generated inconsistent data<br>
[3]PETSC ERROR: Have un-symmetric graph (apparently). Use '-(null)pc_gamg_sym_graph true' to symetrize the graph or '-(null)pc_gamg_threshold -1' if the matrix is structurally symmetric.<br>
<br>
And since then, after adding '-pc_gamg_sym_graph true' I have been getting<br>
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc has generated inconsistent data<br>
[0]PETSC ERROR: Eigen estimator failed: DIVERGED_NANORINF at iteration<br>
<br>
-ksp_chebyshev_esteig_noisy 0/1 does not change anything<br>
<br>
Knowing that Chebyshev eigen estimator needs a positive spectrum I tried ‘-mg_levels_ksp_type gmres’ but iterations would just go on endlessly.<br></blockquote><div><br></div><div>This is OK, but you need to use '-ksp_type <b><font color="#ff0000">f</font></b>gmres' (this could be why it is failing ...). </div><div><br></div><div>It looks like your matrix is 1) just the velocity field and 2) very unsymmetric (eg, convection dominated). I would start with ‘-mg_levels_ksp_type richardson -mg_levels_pc_type sor’.</div><div><br></div><div>I would also start with unsmoothed aggregation: '-<span class="gmail-il">pc_gamg_nsmooths</span> 0' </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It seems that I have indeed eigenvalues of rather high magnitude in the spectrum of my operator without being able to determine the reason.<br>
The eigenvectors look like small artifacts at the wall-inflow or wall-outflow corners with zero anywhere else but I do not know how to interpret this.<br>
Equations are time-harmonic linearized Navier-Stokes to which a forcing is applied, there’s no time-marching.<br></blockquote><div><br></div><div>You mean you are in frequency domain?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Matrix is formed with a MPIAIJ type. The formulation is incompressible, in complex arithmetic and the 2D physical domain is mapped to a logically rectangular, </blockquote><div><br></div><div>This kind of messes up the null space that AMG depends on but AMG theory is gone for NS anyway.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">regular collocated grid with a high-order finite difference method.<br>
I determine the ownership of the rows/degrees of freedom of the matrix with PetscSplitOwnership and I’m not using DMDA.<br></blockquote><div><br></div><div>Our iterative solvers are probably not going to work well on this but you should test hypre also (-pc_type hypre -pc_hypre_type boomeramg). You need to configure PETSc to download hypre.</div><div><br></div><div>Mark</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The Fortran application code is memory-leak free and has undergone a strict verification/validation procedure for different variations of the PDEs.<br>
<br>
If there’s any problem with the matrix what could help for the diagnostic? At this point I’m running out of ideas so I would really appreciate additional suggestions and discussions.<br>
<br>
Thanks for your continued support,<br>
<br>
<br>
Thibaut</blockquote></div></div>