[petsc-users] SLEPc EPS Tolerance

Eda Oktay eda.oktay at metu.edu.tr
Fri Jul 10 11:45:56 CDT 2020


I looked at a2965*2965 sized matrix. I want to ask one last question.

For e-8:

Linear eigensolve converged (2 eigenpairs) due to CONVERGED_TOL; iterations 64
 ---------------------- --------------------
            k             ||Ax-kx||/||kx||
 ---------------------- --------------------
        0.002486            8.60766e-09
        0.004466            1.68813e-09
 ---------------------- --------------------

For e-10:
Linear eigensolve converged (2 eigenpairs) due to CONVERGED_TOL; iterations 74
 ---------------------- --------------------
            k             ||Ax-kx||/||kx||
 ---------------------- --------------------
        0.002486             9.5257e-11
        0.004466            2.12622e-11
 ---------------------- --------------------

But my partition is more qualified when tol=e-8, not e-10.

My last question is: Is this because of the iteration number that
eigensolver tries to find suitable eigenvalues up to this tolerance?

Again, thank you so much!

Jose E. Roman <jroman at dsic.upv.es>, 10 Tem 2020 Cum, 19:36 tarihinde şunu yazdı:
>
> For such small matrix, the solver is essentially solving with a direct method via LAPACK. If you understand how projection methods work, iteration gets in action when the matrix size is larger than the subspace size (ncv). The tolerance is relevant when the solver iterates, not when it computes the solution with LAPACK.
>
> Jose
>
>
> > El 10 jul 2020, a las 18:32, Eda Oktay <eda.oktay at metu.edu.tr> escribió:
> >
> > No, it is of size 9
> >
> > Jose E. Roman <jroman at dsic.upv.es>, 10 Tem 2020 Cum, 19:31 tarihinde şunu yazdı:
> >>
> >> [Please respond to the list.]
> >>
> >> Is your matrix of size 8? This would explain the residuals.
> >>
> >> Jose
> >>
> >>> El 10 jul 2020, a las 17:10, Eda Oktay <eda.oktay at metu.edu.tr> escribió:
> >>>
> >>> I computed residual norm via -eps_error_relative::ascii_info_detail
> >>> for different tolerance numbers (e-4, e-6, e-8, e-10). In each
> >>> tolerance, I got the same table below:
> >>>
> >>> ---------------------- --------------------
> >>>           k             ||Ax-kx||/||kx||
> >>> ---------------------- --------------------
> >>>       3.000000            6.25528e-16
> >>>       3.000000            7.13774e-16
> >>>       3.438447            2.64362e-16
> >>>       5.000000            4.39333e-16
> >>>       6.000000            1.63943e-16
> >>>       6.000000            2.93737e-16
> >>>       6.000000            3.95997e-16
> >>>       7.561553            3.48664e-16
> >>> ---------------------- --------------------
> >>>
> >>> I understood that since relative error is E-16 and this table shows
> >>> eigenvalues whose relative error are below the tolerance, I am getting
> >>> the same table but I still couldn't understand although relative
> >>> errors are so small, how am I getting the most qualified partition in
> >>> e-4 tolerance, not e-8. I am not computing zero eigenvalue I believe,
> >>> since I am using EPSSetWhichEigenpairs(eps,EPS_SMALLEST_MAGNITUDE);
> >>> and I am not getting zero eigenvalue.
> >>>
> >>> Thanks so much for answering!
> >>>
> >>> Jose E. Roman <jroman at dsic.upv.es>, 10 Tem 2020 Cum, 14:09 tarihinde şunu yazdı:
> >>>>
> >>>>
> >>>>
> >>>>> El 10 jul 2020, a las 12:54, Eda Oktay <eda.oktay at metu.edu.tr> escribió:
> >>>>>
> >>>>>> How do you measure accuracy?
> >>>>> Using the word accuracy may be not true actually, I am sorry. I am
> >>>>> using eigenvectors corresponding to these eigenvalues in k-means
> >>>>> algorithm, then do spectral graph partitioning. I must look at the
> >>>>> partition quality. By quality, I mean, the resulting edge cut of my
> >>>>> partitioned graph. I thought that the less tolerance results in more
> >>>>> accuracy, hence more qualified partition.
> >>>>>
> >>>>>> What do you mean "the result was still the same"?
> >>>>> I mean I am still not getting the most qualified solution in E-10,
> >>>>> still E-2 or E-6 gives more qualified partitions, i.e. they give less
> >>>>> edge cut.
> >>>>>
> >>>>>> What is the eigenvalue you are computing?
> >>>>> I am computing the smallest eigenvalue of a Laplacian matrix.
> >>>>
> >>>> You should compute the residual norm, for instance with -eps_error_relative ::ascii_info_detail (see section 2.5.4 of the manual).
> >>>> The relative residual error should be in the order of the tolerance (or smaller) if using the default convergence test, but if you are computing a zero eigenvalue then you may want to use an absolute convergence criterion (see table 2.6 or the manual). A graph Laplacian has at least one zero eigenvalue, unless you deflate it as explained in section 2.6.2 of the manual, see also ex11.c https://slepc.upv.es/documentation/current/src/eps/tutorials/ex11.c.html
> >>>>
> >>>> Jose
> >>>>
> >>
>


More information about the petsc-users mailing list