On Thu, Jun 21, 2012 at 4:16 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Jun 21, 2012, at 3:40 PM, Matthew Knepley wrote:<br>
<br>
> On Thu, Jun 21, 2012 at 2:08 PM, Blaise Bourdin <<a href="mailto:bourdin@lsu.edu">bourdin@lsu.edu</a>> wrote:<br>
><br>
> On Jun 21, 2012, at 2:55 PM, Matthew Knepley wrote:<br>
><br>
>> On Thu, Jun 21, 2012 at 1:11 PM, Blaise Bourdin <<a href="mailto:bourdin@math.lsu.edu">bourdin@math.lsu.edu</a>> wrote:<br>
>> Hi,<br>
>><br>
>> PetscLogView does not display the same amount of information as running with -log_summary. In the "summary of stages" section, the former contains only information on the main stage while the later contains much more.<br>
>><br>
>> Add the following block at the end of src/snes/examples/tutorials/ex1.c, for instance, to see what I mean<br>
>> PetscViewer viewer;<br>
>> ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD,"ex1-log.py",&viewer);CHKERRQ(ierr);<br>
>> ierr = PetscLogViewPython(viewer);CHKERRQ(ierr);<br>
>> ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);<br>
>> ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD,"ex1-log.txt",&viewer);CHKERRQ(ierr);<br>
>> ierr = PetscLogView(viewer);CHKERRQ(ierr);<br>
>> ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);<br>
>> ierr = PetscLogPrintDetailed(PETSC_COMM_WORLD,"ex1-logdetailed.txt");CHKERRQ(ierr);<br>
>><br>
>> Is this a bug or a feature? Is there a way to get the same output as -log_summary in a file, without printing it to stdout?<br>
>><br>
>> -log_summary just calls PetscLogView(). I am not sure how there could be a problem. I will run it. However, can you<br>
>> just use<br>
>><br>
>> -log_summary <filename><br>
><br>
> That works, yes. Is the issue that stages / events need to be activated a priori, which is not possible when PetscLogView is only called at the end of the program?<br>
><br>
> Crap.<br>
<br>
Matt, why is this "Crap" its completely reasonable that if you want to have logging from program control that you have to turn it on programatically?<br></blockquote><div><br></div><div>Crap, because I should have remembered earlier.</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">
> If you do not provide -log_summary, you need PetscLogBegin() at the beginning.<br>
><br>
> Matt<br>
><br>
> The caveat is that I am assuming that when using log_summary, the log is written as part of PetscFinalize, so that if a job is killed by the sceduler or the user, there is no way to get an idea of the performances. I like to print the log every so often.<br>
><br>
> Blaise<br>
><br>
> --<br>
> Department of Mathematics and Center for Computation & Technology<br>
> Louisiana State University, Baton Rouge, LA 70803, USA<br>
> Tel. <a href="tel:%2B1%20%28225%29%20578%201612" value="+12255781612">+1 (225) 578 1612</a>, Fax <a href="tel:%2B1%20%28225%29%20578%204276" value="+12255784276">+1 (225) 578 4276</a> <a href="http://www.math.lsu.edu/~bourdin" target="_blank">http://www.math.lsu.edu/~bourdin</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> 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<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>