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