Skip to content

Fix AMD extension for AMD.jl 0.5.4 (SS_Int removed) - #71

Merged
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-amd-0.5.4-ss-int
Sep 4, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-amd-0.5.4-ss-int

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Important

Ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed and why

AMD 0.5.4 removed SS_Int, exposing that the AMD extension relied on several unexported low-level wrapper names. The extension now reconstructs the Boolean structural SparseMatrixCSC represented by its CSR inputs and calls AMD's exported colamd(::SparseMatrixCSC) API. The obsolete ExplicitImports exemptions are removed, the public scpqr_analyze(...; ordering = :amd) path is tested directly against AMD.colamd, and the patch release is bumped from 2.1.7 to 2.1.8.

This clean-main failure currently prevents LinearSolve and other newly resolved SciML environments from precompiling.

Failing before

The new regression test on the unfixed extension with AMD 0.5.4:

AMD ordering matches AMD.colamd: Error During Test
  UndefVarError: `SS_Int` not defined in `AMD`
Test Summary:                   | Error  Total
AMD ordering matches AMD.colamd |     1      1

The full Core group stopped in Core/csc_core.jl with 7 passes and 12 errors, all from the same missing binding.

Passing after

$ GROUP=Core julia +1.12.3 --project=. -e 'using Pkg; Pkg.test()'
AMD ordering matches AMD.colamd | 2 passed
Core/csc_core.jl               | 31 passed
Core/scpqr_tests.jl            | 762 passed

$ GROUP=QA julia +1.12.3 --project=. -e 'using Pkg; Pkg.test()'
QA/qa.jl | 21 passed

$ GROUP=Core julia +1.10.12 --project=. -e 'using Pkg; Pkg.test()'
AMD ordering matches AMD.colamd | 2 passed
Core/csc_core.jl               | 31 passed
Core/scpqr_tests.jl            | 760 passed

$ GROUP=QA julia +1.10.12 --project=. -e 'using Pkg; Pkg.test()'
QA/qa.jl | 19 passed

The new regression test also passed 2/2 with the supported lower bound AMD 0.5.1. Runic 1.10.0, typos 1.47.0, and git diff --check passed.

Not verified

  • No performance benchmark was run. Calling the supported high-level API materializes a structural CSC matrix and may allocate more than the prior private-wrapper implementation.
  • No docs build was run because this changes no public SparseColumnPivotedQR API or documentation.
  • The downstream LinearSolve suite was not rerun locally; its current Julia-pre failure is the same AMD 0.5.4 stack trace covered here.

Links

🤖 Generated with Claude Code

https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512

AMD.jl 0.5.4 (JuliaSmoothOptimizers/AMD.jl#81) deleted the unexported
`AMD.SS_Int` constant and hardcodes `Int64` in its `_l` colamd wrappers
to match SuiteSparse >= 6. The extension read `AMD.SS_Int` at call time,
so every `:amd` ordering failed with `UndefVarError: SS_Int not defined
in AMD` on 0.5.4, breaking precompilation of LinearSolve and the test
environments of everything downstream of it.

Resolve the integer type once at extension load: `AMD.SS_Int` when it
exists (AMD < 0.5.4), `Int64` otherwise. Adds a test that drives
`_amd_colperm` directly and checks it against the public `AMD.colamd`.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Agent-Harness: Claude Code 2.1.259
Agent-Model: claude-fable-5-1
Agent-Session: https://claude.ai/code/session_01FeJYXni9MkJhPFA9yxYvfn
Replace the remaining calls to unexported AMD internals with the supported high-level colamd interface. Reconstruct the structural CSC matrix, remove the ExplicitImports exemptions, and test the public ordering path.

Co-Authored-By: Chris Rackauckas <[email protected]>

Co-Authored-By: Claude <[email protected]>

Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Follow-up commit 7282aae replaces the compatibility shim and all remaining private AMD wrapper calls with the exported AMD.colamd(::SparseMatrixCSC) API. The final tree is byte-for-byte identical to the separately validated public-API implementation; the PR body now contains the Julia 1.12, Julia LTS, lower-bound AMD, QA, and failing-before evidence.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

@JuliaRegistrator register

@JuliaRegistrator

Copy link
Copy Markdown

Comments on pull requests will not trigger Registrator, as it is disabled. Please try commenting on a commit or issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants