[petsc-users] Does PetscLogEventBegin and PetscLogEventEnd slow down the code if it's called every time step?

Smith, Barry F. bsmith at mcs.anl.gov
Mon Apr 22 00:56:07 CDT 2019



> On Apr 21, 2019, at 8:27 AM, TAY wee-beng via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hi,
> 
> I'm trying to do some logging as well as timing of my code?
> 
> May I know if PetscLogEventBegin and PetscLogEventEnd slow down my code if it's called every time step?

   The logging is only done if the -log_view option is set or PetscLogDefaultBegin() is called. 

   Make two identical runs on the same machine once with -log_view, once without and time them. (use unix time on a work station and perhaps the patch system you use provides runtime information). Make the machines have the same load (or lack of load) on them to get a fair comparison. It would be very surprising if the -log_view version had a nontrivial effect on the run times.

  Barry

> 
> -- 
> Thank you very much.
> 
> Yours sincerely,
> 
> ================================================
> TAY Wee-Beng 郑伟明 (Zheng Weiming)
> Personal research webpage: http://tayweebeng.wixsite.com/website
> Youtube research showcase: https://goo.gl/PtvdwQ
> linkedin: https://www.linkedin.com/in/tay-weebeng
> ================================================
> 



More information about the petsc-users mailing list