<div dir="ltr">Hi Justin,<div><br></div><div>I have pushed these changes to the "next" branch, your code snippet should work fine there.</div><div><br></div><div>Note that there is also available (since version 3.5.0) the routine TaoGetSolutionStatus(tao,&its,NULL,NULL,NULL,NULL,NULL) which will provide the</div><div>same information</div><div><br></div><div>Jason</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 6:28 PM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@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><span class="">
<div dir="ltr">
<div>
<div>
<div>Whatever is convenient and/or follow the "PETSc" standards. Something similar to SNESGetIterationNumber() or KSPGetIterationNumber() would be nice. Ideally I want my code to look like this:<br>
<br>
</div>
ierr = TaoGetIterationNumber(tao,&its);CHKERRQ(ierr);<br>
</div>
ierr = PetscPrintf(PETSC_COMM_WORLD, "Number of Tao iterations = %D\n", its);<br>
<br>
</div>
<div>Thanks :)<br>
</div>
</div>
</span><div class="gmail_extra"><br>
<div class="gmail_quote"><span class="">On Fri, Apr 10, 2015 at 5:53 PM, Jason Sarich <span dir="ltr">
<<a href="mailto:jason.sarich@gmail.com" target="_blank">jason.sarich@gmail.com</a>></span> wrote:<br>
</span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Hi Justin, I'll get this in. I assume that displaying the number of iterations with tao_converged_reason is what you are asking for in particular? Or did you have something else in mind?</p>
<span><font color="#888888">
<p dir="ltr">Jason</p>
</font></span>
<div class="gmail_quote"><span>On Apr 10, 2015 16:42, "Smith, Barry F." <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote:<br type="attribution">
</span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
Justin,<br>
<br>
Sorry TAO simply doesn't even collect this information currently. But yes we should definitely make it available!<br>
<br>
Jason,<br>
<br>
Could you please add this; almost all the TaoSolve_xxx() have a local variable iter; change that to tao->niter (I'm guess this is suppose to capture this information) and add a TaoGetIterationNumber() and the uses can access this. Also modify at the end
of TaoSolve() -tao_converged_reason to also print the iteration count. At the same time since you add this you can add a tao->totalits which would accumulate all iterations over all the solves for that Tao object and the routine TaoGetTotalIterations() to
access this. Note that TaoSolve() would initialize tao->niter = 0 at the top.<br>
<br>
Thanks<br>
<br>
Barry<br>
<br>
<br>
<br>
> On Apr 10, 2015, at 4:16 PM, Justin Chang <<a href="mailto:jchang27@uh.edu" target="_blank">jchang27@uh.edu</a>> wrote:<br>
><br>
</span>
<div>
<div>> Hi all,<br>
><br>
> Is there a way to generically obtain the number of Tao iterations? I am looking through the -help options for Tao and I don't see any metric where you can output this quantity in the manner that you could for SNES or KSP solves. I am currently using blmvm
and tron, and the only way I can see getting this metric is by outputting -tao_view and/or -tao_monitor and manually finding this number. I find this cumbersome especially for transient problems where I would like to simply have this number printed for each
step instead of ending up with unnecessary info.<br>
><br>
> Thanks,<br>
><br>
><br>
> --<br>
> Justin Chang<br>
> PhD Candidate, Civil Engineering - Computational Sciences<br>
> University of Houston, Department of Civil and Environmental Engineering<br>
> Houston, TX 77004<br>
> <a href="tel:%28512%29%20963-3262" value="+15129633262" target="_blank">(512) 963-3262</a><br>
<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div></div></div>
<br>
</div>
</div>
</blockquote></div><br></div>