Skip to content

Conversation

ChrisRackauckas-Claude
Copy link

Summary

  • Fixes issue Negative info with NoPivot() #95 where tests fail on Julia 1.11+ due to changed conventions for the info field with NoPivot()
  • Updates RecursiveFactorization to match Julia's convention of using negative info values for unpivoted LU failures

The Problem

Julia 1.11 changed the convention for LU factorization's info field when using NoPivot(). When a zero diagonal is encountered during unpivoted LU factorization, the info field should now be negative to distinguish it from pivoted factorization failures.

Reference: JuliaLang/julia#52957

The Fix

This PR updates two locations in src/lu.jl:

  1. In _generic_lufact!: When Pivot=false and a zero diagonal is found, return negative info value
  2. In reckernel!: Handle negative info values correctly when adjusting offsets for recursive decomposition

Test Results

All tests pass after this fix:

Test Summary:         | Pass  Total     Time
Test LU factorization | 3120   3120  1m47.8s

Fixes #95

🤖 Generated with Claude Code

ChrisRackauckas and others added 4 commits September 26, 2025 17:41
Julia 1.11 changed the convention for LU factorization info field when using NoPivot().
Now, when a zero diagonal is encountered during unpivoted LU factorization, the info
field should be negative to distinguish it from pivoted factorization failures.

This commit updates RecursiveFactorization to match Julia's convention:
- In _generic_lufact!, return negative info when Pivot=false and zero diagonal found
- In reckernel!, handle negative info values correctly when adjusting offsets

Fixes JuliaLinearAlgebra#95

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Only use negative info values for NoPivot() on Julia 1.11 and later.
Earlier versions should continue using positive info values.

- Added NOPIVOT_NEGATIVE_INFO constant that checks Julia version
- Use this constant to conditionally apply negative info values
- Ensures backward compatibility with Julia < 1.11

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 84e567d into JuliaLinearAlgebra:master Sep 26, 2025
21 checks passed
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.

Negative info with NoPivot()
2 participants