<div dir="ltr"><div>Hi Hong,</div><div><br></div>Thank you, this is very helpful! <div><br></div><div>Using this method I am able to get the memory estimates before the actual solve, however, I think my code may be causing the symbolic factorization to be run twice. Attached is my code where I am using SLEPc to compute eigenvalues, and I use MUMPS for factorization. I have commented above the code that computes the memory estimates, could you please check and tell me if this would cause the symbolic factor to be computed twice (a second time inside EPSSolve?), as I am seeing a slight increase in the overall computation time?</div><div><br></div><div>Regards,</div><div>Varun</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 12, 2022 at 7:58 AM Zhang, Hong <<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline">PCFactorSetMatSolverType(pc,MATSOLVERMUMPS);</span><br>
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline">  PCFactorSetUpMatSolverType(pc); </span><br style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline">  PCFactorGetMatrix(pc,&F);</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline">  MatLUFactorSymbolic(F,A,...)<br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline">  You must provide row and column permutations etc,    petsc/src/mat/tests/ex125.c may give you a clue on how to get these inputs.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline">Hong</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:monospace;font-size:14px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div id="gmail-m_-212029888805331674appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-212029888805331674divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> petsc-users <<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>> on behalf of Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com" target="_blank">junchao.zhang@gmail.com</a>><br>
<b>Sent:</b> Wednesday, January 12, 2022 9:03 AM<br>
<b>To:</b> Varun Hiremath <<a href="mailto:varunhiremath@gmail.com" target="_blank">varunhiremath@gmail.com</a>><br>
<b>Cc:</b> Peder Jørgensgaard Olesen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [petsc-users] PETSc MUMPS interface</font>
<div> </div>
</div>
<div>
<div dir="ltr">Calling PCSetUp() before KSPSetUp()?
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">--Junchao Zhang</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Jan 12, 2022 at 3:00 AM Varun Hiremath <<a href="mailto:varunhiremath@gmail.com" target="_blank">varunhiremath@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi All,
<div><br>
</div>
<div>I want to collect MUMPS memory estimates based on the initial symbolic factorization analysis before the actual numerical factorization starts to check if the estimated memory requirements fit the available memory.</div>
<div><br>
</div>
<div>I am following the steps from <a href="https://petsc.org/main/src/ksp/ksp/tutorials/ex52.c.html" target="_blank">
https://petsc.org/main/src/ksp/ksp/tutorials/ex52.c.html</a></div>
<div><span style="color:rgb(0,0,0)"><br>
</span></div>
<font face="monospace">  PCFactorSetMatSolverType(pc,MATSOLVERMUMPS);<br>
  PCFactorSetUpMatSolverType(pc); <br>
  PCFactorGetMatrix(pc,&F);<br>
<br>
  KSPSetUp(ksp);<br>
  MatMumpsGetInfog(F,...)</font>
<div><font face="monospace"><br>
</font></div>
<div><font face="arial, sans-serif">But it appears </font><font face="monospace">KSPSetUp
</font><font face="arial, sans-serif">calls both symbolic and numerical factorization. So is there some other way to get these statistics before the actual factorization starts?</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif">Thanks,</font></div>
<div><font face="arial, sans-serif">Varun</font></div>
</div>
</blockquote>
</div>
</div>
</div>

</blockquote></div>