Skip to content

Implement SQMR wrapper - #1088

Open
arnavk23 wants to merge 16 commits into
JuliaSmoothOptimizers:mainfrom
arnavk23:issue-1027-sqmr
Open

Implement SQMR wrapper#1088
arnavk23 wants to merge 16 commits into
JuliaSmoothOptimizers:mainfrom
arnavk23:issue-1027-sqmr

Conversation

@arnavk23

@arnavk23 arnavk23 commented May 26, 2026

Copy link
Copy Markdown

An implementation of SQMR for the solution of symmetric square linear systems Ax = b.

SQMR is implemented here as a symmetric wrapper around QMR with centered preconditioning. This lets the method accept symmetric indefinite preconditioners while reusing the existing QMR machinery.
Fixes #1027

Copilot AI review requested due to automatic review settings May 26, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds an SQMR solver by wrapping the existing QMR implementation to support symmetric (including indefinite) preconditioning, and wires it into the generic krylov_solve interface with accompanying tests.

Changes:

  • Added sqmr/sqmr! API implemented as a symmetric wrapper around qmr/qmr!.
  • Registered SQMR in Krylov.jl via include("sqmr.jl").
  • Extended the QMR test suite to cover SQMR and krylov_solve(Val(:sqmr), ...).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
test/test_qmr.jl Adds coverage for SQMR with symmetric indefinite preconditioning and via krylov_solve.
src/sqmr.jl Introduces sqmr/sqmr! implementation and hooks into krylov_solve.
src/Krylov.jl Includes sqmr.jl so the new solver is available in the module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sqmr.jl Outdated
Comment thread test/test_qmr.jl Outdated
Comment thread test/test_qmr.jl
arnavk23 and others added 2 commits May 26, 2026 20:39
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@amontoison

amontoison commented May 26, 2026

Copy link
Copy Markdown
Member

I am sorry @arnavk23 but you didn't implemented SQMR. The code generated seems to be something given by an AI and it doesn't really make sense.

If you want to implement SQMR, don't use any AI tool and open the book of Youssef Saad on iterative methods to understand what is SQMR.

@arnavk23

Copy link
Copy Markdown
Author

I am sorry @arnavk23 but you didn't implemented SQMR. The code generated seems to be something given by an AI and it doesn't really make sense.

If you want to implement SQMR, don't use any AI tool and open the book of Youssef Saad on iterative methods to understand what is SQMR.

Thanks for pointing me in the right direction. I was still going about this and the responses I was getting felt a little bit on the nose. Was about to flag this as Do Not Merge or Draft until I found what was wrong. But you saved me the hassle.

@arnavk23
arnavk23 requested a review from Copilot May 27, 2026 03:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Comment thread test/test_qmr.jl Outdated
Comment thread src/sqmr.jl Outdated
Comment thread src/sqmr.jl Outdated
Comment thread test/test_qmr.jl Outdated
@arnavk23

arnavk23 commented Jul 5, 2026

Copy link
Copy Markdown
Author

@amontoison can you check again. Any suggestions are welcome.

@amontoison

amontoison commented Jul 5, 2026

Copy link
Copy Markdown
Member

It seems that reimplemented QMR, not SQMR.

If you add new methods: #635

arnavk23 added 5 commits July 8, 2026 02:29
Removed unnecessary blank lines in the test file.
…his allows for more flexibility in the workspace structure and makes it easier to modify the workspace in the future without changing the algorithm code. The changes also include updates to the test files to reflect the new workspace accessors.
@arnavk23
arnavk23 requested a lite review from Copilot August 18, 2026 00:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical SQMR test failure and a moderate adjoint-product count issue remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 13/13 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread test/test_sqmr.jl Outdated
Comment thread src/workspace_accessors.jl Outdated
arnavk23 and others added 2 commits September 12, 2026 01:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Implement SQMR

3 participants