<div dir="ltr"><div dir="ltr">On Tue, Jun 10, 2025 at 7:44 AM SCOTTO Alexandre <<a href="mailto:alexandre.scotto@irt-saintexupery.com">alexandre.scotto@irt-saintexupery.com</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-5196447573651884153">
<div lang="EN-GB">
<div class="m_-5196447573651884153WordSection1">
<p class="MsoNormal"><span lang="FR" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hello Mat,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">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
<a href="https://urldefense.us/v3/__https://petsc.org/main/petsc4py/reference/petsc4py.PETSc.html__;!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxba-1ldY8$" target="_blank">https://petsc.org/main/petsc4py/reference/petsc4py.PETSc.html</a>
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">So maybe this is not accessible in Python.</span></p></div></div></div></blockquote><div><br></div><div>Yes, it looks like the new LogHandler interface, necessary for nested logging like flamegraphs, is not in petsc4py. We will have to add it.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-5196447573651884153"><div lang="EN-GB"><div class="m_-5196447573651884153WordSection1"><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"> </span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Alexandre.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="FR" style="font-size:11pt;font-family:Calibri,sans-serif">De :</span></b><span lang="FR" style="font-size:11pt;font-family:Calibri,sans-serif"> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>
<br>
<b>Envoyé :</b> mardi 10 juin 2025 13:28<br>
<b>À :</b> SCOTTO Alexandre <<a href="mailto:alexandre.scotto@irt-saintexupery.com" target="_blank">alexandre.scotto@irt-saintexupery.com</a>><br>
<b>Cc :</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Objet :</b> Re: [petsc-users] Profiling objects creation<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Jun 10, 2025 at 5:30 AM SCOTTO Alexandre via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal"><span lang="FR">Dear PETSc community,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="FR"> </span><u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I have used the -log_view option to get information on the run in a dedicated file, and I got this (among other infirmation):<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36pt">
<img border="0" width="582" height="115" style="width: 6.0625in; height: 1.1979in;" id="m_-5196447573651884153m_-5147562443721486098Image_x0020_1" src="cid:ii_1975a0b45db4cff311"><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:36pt">
<u></u><u></u></p>
<p class="MsoNormal">This is precisely the information I am interested in, but here only the process 0 is tracked.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You want to access<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> <a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/Log/PetscLogState/__;!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbRt_afMq$" target="_blank">https://petsc.org/main/manualpages/Log/PetscLogState/</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">which you get using<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> <a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/Log/PetscLogGetState/__;!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbelDML9w$" target="_blank">https://petsc.org/main/manualpages/Log/PetscLogGetState/</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> Matt<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal">Thanks in advance,<u></u><u></u></p>
<p class="MsoNormal">Regards.<u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><span class="m_-5196447573651884153gmailsignatureprefix">-- </span><u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">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<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbfwBVdvC$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cksrPnF_zRr19WbGYSajXPttTjWjk6YeKgg0Gp8Lk-nyTXp1XdibretqDhGHAAPWTauMuS1SLlgxbfwBVdvC$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>