<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi, </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>SNES does not converge. After&nbsp;I tested following FAQ 
hints but still could not find a reason.</FONT></DIV>
<DIV><FONT size=2>Could you please refer to the following THREE outputs to give 
me some hints.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>================OUTPUT 1=============</FONT></DIV>
<DIV><FONT size=2>C:\cygwin\home\rabbit\pGFEM-test&gt;pgfem -info<BR>[0] 
PetscInitialize(): PETSc successfully started: number of processors = 1<BR>[0] 
PetscGetHostName(): Rejecting domainname, likely is NIS RTI458-LAPTOP=(?.<BR>[0] 
PetscInitialize(): Running on machine: RTI458-LAPTOP<BR>[0] 
PetscCommDuplicate(): Duplicating a communicator 1140850688 -2080374784 
max<BR>tags = 2147483647<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483647<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850688 -20803747<BR>84<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483646<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850688 -20803747<BR>84<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483645<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850688 -20803747<BR>84<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483644<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483643<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483642<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850688 -20803747<BR>84<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483641<BR>atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, 
maxf=10000<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483640<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483639<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483638<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483637<BR>[0] MatSetUpPreallocation(): Warning not preallocating matrix 
storage<BR>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 24 X 24; storage space: 264 
unneeded,5<BR>76 used<BR>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during 
MatSetValues() is 48<BR>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row 
is 24<BR>[0] Mat_CheckInode(): Found 5 nodes of 24. Limit used: 5. Using Inode 
routines<BR>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 24 X 24; storage space: 
184 unneeded,3<BR>92 used<BR>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs 
during MatSetValues() is 0<BR>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in 
any row is 24<BR>[0] Mat_CheckInode(): Found 15 nodes of 24. Limit used: 5. 
Using Inode routines<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483636<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483635<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483634<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483633<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483632<BR>[0] PCSetUp(): Setting up new PC<BR>[0] PetscCommDuplicate(): 
Duplicating a communicator 1140850689 -2080374783 max<BR>tags = 
2147483647<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483647<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850689 -20803747<BR>83<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483646<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850689 -20803747<BR>83<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483645<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850689 -20803747<BR>83<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483644<BR>[0] PetscCommDuplicate(): Using internal PETSc communicator 
1140850689 -20803747<BR>83<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning 
tag 2147483643<BR>[0] PetscCommDuplicate():&nbsp;&nbsp; returning tag 
2147483631<BR>[0] KSPDefaultConverged(): Linear solver has converged. Residual 
norm 6.43598e-0<BR>08 is less than relative tolerance 1e-005 times initial right 
hand side norm 0.0<BR>984377 at iteration 1<BR>[0] SNESSolve_LS(): iter=0, 
linear solve iterations=1<BR>[0] SNESLSCheckResidual_Private(): 
||J^T(F-Ax)||/||F-AX|| 4.72897e+006 near zero<BR>&nbsp;implies inconsistent 
rhs<BR>[0] SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=5.00000<BR>00000000003e-002<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=2.23337<BR>96462448683e-002<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=1.05579<BR>95926265388e-002<BR>[0] SNESLineSearchCubic(): Cubically 
determined step, lambda=5.2789979631326939e<BR>-003<BR>[0] SNESSolve_LS(): 
fnorm=7.0710677904340784e+000, gnorm=7.0372413153730617e+000<BR>, 
ynorm=9.8437692875833122e-002, lssucceed=1<BR>[0] MatAssemblyEnd_SeqAIJ(): 
Matrix size: 24 X 24; storage space: 56 unneeded,57<BR>6 used<BR>[0] 
MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 16<BR>[0] 
MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 24<BR>[0] 
Mat_CheckInode(): Found 5 nodes of 24. Limit used: 5. Using Inode 
routines<BR>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 24 X 24; storage space: 
184 unneeded,3<BR>92 used<BR>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs 
during MatSetValues() is 0<BR>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in 
any row is 24<BR>[0] Mat_CheckInode(): Found 15 nodes of 24. Limit used: 5. 
Using Inode routines<BR>[0] PCSetUp(): Setting up PC with same nonzero 
pattern<BR>[0] KSPDefaultConverged(): Linear solver has converged. Residual norm 
3.06534e-0<BR>08 is less than relative tolerance 1e-005 times initial right hand 
side norm 0.0<BR>979013 at iteration 1<BR>[0] SNESSolve_LS(): iter=1, linear 
solve iterations=1<BR>[0] SNESLSCheckResidual_Private(): ||J^T(F-Ax)||/||F-AX|| 
3.89599e+006 near zero<BR>&nbsp;implies inconsistent rhs<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=5.00000<BR>00000000003e-002<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=2.04981<BR>30512175090e-002<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=7.90835<BR>12647314651e-003<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=1.64025<BR>15420099921e-003<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=1.64025<BR>15420099923e-004<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=2.40360<BR>10928094253e-005<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=3.57264<BR>27106588782e-006<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=5.33322<BR>51840976446e-007<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=7.91785<BR>19721784329e-008<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=1.14184<BR>37592725693e-008<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=1.41828<BR>88220817760e-009<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=1.41828<BR>88220817761e-010<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=1.41828<BR>88220817761e-011<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=1.41828<BR>88220817762e-012<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=1.41828<BR>88220817764e-013<BR>[0] SNESLineSearchCubic(): Cubic step no 
good, shrinking lambda,&nbsp; lambda=1.41828<BR>88220817765e-014<BR>[0] 
SNESLineSearchCubic(): Cubic step no good, shrinking lambda,&nbsp; 
lambda=1.41828<BR>88220817765e-015<BR>[0] SNESLineSearchCubic(): Unable to find 
good step length! 18<BR>[0] SNESLineSearchCubic(): 
fnorm=7.0372413153730617e+000, gnorm=7.03724146468665<BR>79e+000, 
ynorm=9.7901291669040949e-002, lambda=1.4182888220817765e-015, 
initial<BR>slope=-4.9522772347319197e+001<BR>[0] SNESSolve_LS(): 
fnorm=7.0372413153730617e+000, gnorm=7.0372414646866579e+000<BR>, 
ynorm=9.7901291669040949e-002, lssucceed=0<BR>[0] SNESLSCheckLocalMin_Private(): 
|| J^T F|| 3.8948e+006 near zero implies foun<BR>d a local minimum<BR>STEP 0 
(Newton iterations: 2)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>diverged reason: DIVERGED_LS_FAILURE<BR>[0] Petsc_DelComm(): 
Deleting PETSc communicator imbedded in a user MPI_Comm 114<BR>0850689<BR>[0] 
PetscCommDestroy(): Deleting PETSc MPI_Comm -2080374783<BR>[0] Petsc_DelComm(): 
Deleting PETSc communicator imbedded in a user MPI_Comm -20<BR>80374783<BR>[0] 
Petsc_DelTag(): Deleting tag data in an MPI_Comm -2080374783</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>===============OUTPUT 2==================</FONT></DIV>
<DIV><FONT size=2>C:\cygwin\home\rabbit\pGFEM-test&gt;pgfem -snes_type 
test<BR>atol=1e-050, rtol=1e-008, stol=1e-008, maxit=50, maxf=10000<BR>Testing 
hand-coded Jacobian, if the ratio is<BR>O(1.e-8), the hand-coded Jacobian is 
probably correct.<BR>Run with -snes_test_display to show difference<BR>of 
hand-coded and finite difference Jacobian.<BR>Norm of matrix ratio 5.91627e-007 
difference 23.5238<BR>Norm of matrix ratio 2.1444e-007 difference 
8.52641<BR>Norm of matrix ratio 2.49179e-007 difference 9.90765<BR>[0]PETSC 
ERROR: SNESSolve() line 1871 in 
src/snes/interface/C:\cygwin\home\PETSC<BR>-~1.3-P\src\snes\INTERF~1\snes.c<BR>[0]PETSC 
ERROR: User provided function() line 302 in 
unknowndirectory/c:\cygwin\<BR>home\rabbit\pgfem - csrbf\domain.cpp<BR>[0]PETSC 
ERROR: User provided function() line 34 in 
unknowndirectory/c:\cygwin\h<BR>ome\rabbit\pgfem - csrbf\main.cpp</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>=================OUTPUT 3===============</FONT></DIV>
<DIV><FONT size=2>C:\cygwin\home\rabbit\pGFEM-test&gt;pgfem -snes_mf_operator 
-ksp_monitor_true_residual</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>.......</FONT></DIV>
<DIV><FONT size=2>&nbsp;0 KSP preconditioned resid norm 1.393538348796e-001 true 
resid norm 7.81673715<BR>5471e-001 ||Ae||/||Ax|| 1.000000000000e+000<BR>&nbsp; 1 
KSP preconditioned resid norm 8.503891307640e-002 true resid norm 
9.78452660<BR>6728e-001 ||Ae||/||Ax|| 1.251740516806e+000<BR>&nbsp; 2 KSP 
preconditioned resid norm 2.769264336444e-005 true resid norm 
3.06983248<BR>7178e+001 ||Ae||/||Ax|| 3.927255613334e+001<BR>&nbsp; 3 KSP 
preconditioned resid norm 2.140259007162e-005 true resid norm 
3.58014377<BR>1001e+001 ||Ae||/||Ax|| 4.580099982632e+001<BR>&nbsp; 4 KSP 
preconditioned resid norm 3.271042954922e-006 true resid norm 
3.39507468<BR>5413e+000 ||Ae||/||Ax|| 4.343339961273e+000<BR>&nbsp; 5 KSP 
preconditioned resid norm 8.052808588169e-009 true resid norm 
5.12770240<BR>1411e-002 ||Ae||/||Ax|| 6.559901272645e-002<BR>&nbsp;29 SNES 
Function norm 7.688867566940e-001<BR>&nbsp;........</FONT></DIV>
<DIV><FONT size=2>&nbsp; 0 KSP preconditioned resid norm 9.650772260845e-002 
true resid norm 6.46872347<BR>8452e-001 ||Ae||/||Ax|| 
1.000000000000e+000<BR>&nbsp; 1 KSP preconditioned resid norm 
8.382067825597e-002 true resid norm 8.95465886<BR>5836e-001 ||Ae||/||Ax|| 
1.384300765934e+000<BR>&nbsp; 2 KSP preconditioned resid norm 
2.770083563275e-005 true resid norm 4.75963661<BR>5364e+001 ||Ae||/||Ax|| 
7.357922519363e+001<BR>&nbsp; 3 KSP preconditioned resid norm 
1.746905778563e-005 true resid norm 5.65561314<BR>8780e+001 ||Ae||/||Ax|| 
8.743012694265e+001<BR>&nbsp; 4 KSP preconditioned resid norm 
2.595985260271e-006 true resid norm 4.85638048<BR>7409e+000 ||Ae||/||Ax|| 
7.507478876761e+000<BR>&nbsp; 5 KSP preconditioned resid norm 
1.791711722028e-007 true resid norm 6.13620207<BR>0783e-002 ||Ae||/||Ax|| 
9.485955136624e-002<BR>&nbsp;50 SNES Function norm 6.449968664911e-001<BR>STEP 0 
(Newton iterations: 50)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>diverged reason: DIVERGED_MAX_IT</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
size=2>C:\cygwin\home\rabbit\pGFEM-test&gt;</FONT></DIV></BODY></HTML>