Skip to content

Commit

Permalink
Update getrf_large test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmachado-amd committed Jun 25, 2024
1 parent 5488fcc commit a42022c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clients/common/lapack/testing_getrf_large.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,11 @@ void testing_getrf_large(Arguments& argus)
}

// validate results for rocsolver-test
// using min(m,n) * machine_precision as tolerance
// using 4 * kappa * min(m,n) * machine_precision as tolerance,
// where kappa stands for the condition number of the input matrix
double kappa = 1.; // approximation to matrix condition number
if(argus.unit_check)
ROCSOLVER_TEST_CHECK(T, max_error, min(n, n));
ROCSOLVER_TEST_CHECK(T, max_error, 4 * kappa * n);
// output results for rocsolver-bench
if(argus.timing)
{
Expand Down

1 comment on commit a42022c

@EdDAzevedo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is lapack routine xGECON to estimate the (reciprocal) condition number of a matrix where the matrix has already been factored by xGETRF.
Perhaps the matrix condition number kappa can be estimated using this lapack routine?

The residual "r = b - A*x" should always be small, even if matrix A is ill-conditioned. It may be sufficient to check for a small residual (even if the error in solution x is not small due to a large condition number).

Please sign in to comment.