[petsc-dev] PetscLogView vs. -log_summary

Blaise Bourdin bourdin at lsu.edu
Thu Jun 21 15:45:58 CDT 2012


On Jun 21, 2012, at 3:40 PM, Matthew Knepley wrote:

> On Thu, Jun 21, 2012 at 2:08 PM, Blaise Bourdin <bourdin at lsu.edu> wrote:
> 
> On Jun 21, 2012, at 2:55 PM, Matthew Knepley wrote:
> 
>> On Thu, Jun 21, 2012 at 1:11 PM, Blaise Bourdin <bourdin at math.lsu.edu> wrote:
>> Hi,
>> 
>> 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.
>> 
>> Add the following block at the end of src/snes/examples/tutorials/ex1.c, for instance, to see what I mean
>>  PetscViewer viewer;
>>  ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD,"ex1-log.py",&viewer);CHKERRQ(ierr);
>>  ierr = PetscLogViewPython(viewer);CHKERRQ(ierr);
>>  ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
>>  ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD,"ex1-log.txt",&viewer);CHKERRQ(ierr);
>>  ierr = PetscLogView(viewer);CHKERRQ(ierr);
>>  ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
>>  ierr = PetscLogPrintDetailed(PETSC_COMM_WORLD,"ex1-logdetailed.txt");CHKERRQ(ierr);
>> 
>> 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?
>> 
>> -log_summary just calls PetscLogView(). I am not sure how there could be a problem. I will run it. However, can you
>> just use
>> 
>>   -log_summary <filename>
> 
> 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?
> 
> Crap. If you do not provide -log_summary, you need PetscLogBegin() at the beginning.

Of course... It is even written in the manual page for PetscLogView 

Thanks,

Blaise



-- 
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120621/347f74ac/attachment.html>


More information about the petsc-dev mailing list