<div dir="auto">Hi Ellen,<div dir="auto"><br></div><div dir="auto">It is as Alp said. To emphasize what he said, you don't need to worry about using a bounded CG method - the bounded CG methods can be used for unconstrained problems, and are much better than the old unconstrained CG code. </div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Thu, Feb 27, 2020, 9:55 AM Dener, Alp via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<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">It looks like you’re using the old unconstrained CG code. This will be deprecated in the near future in favor of the newer bound-constrained CG algorithm (TAOBNCG) that can also solve unconstrained
problems when the user does not specify any bounds on the problem. </div>
<div style="font-family:Helvetica,Arial;font-size:13px"><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px">The newer TAOBNCG algorithm implements a preconditioner that significantly improves the scaling of the search direction and helps the line search accept the unit step length most of the time. I would
recommend making sure that you’re on PETSc version 3.11 or newer, and then switching to this with “-tao_type bncg”. You will not need to change any of your code to do this. If you still fail to converge, please send a new log with the new algorithm and we
can evaluate the next steps.</div>
<div><br>
</div>
<div>—
<div>Alp Dener</div>
<div>Postdoctoral Researcher</div>
<div>Argonne National Laboratory</div>
<div><a href="https://www.anl.gov/profile/alp-dener" target="_blank" rel="noreferrer">https://www.anl.gov/profile/alp-dener</a></div>
</div>
<br>
<p>On February 26, 2020 at 6:01:34 PM, Ellen Price (<a href="mailto:ellen.price@cfa.harvard.edu" target="_blank" rel="noreferrer">ellen.price@cfa.harvard.edu</a>) wrote:</p>
<blockquote type="cite"><span>
<div>
<div></div>
<div>
<div dir="ltr">
<div>Hi Jed,</div>
<div><br>
</div>
<div>Thanks for getting back to me! Here's the output for my CG config. Sorry it's kind of a lot.<br>
</div>
<div><br>
</div>
<div>Ellen<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Feb 26, 2020 at 12:43 PM Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank" rel="noreferrer">jed@jedbrown.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Could you share output for your current configuration with -tao_monitor -tao_ls_monitor -tao_view?<br>
<br>
"Ellen M. Price" <<a href="mailto:ellen.price@cfa.harvard.edu" target="_blank" rel="noreferrer">ellen.price@cfa.harvard.edu</a>> 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>
</blockquote>
</div>
</div>
</div>
</span></blockquote>
</div>
</blockquote></div></div>