<div dir="ltr"><div dir="ltr">On Wed, Jul 26, 2023 at 8:13 AM maitri ksh <<a href="mailto:maitri.ksh@gmail.com">maitri.ksh@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><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">I have a large sparse matrix (480000x480000) and I need to take its inverse and use it to solve an eigenvalue problem. According to<a href="https://petsc-users.mcs.anl.narkive.com/7sQ6UN4e/sparse-matrix-inversion-using-petsc" target="_blank"> petsc-archive</a>, Barry suggested using  superLU with MatMatSolve() (& not KSPsolver) for matrix sizes of 5000 to 20000. I was wondering two things:<div>a) is it possible to avoid taking the explicit inverse of the large sparse matrix (as was discussed in the archive) for this particular case (in which I am using the matrix-inverse for an eigenvalue problem) </div><div></div></div></blockquote><div><br></div><div>You do not actually want to explicitly invert in most instances. SLEPc will do the right thing automatically.</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 dir="ltr"><div>b) is KSPsolver more suitable here?</div></div></blockquote><div><br></div><div>Most likely.</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 dir="ltr"><div><div>Also, can someone please explain why SuperLU (SuperLU_SEQUENTIAL, which does not involve any parallel computation) is more efficient in dealing with large sparse matrices as compared to MATLAB's inbuilt <a href="https://www.mathworks.com/help/matlab/ref/lu.html" target="_blank">LU</a> solver.</div></div></div>
</blockquote></div><br clear="all"><div>I have no idea what MATLAB is doing. However SuperLU uses the supernodal formulation, and I am not sure that MATLAB does. If you care about the last ounce of performance, it is always worth trying several packages, so you might compare with the serial PETSc LU and MUMPS.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>