<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 15, 2016 at 10:31 AM, Xiangdong <span dir="ltr"><<a href="mailto:epscodes@gmail.com" target="_blank">epscodes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>I am using the snes composite with the following options: </div><div>-snes_type composite </div><div>-snes_composite_type multiplicative </div><div>-snes_composite_sneses newtonls</div><div>-snes_linesearch_type bt </div><div>-sub_0_snes_linesearch_type basic <br></div><div>-snes_linesearch_monitor<br></div><div>-sub_0_snes_linesearch_monitor</div><div><br></div><div>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. </div><div><br></div><div>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.</div></div></blockquote><div><br></div><div>SNESComposite does not use a line search. I have not seen any theory to suggest that this is a good idea.</div><div><br></div><div>You could get the effect of a line search with SNESComposite by left preconditioning NRICH with it.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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?</div><div><br></div><div><br></div><div><div>0 SNES Function norm 1.436371027798e+04 </div><div> 0 SNES Function norm 1.436371027798e+04 </div><div> 1 SNES Function norm 1.562640838177e+04 </div><div> 1 SNES Function norm 1.562640838177e+04 </div><div> 0 SNES Function norm 1.562640838177e+04 </div><div> 1 SNES Function norm 5.101254678006e+03 </div><div> 2 SNES Function norm 5.101254678006e+03 </div><div> 0 SNES Function norm 5.101254678006e+03 </div><div> 1 SNES Function norm 1.287999851800e+03 </div><div> 3 SNES Function norm 1.287999851800e+03 </div><div> 0 SNES Function norm 1.287999851800e+03 </div><div> 1 SNES Function norm 3.781864044552e+02 </div><div> 4 SNES Function norm 3.781864044552e+02 </div><div> 0 SNES Function norm 3.781864044552e+02 </div><div> 1 SNES Function norm 9.895411709407e+01 </div><div> 5 SNES Function norm 9.895411709407e+01 </div><div> 0 SNES Function norm 9.895411709407e+01 </div><div> 1 SNES Function norm 6.379856588223e+00 </div><div> 6 SNES Function norm 6.379856588223e+00 </div><div>Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 6</div><div>SNES Object: 256 MPI processes</div><div> type: composite</div><div> Composite SNES type - MULTIPLICATIVE</div><div> SNESes on composite preconditioner follow</div><div> ---------------------------------</div><div> SNES Object: (sub_0_) 256 MPI processes</div><div> type: newtonls</div><div> maximum iterations=1, maximum function evaluations=10000</div><div> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08</div><div> total number of linear solver iterations=188</div><div> total number of function evaluations=1</div><div> SNESLineSearch Object: (sub_0_) 256 MPI processes</div><div> type: basic</div><div> maxstep=1.000000e+08, minlambda=1.000000e-12</div><div> tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08</div><div> maximum iterations=40</div><div> KSP Object: (sub_0_) 256 MPI processes</div><div> type: bcgsl</div><div> BCGSL: Ell = 2</div><div> BCGSL: Delta = 0</div><div> maximum iterations=5000, initial guess is zero</div><div> tolerances: relative=0.001, absolute=1e-50, divergence=10000</div><div> left preconditioning</div><div> using PRECONDITIONED norm type for convergence test</div><div> PC Object: (sub_0_) 256 MPI processes</div><div> type: sor</div><div> SOR: type = local_symmetric, iterations = 1, local iterations = 1, omega = 1</div><div> linear system matrix = precond matrix:</div><div> Mat Object: jac 256 MPI processes</div><div> type: mpiaij</div><div> rows=2244000, cols=2244000, bs=2</div><div> total: nonzeros=3.112e+07, allocated nonzeros=3.112e+07</div><div> total number of mallocs used during MatSetValues calls =0</div><div> ---------------------------------</div><div> maximum iterations=10, maximum function evaluations=10000</div><div> tolerances: relative=0.001, absolute=1e-50, solution=1e-08</div><div> total number of linear solver iterations=0</div><div> total number of function evaluations=1</div><div> SNESLineSearch Object: 256 MPI processes</div><div> type: bt</div><div> interpolation: cubic</div><div> alpha=1.000000e-04</div><div> maxstep=1.000000e+08, minlambda=1.000000e-12</div><div> tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08</div><div> maximum iterations=40</div><div> KSP Object: 256 MPI processes</div><div> type: gmres</div><div> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</div><div> GMRES: happy breakdown tolerance 1e-30</div><div> maximum iterations=10000, initial guess is zero</div><div> tolerances: relative=1e-05, absolute=1e-50, divergence=10000</div><div> left preconditioning</div><div> using DEFAULT norm type for convergence test</div><div> PC Object: 256 MPI processes</div><div> type: lu</div><div> PC has not been set up so information may be incomplete</div><div> LU: out-of-place factorization</div><div> tolerance for zero pivot 2.22045e-14</div><div> matrix ordering: natural</div></div><div><br></div><div>Thank you.<br></div><div><br></div><div>Best,</div><div>Xiangdong</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>