<div dir="ltr">That is odd. Are these problems symmetric positive definite? <div><br></div><div>Eigen estimates are a pain in practice but I've never seen this. Hypre has (better) smoothers that don't need this and the AMG algorithm does not need them either. I think ML does pretty much the same thing as me.<div><br></div><div>If SPD then you definitely want '-pc_gamg_esteig_ksp_type cg'. CG converges faster and is more robust. Even if not strictly SPD like with large deformation or plasticity CG is probably better. You can run with -info and grep on GAMG to see what eigen (high) estimates it came up with for each level. They should be >1 and < 4, or so.</div><div><br></div><div>I wonder if your LAPACK is funky. You might try a fresh build (delete the "arch" directory) and download LAPACK, but this problem will go away with CG.</div><div><br></div><div>Note, if you use Chebyshev smoothing then it needs eigen estimates also. THis is usually where eigen estimate problems come up. If you use jacobi PC in the smoother, GAMG will use the eigen estimate from the smoothed aggregation smoothing (what is failing for you here). -pc_gamg_use_sa_esteig <T,F> will force it to use, or not use, it. For instance, if you sor/ilu/asm then the eigen estimates are probably fine to reuse but GAMG does not by default. If the cheby eigen estimates are low then the solver fails. THere is a safety factor to increase the eigen estimate in chychev to avoid this failure.</div><div><br></div><div>And, -pc_gamg_esteig_ksp_max_it X sets the number of iterations in the estimator. You can increase this and you should see your eigen estimates go up and converge. You should see that CG converges much faster than GMRES (the default).</div><div><br></div><div><br><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 13, 2020 at 2:32 AM Sanjay Govindjee <<a href="mailto:s_g@berkeley.edu">s_g@berkeley.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
I have a FEA problem that I am trying to solve with GAMG. The
problem solves<br>
just fine with direct solvers (mumps, superlu) and iterative solvers
(gmres, ml, hypre-boomer) etc.<br>
<br>
However with GAMG I am getting a divide by zero that I am having
trouble tracking down. Below<br>
is the gdb stack trace and the source lines going up the stack. <br>
<br>
When I run in valgrind the problem runs fine (and gets the correct
answer).<br>
Valgrind reports nothing of note (just lots of indirectly lost
blocks related to PMP_INIT).<br>
<br>
I'm only running on one processor.<br>
<br>
Any suggestions on where to start to trace the problem?<br>
<br>
-sanjay<br>
<br>
<blockquote>#0 0x00007fb262dc5be1 in ieeeck_ () from
/lib64/liblapack.so.3<br>
#1 0x00007fb262dc5332 in ilaenv_ () from /lib64/liblapack.so.3<br>
#2 0x00007fb262dbbcef in dlasq2_ () from /lib64/liblapack.so.3<br>
#3 0x00007fb262dbb78c in dlasq1_ () from /lib64/liblapack.so.3<br>
#4 0x00007fb262da1e2e in dbdsqr_ () from /lib64/liblapack.so.3<br>
#5 0x00007fb262960110 in dgesvd_ () from /lib64/liblapack.so.3<br>
#6 0x00007fb264e74b66 in KSPComputeExtremeSingularValues_GMRES
(ksp=0x1816560, emax=0x7ffc5010e7c8, emin=0x7ffc5010e7d0) at
/home/sg/petsc-3.13.2/src/ksp/ksp/impls/gmres/gmreig.c:32<br>
#7 0x00007fb264dfe69a in KSPComputeExtremeSingularValues
(ksp=0x1816560, emax=0x7ffc5010e7c8, emin=0x7ffc5010e7d0) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:64<br>
#8 0x00007fb264b44a1f in PCGAMGOptProlongator_AGG (pc=0x12f3d30,
Amat=0x11a2630, a_P=0x7ffc5010ebe0) at
/home/sg/petsc-3.13.2/src/ksp/pc/impls/gamg/agg.c:1145<br>
#9 0x00007fb264b248a1 in PCSetUp_GAMG (pc=0x12f3d30) at
/home/sg/petsc-3.13.2/src/ksp/pc/impls/gamg/gamg.c:557<br>
#10 0x00007fb264d8535b in PCSetUp (pc=0x12f3d30) at
/home/sg/petsc-3.13.2/src/ksp/pc/interface/precon.c:898<br>
#11 0x00007fb264e01a93 in KSPSetUp (ksp=0x128dd80) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:376<br>
#12 0x00007fb264e057af in KSPSolve_Private (ksp=0x128dd80,
b=0x1259f30, x=0x125d910) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:633<br>
#13 0x00007fb264e086b9 in KSPSolve (ksp=0x128dd80, b=0x1259f30,
x=0x125d910) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:853<br>
#14 0x00007fb264e46216 in kspsolve_ (ksp=0x832670
<__pfeapc_MOD_kspsol>, b=0x832698 <__pfeapc_MOD_rhs>,
x=0x8326a0 <__pfeapc_MOD_sol>, __ierr=0x7ffc5010f358)<br>
at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/ftn-auto/itfuncf.c:266<br>
#15 0x000000000043298d in usolve (flags=..., b=...) at
usolve.F:313<br>
#16 0x000000000044afba in psolve (stype=-3, b=..., fp=...,
factor=.TRUE., solve=.TRUE., cfr=.FALSE., prnt=.TRUE.) at
psolve.f:212<br>
#17 0x00000000006b7393 in pmacr1 (lct=..., ct=..., j=3,
_lct=_lct@entry=15) at pmacr1.f:578<br>
#18 0x00000000005c247b in pmacr (initf=.FALSE.) at pmacr.f:578<br>
#19 0x000000000044ff20 in pcontr () at pcontr.f:1307<br>
#20 0x0000000000404d9b in feap () at feap86.f:162<br>
#21 main (argc=<optimized out>, argv=<optimized out>)
at feap86.f:168<br>
#22 0x00007fb261aaef43 in __libc_start_main () from
/lib64/libc.so.6<br>
#23 0x0000000000404dde in _start ()<br>
<br>
(gdb) list<br>
1 <built-in>: No such file or directory.<br>
(gdb) up<br>
#1 0x00007fb262dc5332 in ilaenv_ () from /lib64/liblapack.so.3<br>
(gdb) up<br>
#2 0x00007fb262dbbcef in dlasq2_ () from /lib64/liblapack.so.3<br>
(gdb) up<br>
#3 0x00007fb262dbb78c in dlasq1_ () from /lib64/liblapack.so.3<br>
(gdb) up<br>
#4 0x00007fb262da1e2e in dbdsqr_ () from /lib64/liblapack.so.3<br>
(gdb) up<br>
#5 0x00007fb262960110 in dgesvd_ () from /lib64/liblapack.so.3<br>
(gdb) up<br>
#6 0x00007fb264e74b66 in KSPComputeExtremeSingularValues_GMRES
(ksp=0x1816560, emax=0x7ffc5010e7c8, emin=0x7ffc5010e7d0) at
/home/sg/petsc-3.13.2/src/ksp/ksp/impls/gmres/gmreig.c:32<br>
32
PetscStackCallBLAS("LAPACKgesvd",LAPACKgesvd_("N","N",&bn,&bn,R,&bN,realpart,&sdummy,&idummy,&sdummy,&idummy,work,&lwork,&lierr));<br>
(gdb) up<br>
#7 0x00007fb264dfe69a in KSPComputeExtremeSingularValues
(ksp=0x1816560, emax=0x7ffc5010e7c8, emin=0x7ffc5010e7d0) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:64<br>
64 ierr =
(*ksp->ops->computeextremesingularvalues)(ksp,emax,emin);CHKERRQ(ierr);<br>
(gdb) up<br>
#8 0x00007fb264b44a1f in PCGAMGOptProlongator_AGG (pc=0x12f3d30,
Amat=0x11a2630, a_P=0x7ffc5010ebe0) at
/home/sg/petsc-3.13.2/src/ksp/pc/impls/gamg/agg.c:1145<br>
1145 ierr = KSPComputeExtremeSingularValues(eksp,
&emax, &emin);CHKERRQ(ierr);<br>
(gdb) up<br>
#9 0x00007fb264b248a1 in PCSetUp_GAMG (pc=0x12f3d30) at
/home/sg/petsc-3.13.2/src/ksp/pc/impls/gamg/gamg.c:557<br>
557 ierr = pc_gamg->ops->optprolongator(pc,
Aarr[level], &Prol11);CHKERRQ(ierr);<br>
(gdb) up<br>
#10 0x00007fb264d8535b in PCSetUp (pc=0x12f3d30) at
/home/sg/petsc-3.13.2/src/ksp/pc/interface/precon.c:898<br>
898 ierr = (*pc->ops->setup)(pc);CHKERRQ(ierr);<br>
(gdb) up<br>
#11 0x00007fb264e01a93 in KSPSetUp (ksp=0x128dd80) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:376<br>
376 ierr = PCSetUp(ksp->pc);CHKERRQ(ierr);<br>
(gdb) up<br>
#12 0x00007fb264e057af in KSPSolve_Private (ksp=0x128dd80,
b=0x1259f30, x=0x125d910) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:633<br>
633 ierr = KSPSetUp(ksp);CHKERRQ(ierr);<br>
(gdb) up<br>
#13 0x00007fb264e086b9 in KSPSolve (ksp=0x128dd80, b=0x1259f30,
x=0x125d910) at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/itfunc.c:853<br>
853 ierr = KSPSolve_Private(ksp,b,x);CHKERRQ(ierr);<br>
(gdb) up<br>
#14 0x00007fb264e46216 in kspsolve_ (ksp=0x832670
<__pfeapc_MOD_kspsol>, b=0x832698 <__pfeapc_MOD_rhs>,
x=0x8326a0 <__pfeapc_MOD_sol>, __ierr=0x7ffc5010f358)<br>
at
/home/sg/petsc-3.13.2/src/ksp/ksp/interface/ftn-auto/itfuncf.c:266<br>
266 *__ierr = KSPSolve(<br>
(gdb) up<br>
#15 0x000000000043298d in usolve (flags=..., b=...) at
usolve.F:313<br>
313 call KSPSolve (kspsol, rhs, sol, ierr)<br>
</blockquote>
<br>
<br>
<pre cols="72"></pre>
</div>
</blockquote></div>