On Wed, Jul 26, 2023 at 8:13 AM maitri ksh <maitri....@gmail.com> wrote:
> I have a large sparse matrix (480000x480000) and I need to take its > inverse and use it to solve an eigenvalue problem. According to > petsc-archive > <https://petsc-users.mcs.anl.narkive.com/7sQ6UN4e/sparse-matrix-inversion-using-petsc>, > Barry suggested using superLU with MatMatSolve() (& not KSPsolver) for > matrix sizes of 5000 to 20000. I was wondering two things: > 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) > You do not actually want to explicitly invert in most instances. SLEPc will do the right thing automatically. > b) is KSPsolver more suitable here? > Most likely. > 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 LU > <https://www.mathworks.com/help/matlab/ref/lu.html> solver. > 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. Thanks, Matt -- 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://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>