SciML / SciML/SparseWithDenseRowColMatrices.jl

Core tests broken on master: src/qr.jl calls removed `SparseColumnPivotedQR.csr_qr` (renamed to `scpqr` in v2.x)

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
0
Forks
1
Avg merge
14m
Merged PRs (30d)
6

Description

Summary

GROUP=Core (and therefore GROUP=All) fails on a clean, unmodified main checkout. This is not a flake and is not caused by any test-structure change — it reproduces on pristine main.

ERROR: LoadError: Some tests did not pass: 480 passed, 11 failed, 37 errored, 0 broken.

(Re-runs show a 1–2 test wobble — e.g. 12 failed / 36 errored — because several failing cases use randomized matrices without a fixed seed; the failure set is otherwise stable.)

Root cause (dominant: 19 errors)

src/qr.jl calls SparseColumnPivotedQR.csr_qr:

src/qr.jl:65:    Qaug = SparseColumnPivotedQR.csr_qr(_bordered_csr(MaugC))
src/qr.jl:108:    F.QaugH === nothing && (F.QaugH = SparseColumnPivotedQR.csr_qr(_adjoint_csr(F.MaugC)))
src/qr.jl:114:_augfact_tr!(F::SparseWithDenseRowColQRAugmented) = SparseColumnPivotedQR.csr_qr(_transpose_csr(F.MaugC))

But SparseColumnPivotedQR v2.1.1 (which resolves under this package's SparseColumnPivotedQR = "0.1, 2.1" compat) no longer defines csr_qr — the API was renamed. Its current public surface is:

names(SparseColumnPivotedQR):
  SparseColumnPivotedQRFactorization
  SparseColumnPivotedQRSymbolic
  has_amd_extension
  scpqr
  scpqr_analyze
  scpqr_factor
  scpqr_refactor!
isdefined(SparseColumnPivotedQR, :csr_qr) == false

So every QR-path test errors:

well-conditioned: qr agrees with factorize at the noise floor: Error During Test at test/test_qr.jl:31
  Got exception outside of a @test
  UndefVarError: `csr_qr` not defined in `SparseColumnPivotedQR`

This accounts for all 19 UndefVarError errors (test_qr.jl and the QR-routed cases in test_linearsolve.jl / test_edgecases.jl).

Secondary cause (augmented singular path)

A handful of test/test_augmented.jl cases throw BoundsError where LinearAlgebra.SingularException is expected:

:auto falls back to augmented when S is singular: Test Failed at test/test_augmented.jl:30
  Expression: factorize(A; strategy = :woodbury, auto_fallback = false)
    Expected: LinearAlgebra.SingularException
      Thrown: BoundsError
      BoundsError: attempt to access 50×2 Matrix{Float64} at index [0, 1]

i.e. the singular-S detection in the Woodbury/augmented path indexes a zero-length pivot vector at [0, 1] instead of surfacing SingularException.

Reproduction

git clone https://github.com/SciML/SparseWithDenseRowColMatrices.jl
cd SparseWithDenseRowColMatrices.jl
GROUP=Core julia +1.11 --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.test()'

Reproduced on Julia 1.11.9, SparseColumnPivotedQR v2.1.1.

Suggested fix (separate PR)

Rename the three SparseColumnPivotedQR.csr_qr(...) call sites in src/qr.jl to the current API (scpqr / scpqr_analyze + scpqr_factor), confirming the new call returns the same factorization object the QR path expects. Separately, investigate the [0, 1] indexing in the augmented singular-detection path so it raises SingularException as the tests assert. Both are src/ bugs and should not be addressed by loosening or skipping the tests.

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing GROUP=Core with the provided Julia command, then inspect the three SparseColumnPivotedQR calls in src/qr.jl and the failing cases in test/test_qr.jl, test/test_linearsolve.jl, and test/test_edgecases.jl. Separately inspect the augmented singular path associated with test/test_augmented.jl. Done means the current scpqr API works through the QR paths and singular inputs raise SingularException as asserted, without weakening tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.