[petsc-users] Krylov-Schur Tolerance
Jose E. Roman
jroman at dsic.upv.es
Thu Feb 23 04:02:13 CST 2017
No, there is no simple way. You can use EPSGetST() followed by STApply() to compute the residual you mention (it will actually be ||A^{-1}B*x-1/lambda*x|| for STSINVERT with target=0). Also, an estimate of this residual norm is what the monitors will show, e.g. -eps_monitor_all. These values can be retrieved with EPSGetErrorEstimates(), for details see section 2.5.3 of the users manual.
Jose
> El 23 feb 2017, a las 4:50, Christopher Pierce <cmpierce at WPI.EDU> escribió:
>
> Thanks,
>
> That makes a lot of sense. Is there any simple way to query the true
> residual norm of the approximate eigenvector in the equivalent single
> matrix problem? IE ||B^{-1}AX-lambda*X||. I think that would help
> determine the reliability of the computed solution.
>
> Chris
>
>
>
>
>
> On 02/22/17 06:51, Jose E. Roman wrote:
>>> El 20 feb 2017, a las 11:33, Jose E. Roman <jroman at dsic.upv.es> escribió:
>>>
>>>
>>>> El 20 feb 2017, a las 11:01, Christopher Pierce <cmpierce at WPI.EDU> escribió:
>>>>
>>>> It seems to give the same results. I exported the matrices to Matlab
>>>> and checked the estimated condition number of the B matrix which came to
>>>> ~15 and the 2-norm of the B matrix which was ~10^6. I'm guessing that
>>>> the large matrix norm is the problem. I glanced over the source for the
>>>> RQCG solver and it doesn't seem to use a linear solver which is likely
>>>> why it showed better performance. Do you have any suggestions for
>>>> dealing with problems like this?
>>>>
>>>> Chris
>>> Send the data files to my personal email and I will make some tests.
>>> Jose
>>>
>> The large errors that you report can be explained by the fact that both A and B have large norm, in particular ~10^11 and ~10^5, respectively. Note that the norm of the residual ||A*x-lambda*B*X|| can be made arbitrarily large by increasing the matrix norms. So if you scale the matrices so that e.g. norm(B)=1, you will see a reduction of the reported error in several orders of magnitude.
>>
>> On the other hand, note that in case of solving the problem as a GHEP the returned eigenvector is not normalized to have ||x||_2=1, but to have ||x||_B=1, so when showing the relative residual error, SLEPc should divide by ||x||_2, which is quite small in your case. This can be considered a bug in SLEPc that we will fix for the next release. Doing this in your case would imply increasing a bit the reported errors (much less than the gain from the first comment).
>>
>> In conclusion, you can rely on the computed solution even though the reported residual norms are large in this case.
>>
>> Jose
>>
>
More information about the petsc-users
mailing list