how to test GTSV correctly?
Hello, colleagues!
Please, help to find answer on the following question.
I would like to test GTSV via using GET04 to check comparison of exact and computed solution. Reciprocal of the condition number of test matrix should be passed into GET04 as a parameter. It can be obtained by GTCON, but GTCON requires part of L factor from LU factorization of A, which is computed by GTTRF.
So, is it valid sequence of calls?
- GTTRF to obtain DL
- GTSV to obtain D, DU, DU2
- GTCON to compute reciprocal of condition number using DL, D, DU, DU2
- GET04 to check the difference of two solutions
Looks like tests from TESTING/LIN/ddrvgt.f uses the same technology, but GTCON is not called over there, so I am confused here.
Hi @dklyuchinskiy,
(1) I think the tester of LAPACK (for example ddrvge.f, but also ddrvgt.f) do not use GECON and GTCON because these return condition number estimates as opposed to the "true" condition number. The testers (for example ddrvge.f, but also ddrvgt.f) compute the "true" condition number by explicitly computing || A ||_1 * || A^{-1} ||_1.
(2) The estimate is much cheaper to compute than the "true" condition number.
(3) The "true" condition number (as computed by ddrvge.f and ddrvgt.f) with the estimate computed by GECON and GTCON are compared by routine GET06. And this check is done in dchkge.f, dchkgt.f.
I agree that maybe using GECON in ddrvge.f (or GTCON in ddrvgt.f) is not a bad idea, but this has not been the practice. The practice is to use the "true" condition number in the testing.
Comment: maybe LAPACK should have "true" condition number routine. That would clean up some code. Some users might want to pay the price of the "true" condition number as opposed to the estimate (for example the LAPACK test suite seem inclined to use "true" and not estimate) and it would be convenient for these users (and clean up the code).
Julien.
Julien, thank you for respond! I did not even know anything about GET06 and comparison "true" and estimated condition number, it became more clear for me now!
Could you please clarify one more thing? For example, I would like to use estimated condition number (GECON or GTCON) and pass it into GET04 to compare two solutions of the linear system. Should I only call factorization routine GETRF/GTTRF before or is it possible to call corresponding solving routine GESV/GTSV for the same aim? Looks like, it can be easily done for GESV taking into account its implementation, but it is not correct in case of GTSV since it does not return any information about L factor.
So there exists only one desire here is not to waste time for calling additional factorization routine (TRF), which actually is a part of solving routine (SV), but is it valid?
Dmitry