[petsc-users] [SLEPc] Best method to compute all eigenvalues of a MatShell
Matthew Knepley
knepley at gmail.com
Mon May 13 13:10:54 CDT 2024
On Mon, May 13, 2024 at 1:40 PM Sreeram R Venkat <srvenkat at utexas.edu>
wrote:
> I have a MatShell object that computes matrix-vector products of a dense
> symmetric matrix of size NxN. The MatShell does not actually form the dense
> matrix, so it is never in memory/storage. For my application, N ranges from
> 1e4 to 1e5. I want
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>
> ZjQcmQRYFpfptBannerEnd
> I have a MatShell object that computes matrix-vector products of a dense
> symmetric matrix of size NxN. The MatShell does not actually form the dense
> matrix, so it is never in memory/storage. For my application, N ranges from
> 1e4 to 1e5.
>
> I want to compute the full spectrum of this matrix. For an example with N
> ~1e4, I was able to use SLEPc's Krylov-Schur solver to get the spectrum in
> about 3 hours running on 6 A100 GPUs. There, I had set the MPD to 2000.
> Before moving on to larger matrices, I wanted to check whether this is the
> best way to go about it. I saw on other posts that for computing full
> spectra of dense matrices, it is generally better to go with
> LAPACK/SCALAPACK. Is the same true for MatShells of dense matrices? The
> matrix-vector products with the shell themselves are really cheap, so I can
> form the dense matrix with MatComputeOperator() and store it to later
> compute with another solver if needed. If SLEPc is not a bad option, what
> is a good way to select MPD/NCV?
>
You can select LAPACK through SLEPc. I would definitely try it since it is
easy. For the complete spectrum, it is likely to be faster (modulo how fast
KS converges).
Thanks,
Matt
> I do need the full spectrum here since I am trying to analyze how the
> spectral decay changes for different problem configurations.
>
> Thanks for your help,
> Sreeram
>
--
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!cLlaAsyk3G1fWIZGlTet7-bB1VMxzmbrmnjxP0IPtxxAA-mYn4vGvI9tzI2x7GXRMPqOjNBQZZrrDoH5JihG$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cLlaAsyk3G1fWIZGlTet7-bB1VMxzmbrmnjxP0IPtxxAA-mYn4vGvI9tzI2x7GXRMPqOjNBQZZrrDie62V3N$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240513/ed94c0a6/attachment.html>
More information about the petsc-users
mailing list