0
$\begingroup$

I am assuming the pardiso solver calculates (or estimates) the condition number before proceeding to the solution phase.

Is there a way to make pardiso output the condition number?

Alternatively, minimum and maximum eigenvalue are of course also okay.

I can also output the matrix in matrix-market format and do the calculation with e.g. scipy, but that operation is rather unpleasant for large matrices.

$\endgroup$
  • 1
    $\begingroup$ Pardiso is a direct solver and as such I do not expect it to check for ill-conditionedness up front. Rather, one typically discovers ill-conditionedness as one finds pivots that are too small. However, this only tells you that the matrix is ill-conditioned, or singular, but not necessarily an estimate of the condition number. On the other hand, if Pardiso does something like an LU decomposition (which I'm not sure it does) then the eigenvalues of the matrix end up being the diagonal elements of one of the factors and computing a condition number estimate would be simple. $\endgroup$ – Wolfgang Bangerth Oct 15 '14 at 14:34
  • $\begingroup$ @ChristianClason: All the functions you linked apply to dense matrices, correct? $\endgroup$ – Sebastian Oct 15 '14 at 15:17
  • 1
    $\begingroup$ @WolfgangBangerth: You could migrate your comment to an answer, since it essentially answers the question. $\endgroup$ – Geoff Oxberry Oct 15 '14 at 18:28
  • 1
    $\begingroup$ @ChristianClason: Same as Wolfgang; you've essentially answered the question. $\endgroup$ – Geoff Oxberry Oct 15 '14 at 18:28
  • $\begingroup$ @GeoffOxberry done. But the OP has already asked an improved version of this question, so maybe closing this version would make more sense. $\endgroup$ – Christian Clason Oct 15 '14 at 20:08
1
$\begingroup$

Computing the condition number of a matrix is an expensive operation (for example, involving computing the largest and smallest magnitude eigenvalues, or solving several(!) linear systems), so doing this by default in a call to a linear solver would be very wasteful. It makes much more sense to just try to solve the system, and in case the solver breaks down due to ill-conditioning, catch that error and terminate the routine gracefully (with a helpful error message warning of ill-conditioning). In addition, some iterative solvers (most notably GMRES) produce an estimate of the condition number as a by-product. Since PARDISO is a parallel direct solver based on LU or Cholesky decomposition, this is not available.

For the rare cases when one wants to know the condition number without solving a linear system, dedicated routines exist. For example, LAPACK (which is bundled in Intel's MKL) provides the ???con routines (see https://software.intel.com/en-us/node/520910) for dense matrices. Routines for estimating (computing would be infeasible) the condition number of large sparse matrices (based on Krylov methods for computing approximate eigenvalues) also exist, but are not bundled in the MKL. If this is what you need to do, you have to look at one of the dedicated packages for sparse linear algebra such as PETSc (see How can I estimate the condition number of a large sparse matrix using PETSc?) or Trilinos (look for IFPACK in the documentation).

| cite | improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.