<div class="gmail_quote">On Thu, May 12, 2011 at 13:01, Tian(ICT) <span dir="ltr"><<a href="mailto:rongtian@ncic.ac.cn">rongtian@ncic.ac.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font size="2">C:\cygwin\home\rabbit\pGFEM-test>pgfem -snes_view
-options_tableclear<div class="im"><br>atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50,
maxf=10000<br></div>SNES Object:<br> type: ls<br> line search
variant: SNESLineSearchCubic<br> alpha=0.0001, maxstep=1e+008,
steptol=1e-012<br> maximum iterations=50, maximum function
evaluations=10000<br> tolerances: relative=1e-008, absolute=1e-050,
solution=1e-008<br> total number of linear solver iterations=3<br>
total number of function evaluations=4<br> KSP
Object:<br> type: gmres<br>
GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
Orthogonaliza<br>tion with no iterative
refinement<br> GMRES: happy breakdown tolerance
1e-030<br> maximum iterations=10000, initial guess is
zero<br> tolerances: relative=1e-005, absolute=1e-050,
divergence=10000<br> left preconditioning<br> PC
Object:<br> type: ilu<br> ILU: 0
levels of fill<br> ILU: factor fill ratio
allocated 1<br> ILU: tolerance for zero pivot
1e-012<br>
out-of-place
factorization<br>
matrix ordering: natural<br> ILU: factor fill
ratio needed 1<br>
Factored matrix
follows<br> Matrix
Object:<br>
type=seqaij, rows=24,
cols=24<br>
total: nonzeros=392, allocated
nonzeros=840<br>
using I-node routines: found 15 nodes, limit used is 5<br>
linear system matrix = precond matrix:<br> Matrix
Object:<br> type=seqaij, rows=24,
cols=24<br> total: nonzeros=392, allocated
nonzeros=1320<br> using I-node
routines: found 15 nodes, limit used is 5</font></blockquote></div><br><div>This looks pretty clear that the matrix was assembled and the linear system converged in one iteration. Now to see how the matrix was assembled. Are you sure that your FormJacobian was not called?</div>
<div><br></div><div>The option -snes_fd (maybe in an environment variable or a .petscrc file) could assemble a matrix, but it would log the number of function evaluations used to do that. I don't see any evidence that you are building a Jacobian using coloring. You can use a debugger to set a breakpoint in SNESComputeJacobian, then check the value of the pointer snes->ops->computejacobian. It should point at your FormJacobian.</div>