Skip to content

TESTING/EIG/csd.in: please add M=P=Q=1 (and small degenerate cases) — exposes a [CZ]UNCSD2BY1 bug already fixed between 3.12.1 and current #1231

@nakatamaho

Description

@nakatamaho

Summary

The shipped TESTING/EIG/csd.in does not exercise the trivial M=P=Q=1 corner case. Adding it makes xeigtstz on LAPACK 3.12.1 report 6 failing test ratios on M=55, P=40, Q=20 (2-by-1 CSD, tests 10 and 11). The same modified input file passes cleanly on current master, and also passed on 3.9.1. So a bug was introduced after 3.9.1, was present in 3.12.1, and has since been fixed somewhere on master — but because the released test data never covered this seed sequence, the regression slipped through release testing for multiple versions.

I would like to request that the corresponding small/degenerate cases be added to csd.in upstream so this class of regression is caught by make check in future releases.

Reproducer

Diff against shipped TESTING/EIG/csd.in:

-10                                   Number of values of M, P, Q
-0  10 10 10 10 21 24 30 22 32 55     Values of M
-0  4   4 0  10 9  10 20 12 12 40     Values of P
-0  0  10 4  4  15 12 8  20 8  20     Values of Q
+12                                   Number of values of M, P, Q
+0 1  10 10 10 10 21 24 30 22 32 55     Values of M
+0 1  4   4 0  10 9  10 20 12 12 40     Values of P
+0 1  0  10 4  4  15 12 8  20 8  20     Values of Q

Run ./xeigtstz < csd.in.

LAPACK 3.12.1 (FAIL)

M= 55 P= 40, Q= 20, type 1, test 10, ratio= 0.152394E+15
M= 55 P= 40, Q= 20, type 1, test 11, ratio= 0.496574E+15
M= 55 P= 40, Q= 20, type 2, test 10, ratio= 0.324446E+12
M= 55 P= 40, Q= 20, type 2, test 11, ratio= 0.466353E+12
M= 55 P= 40, Q= 20, type 3, test 10, ratio= 0.443792E+15
M= 55 P= 40, Q= 20, type 3, test 11, ratio= 0.663765E+15
CSD:    6 out of  720 tests failed to pass the threshold

LAPACK current master (PASS)

All tests for CSD routines passed the threshold (    720 tests run)

LAPACK 3.9.1

Also passed (no failures with the modified csd.in).

Observations

  • Failures are confined to [CZ]UNCSD2BY1 (2-by-1 CSD), tests 10 and 11. The 2-by-2 CSD tests (1–9) are unaffected.
  • The failing configuration is always (M,P,Q) = (55,40,20), all three matrix types.
  • The shipped csd.in already contains M=P=Q=0, but not M=P=Q=1. Inserting the trivial 1,1,1 problem advances the random seed and exposes the bug downstream — i.e. the bug is real and seed-sensitive, not an artifact of the 1,1,1 invocation itself.
  • Since the bug is fixed on master but the regression existed across at least 3.10–3.12.1, the test data clearly needs strengthening.

Request

Please extend TESTING/EIG/csd.in to include the small degenerate cases, at minimum M=P=Q=1, and ideally also (M,P,Q) = (1,1,0) and (1,0,1), so that future regressions in [CZ]UNCSD2BY1 for this code path are caught by the standard test suite.

Question

Would the maintainers like me to open a pull request with the csd.in extension directly, or do you prefer to handle the test-data update in-house? If a PR is welcome, I am happy to also bisect master to identify the exact commit that fixed [CZ]UNCSD2BY1, so the fix can be referenced in the commit message for the test-data addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions