<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
</head>
<body>
<div style="font-family:Helvetica,Arial;font-size:13px; ; ">Hi Ellen,</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; ">Per Jed’s suggestion, seeing the monitor and ls_monitor outputs would certainly be helpful.</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; ">The line search for CG (and other Tao algorithms) have safeguard steps for failures. When the line search fails to determine a valid step length for the computed CG direction, the search direction
falls back to gradient descent for a second line search. If the gradient descent step succeeds here, then the CG updates restart again from that point (discarding previously updated information completely). LS failure is reported to the user only if this safeguard
also fails to produce a viable step length, which then suggests that the computed gradient at that point may be incorrect or have significant numerical errors. </div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; ">If you can afford a slow run for debugging, you can use “-tao_test_gradient” to check your gradient against the FD approximation at every iteration throughout the run. If you’re confident that the
gradient is accurate, I would recommend testing with “-tao_bncg_type gd” for a pure gradient descent run, and also trying out “-tao_type bqnls” for the quasi-Newton method (only requires the gradient, no Hessian).</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ; "><br>
</div>
<div class="gmail_signature">—
<div>Alp Dener</div>
<div>Postdoctoral Researcher</div>
<div>Argonne National Laboratory</div>
<div>https://www.anl.gov/profile/alp-dener</div>
</div>
<br>
<p class="airmail_on">On February 26, 2020 at 11:44:15 AM, Jed Brown (<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>) wrote:</p>
<blockquote type="cite" class="clean_bq"><span>
<div>
<div></div>
<div>Could you share output for your current configuration with -tao_monitor -tao_ls_monitor -tao_view?
<br>
<br>
"Ellen M. Price" <ellen.price@cfa.harvard.edu> writes: <br>
<br>
> Hello PETSc users! <br>
> <br>
> I am using Tao for an unconstrained minimization problem. I have found <br>
> that CG works better than the other types for this application. After <br>
> about 85 iterations, I get an error about line search failure. I'm not <br>
> clear on what this means, or how I could mitigate the problem, and <br>
> neither the manual nor FAQ give any guidance. Can anyone suggest things <br>
> I could try to help the method converge? I have function and gradient <br>
> info, but no Hessian. <br>
> <br>
> Thanks, <br>
> Ellen Price <br>
</div>
</div>
</span></blockquote>
</body>
</html>