[petsc-users] Improving efficiency of slepc usage
Jose E. Roman
jroman at dsic.upv.es
Thu Aug 19 02:58:29 CDT 2021
In A) convergence may be slow, especially if the wanted eigenvalues have small magnitude. I would not say 600 iterations is a lot, you probably need many more. In most cases, approach B) is better because it improves convergence of eigenvalues close to the target, but it requires prior knowledge of your spectrum distribution in order to choose an appropriate target.
In B) what do you mean that it crashes. If you get an error about factorization, it means that your A-matrix is singular, In that case, try using a nonzero target -eps_target 0.1
Jose
> El 19 ago 2021, a las 7:12, dazza simplythebest <sayosale at hotmail.com> escribió:
>
> Dear All,
> I am planning on using slepc to do a large number of eigenvalue calculations
> of a generalized eigenvalue problem, called from a program written in fortran using MPI.
> Thus far I have successfully installed the slepc/PETSc software, both locally and on a cluster,
> and on smaller test problems everything is working well; the matrices are efficiently and
> correctly constructed and slepc returns the correct spectrum. I am just now starting to move
> towards now solving the full-size 'production run' problems, and would appreciate some
> general advice on how to improve the solver's performance.
>
> In particular, I am currently trying to solve the problem Ax = lambda Bx whose matrices
> are of size 50000 (this is the smallest 'production run' problem I will be tackling), and are
> complex, non-Hermitian. In most cases I aim to find the eigenvalues with the largest real part,
> although in other cases I will also be interested in finding the eigenvalues whose real part
> is close to zero.
>
> A)
> Calling slepc 's EPS solver with the following options:
>
> -eps_nev 10 -log_view -eps_view -eps_max_it 600 -eps_ncv 140 -eps_tol 5.0e-6 -eps_largest_real -eps_monitor :monitor_output.txt
>
>
> led to the code successfully running, but failing to find any eigenvalues within the maximum 600 iterations
> (examining the monitor output it did appear to be very slowly approaching convergence).
>
> B)
> On the same problem I have also tried a shift-invert transformation using the options
>
> -eps_nev 10 -eps_ncv 140 -eps_target 0.0+0.0i -st_type sinvert
>
> -in this case the code crashed at the point it tried to call slepc, so perhaps I have incorrectly specified these options ?
>
>
> Does anyone have any suggestions as to how to improve this performance ( or find out more about the problem) ?
> In the case of A) I can see from watching the slepc videos that increasing ncv
> may help, but I am wondering , since 600 is a large number of iterations, whether there
> maybe something else going on - e.g. perhaps some alternative preconditioner may help ?
> In the case of B), I guess there must be some mistake in these command line options?
> Again, any advice will be greatly appreciated.
> Best wishes, Dan.
More information about the petsc-users
mailing list