Skip to content

Add external ReSolve interface#2

Draft
tamar-dewilde wants to merge 2 commits into
resolve-developfrom
public-resolve-interface
Draft

Add external ReSolve interface#2
tamar-dewilde wants to merge 2 commits into
resolve-developfrom
public-resolve-interface

Conversation

@tamar-dewilde

Copy link
Copy Markdown
Collaborator

Description

Add an experimental EVLOSER sparse linear solver interface to HiOp that uses an installed public ORNL/ReSolve package.

Enable the interface at configure time with:

HIOP_USE_EVLOSER=ON

Runtime solver selection:

linear_solver_sparse=evloser

The interface supports CPU KLU solves and RF refactorization on CUDA and HIP. The existing embedded resolve solver implementation remains unchanged.

@pelesh

Proposed changes

  • Add HIOP_USE_EVLOSER as an independent sparse solver option.

  • Add the HiOp EVLOSER wrapper and external ReSolve provider.

  • Discover public ReSolve with find_package(ReSolve CONFIG REQUIRED).

  • Link through ReSolve::ReSolve.

  • Propagate the ReSolve dependency through the installed HiOp CMake configuration.

  • Use public ReSolve components for:

    • CPU KLU factorization and solve
    • CUDA RF refactorization and solve
    • HIP RF refactorization and solve
    • CSR matrix and vector storage
  • Convert HiOp symmetric sparse matrices to the CSR representation expected by ReSolve.

  • Support host and device matrix, right-hand-side, and solution transfers.

  • Return failed factorizations and refactorizations to HiOp for regularization and retry.

  • Register EVLOSER in sparse KKT solver selection and dual initialization.

  • Require the inertia-free factorization acceptor for EVLOSER.

  • Add driver options:

    • -evloser
    • -evloser_cuda_rf
    • -evloser_hip_rf
  • Add EVLOSER RF regression tests: NlpSparseRaja2_EVLOSER_RF (CUDA) and NlpSparseRaja2_EVLOSER_HIP_RF (HIP).

  • Keep the existing embedded resolve solver sources unchanged.

Additional cleanup in files touched by this branch

  • Update the sparse example self-check to reject non-finite objectives and errors.
  • Correct the sparse RAJA driver help text to match the existing ReSolve option names.

Checklist

  • All tests pass (make test and make test_install per testing [instructions](https://github.com/ORNL/ReSolve?tab=readme-ov-file#test-and-deploy)). Code tested on

    • CPU backend
    • CUDA backend
    • HIP backend
  • I have manually run the non-experimental examples and verified that residuals are close to machine precision. Code tested on:

    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.

  • Regression tests were added and run for the new code.

  • The new code is documented.

  • The feature branch is rebased with respect to the target branch.

  • I have updated CHANGELOG.md to reflect the changes in this PR.

Further comments

The HIP RF path runs without iterative refinement because the current iterative-refinement implementation depends on CUDA-only Krylov kernels.

SuiteSparse/KLU was supplied through the active Spack environment with spack -e. The HiOp Spack recipe was not changed.

Detailed CPU, CUDA, and Frontier validation logs will be attached in a follow-up comment.

This remains a draft PR until the external EVLOSER interface has been reviewed and is ready for integration.

@tamar-dewilde tamar-dewilde self-assigned this Jun 26, 2026
@tamar-dewilde

Copy link
Copy Markdown
Collaborator Author

External ReSolve validation completed using ReSolve commit:

a93fb6571e3542b2fa779983fef0186a034c53c9

  • CPU: 35/35 tests passed
  • CUDA: 41/41 tests passed
  • Frontier HIP: 37/37 tests passed
  • Direct CPU, CUDA RF, and HIP RF runs passed the six-digit self-check
  • Runtime linkage was verified against the expected external ReSolve libraries

Attached are the complete CPU, CUDA, and Frontier validation logs:

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.

1 participant