[petsc-users] Tracing PETSc codes

Barry Smith bsmith at mcs.anl.gov
Sat Sep 2 19:20:25 CDT 2017


  Ahh, you should be able to do this with any debugger like gdb, lldb, or the Intel compiler. Each has separate commands for "watching" or "tracing" variables when they change values.  You can use the PETSc command line option -start_in_debugger to run in parallel. Or if you have access to Totalview, it is a parallel graphical debugger.

   Barry

> On Sep 2, 2017, at 7:17 PM, Afrah Najib <afrah.nacib at gmail.com> wrote:
> 
> I mean debugging the code by adding break points etc, so that I can trace how variables are changing at each line of code 
> 
> On 3 September 2017 at 03:09, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>   What do you mean by trace?  The PETSc -log_view option gives a high level view of where the time is being spent, vector operations, preconditioners etc. This is usually all you need to understand where the time is being spent and what might need to be optimized.
> 
>    Barry
> 
> > On Sep 2, 2017, at 6:59 PM, Afrah Najib <afrah.nacib at gmail.com> wrote:
> >
> > Hi,
> > How can I trace PETSc codes to better understand what's going on?
> >
> > I installed code::blocks [http://www.codeblocks.org/downloads] but I know that just pressing build/ run with the default options will not help.
> >
> > Can I trace the codes of PETSc ? Which environment you recommend?
> >
> > Thanks a lot
> 
> 



More information about the petsc-users mailing list