On Tue, Jun 10, 2025 at 7:44 AM SCOTTO Alexandre < alexandre.sco...@irt-saintexupery.com> wrote:
> Hello Mat, > > > > Thanks for your answer. I think this object is not available in petsc4py, > at least I do not see any related elements in the documentation > https://urldefense.us/v3/__https://petsc.org/main/petsc4py/reference/petsc4py.PETSc.html__;!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxba-1ldY8$ > > > > > So maybe this is not accessible in Python. > Yes, it looks like the new LogHandler interface, necessary for nested logging like flamegraphs, is not in petsc4py. We will have to add it. Thanks, Matt > > > Regards, > > Alexandre. > > > > *De :* Matthew Knepley <knep...@gmail.com> > *Envoyé :* mardi 10 juin 2025 13:28 > *À :* SCOTTO Alexandre <alexandre.sco...@irt-saintexupery.com> > *Cc :* petsc-users@mcs.anl.gov > *Objet :* Re: [petsc-users] Profiling objects creation > > > > On Tue, Jun 10, 2025 at 5:30 AM SCOTTO Alexandre via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > Dear PETSc community, > > > > I am using the PETSc API petsc4py and I am interested in profiling the > number of PETSc objects created during the run of my script. > > > > I have used the -log_view option to get information on the run in a > dedicated file, and I got this (among other infirmation): > > > > > > This is precisely the information I am interested in, but here only the > process 0 is tracked. > > > > I is possible to have the same type of information for all the processes? > I went through the documentation and was not able to figure it out. > > > > You want to access > > > > > https://urldefense.us/v3/__https://petsc.org/main/manualpages/Log/PetscLogState/__;!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbRt_afMq$ > > > > > which you get using > > > > > https://urldefense.us/v3/__https://petsc.org/main/manualpages/Log/PetscLogGetState/__;!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbelDML9w$ > > > > > Thanks, > > > > Matt > > > > Thanks in advance, > > Regards. > > > > > -- > > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > > > https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbbSWAeiw$ > > <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbfwBVdvC$ > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbbSWAeiw$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbfwBVdvC$ >