Get Condition number of test matrices

17 views
Skip to first unread message

Xiniz Ronda

unread,
Mar 11, 2023, 6:45:55 PM3/11/23
to magma...@icl.utk.edu
Hi,

In testing directory we have several tester. How can I print the specification of the passed test matrix input? like rank or condition number.

For example if the I am passing --matrix rands I want to see the spesification for that matrix.

Best regards,
X. R.

Mark Gates

unread,
Mar 13, 2023, 9:37:20 AM3/13/23
to Xiniz Ronda, magma...@icl.utk.edu
For a rands matrix, with enties uniform in [-1, 1], we don't know the condition number a priori. You would have to compute the singular values to get the 2-norm cond, or use a 1-norm condition number estimate (getrf then gecon). In general, a random matrix is full rank. The only exception would be if the matrix was large enough (something like 1e6 by 1e6) that the random number generator cycled and produced linearly dependent columns. This has been known to happen in older versions of HPL. I've never encountered it in MAGMA, since matrices don't get that large.

The way we create matrices with known condition number is to generate random orthogonal matrices U and V, a diagonal matrix of singular values Sigma, and multiply them together as A = U Sigma V^H, building A from its SVD. This can be done with, e.g.,
    ./testing_zgetrf --matrix svd --cond 1e6

See the documentation for generating matrices:

Mark

Reply all
Reply to author
Forward
0 new messages