Add R2N and R2NLS solvers with HSL and QRMumps support - #347
Open
farhadrclass wants to merge 98 commits into
Open
Add R2N and R2NLS solvers with HSL and QRMumps support#347farhadrclass wants to merge 98 commits into
farhadrclass wants to merge 98 commits into
Conversation
farhadrclass
commented
Jan 20, 2026
farhadrclass
commented
Jan 20, 2026
farhadrclass
commented
Jan 20, 2026
farhadrclass
commented
Jan 20, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
d-monnet
reviewed
Jan 21, 2026
dpo
reviewed
Jan 22, 2026
dpo
requested changes
Jan 22, 2026
d-monnet
reviewed
Jan 26, 2026
d-monnet
reviewed
Jan 26, 2026
d-monnet
reviewed
Jan 26, 2026
d-monnet
reviewed
Jan 26, 2026
farhadrclass
commented
Jan 27, 2026
dpo
requested changes
Feb 2, 2026
dpo
reviewed
Feb 10, 2026
dpo
left a comment
Member
There was a problem hiding this comment.
I propose a cleaner subsolver API.
Contributor
Author
|
@dpo I have refactor the R2NLS, |
dpo
requested changes
Feb 14, 2026
dpo
left a comment
Member
There was a problem hiding this comment.
That looks great. Here are a few minor comments.
Contributor
Author
|
@dpo pushed the R2NLS now, |
dpo
reviewed
Feb 16, 2026
dpo
left a comment
Member
There was a problem hiding this comment.
Just a few more comments. Starting to look great!
dpo
reviewed
Feb 18, 2026
dpo
reviewed
Feb 18, 2026
Contributor
Author
|
@dpo I didn't move x_init to x0 since by doing so, we would remove the connection between LinearOp jac relying on x to be update to update the Jacobean, I can however add a new x_op to solver structure but that would allocate a memory and at the end do the same thing, In the constructor, I am linking x which will be updated in each iteration to jacobean Let me know what you think |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Contributor
Contributor
Contributor
Introduces `finalize_subsolver!` and `reset_subsolver!` to the subsolver interface. The default `reset_subsolver!` finalizes then re-initializes the subsolver, and is now called in `R2NSolver.reset!` to avoid stale state. For `HSLR2NSubsolver`, adds a `_finalized` guard flag and a `finalizer` hook to ensure HSL (Ma97) C/Fortran memory is freed exactly once, preventing double-free bugs on GC collection. Also renames `r2n_subsolver_common.jl` → `R2N_subsolver_common.jl` for naming consistency, and updates the HSL subsolver test to verify explicit cleanup and GC safety.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces new second-order quadratic regularization solvers R2N and R2NLS for unconstrained and nonlinear least-squares optimization. Adds support for HSL (MA97, MA57) and QRMumps direct solvers, updates documentation and README, and extends test coverage for the new solvers. Updates dependencies and compat entries in Project.toml.