[petsc-users] linesearch problem in snes composite

Xiangdong epscodes at gmail.com
Wed Jun 15 10:31:10 CDT 2016


Hello everyone,

I am using the snes composite with the following options:
-snes_type composite
-snes_composite_type multiplicative
-snes_composite_sneses newtonls
-snes_linesearch_type bt
-sub_0_snes_linesearch_type basic
-snes_linesearch_monitor
-sub_0_snes_linesearch_monitor

I only use single newtonls in the composite for helping me understand how
the composite works. By specifying the -snes_linesearch_type bt, I am
expecting the norm decrease in each iterations. Moreover,
-snes_linesearch_monitor should print the information on the step size.
However, when I ran the codes, I found that no information on the step size
of linesearch is output and the residual norm sometimes is NOT decreasing
given the bt option provided. It seems that the snes_linesearch_bt is not
working in this setting or I messed up the options somewhere.

The linesearch works in the sub_0 level if I specify
the -sub_0_snes_linesearch_type bt. I do not understand why it does not
work in the overall level.

Here is the snes norm information as well as the output of snes_view. Is
there a way to get the linesearch working on the overall level?


0 SNES Function norm 1.436371027798e+04
    0 SNES Function norm 1.436371027798e+04
    1 SNES Function norm 1.562640838177e+04
  1 SNES Function norm 1.562640838177e+04
    0 SNES Function norm 1.562640838177e+04
    1 SNES Function norm 5.101254678006e+03
  2 SNES Function norm 5.101254678006e+03
    0 SNES Function norm 5.101254678006e+03
    1 SNES Function norm 1.287999851800e+03
  3 SNES Function norm 1.287999851800e+03
    0 SNES Function norm 1.287999851800e+03
    1 SNES Function norm 3.781864044552e+02
  4 SNES Function norm 3.781864044552e+02
    0 SNES Function norm 3.781864044552e+02
    1 SNES Function norm 9.895411709407e+01
  5 SNES Function norm 9.895411709407e+01
    0 SNES Function norm 9.895411709407e+01
    1 SNES Function norm 6.379856588223e+00
  6 SNES Function norm 6.379856588223e+00
Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 6
SNES Object: 256 MPI processes
  type: composite
  Composite SNES type - MULTIPLICATIVE
  SNESes on composite preconditioner follow
  ---------------------------------
    SNES Object:    (sub_0_)     256 MPI processes
      type: newtonls
      maximum iterations=1, maximum function evaluations=10000
      tolerances: relative=1e-08, absolute=1e-50, solution=1e-08
      total number of linear solver iterations=188
      total number of function evaluations=1
      SNESLineSearch Object:      (sub_0_)       256 MPI processes
        type: basic
        maxstep=1.000000e+08, minlambda=1.000000e-12
        tolerances: relative=1.000000e-08, absolute=1.000000e-15,
lambda=1.000000e-08
        maximum iterations=40
      KSP Object:      (sub_0_)       256 MPI processes
        type: bcgsl
          BCGSL: Ell = 2
          BCGSL: Delta = 0
        maximum iterations=5000, initial guess is zero
        tolerances:  relative=0.001, absolute=1e-50, divergence=10000
        left preconditioning
        using PRECONDITIONED norm type for convergence test
      PC Object:      (sub_0_)       256 MPI processes
        type: sor
          SOR: type = local_symmetric, iterations = 1, local iterations =
1, omega = 1
        linear system matrix = precond matrix:
        Mat Object:        jac         256 MPI processes
          type: mpiaij
          rows=2244000, cols=2244000, bs=2
          total: nonzeros=3.112e+07, allocated nonzeros=3.112e+07
          total number of mallocs used during MatSetValues calls =0
  ---------------------------------
  maximum iterations=10, maximum function evaluations=10000
  tolerances: relative=0.001, absolute=1e-50, solution=1e-08
  total number of linear solver iterations=0
  total number of function evaluations=1
  SNESLineSearch Object:   256 MPI processes
    type: bt
      interpolation: cubic
      alpha=1.000000e-04
    maxstep=1.000000e+08, minlambda=1.000000e-12
    tolerances: relative=1.000000e-08, absolute=1.000000e-15,
lambda=1.000000e-08
    maximum iterations=40
  KSP Object:   256 MPI processes
    type: gmres
      GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
Orthogonalization with no iterative refinement
      GMRES: happy breakdown tolerance 1e-30
    maximum iterations=10000, initial guess is zero
    tolerances:  relative=1e-05, absolute=1e-50, divergence=10000
    left preconditioning
    using DEFAULT norm type for convergence test
  PC Object:   256 MPI processes
    type: lu
    PC has not been set up so information may be incomplete
      LU: out-of-place factorization
      tolerance for zero pivot 2.22045e-14
      matrix ordering: natural

Thank you.

Best,
Xiangdong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160615/bcfc21dd/attachment.html>


More information about the petsc-users mailing list