Skip to content

WIP: Equality constraint Jacobian test#38

Draft
PhilipFackler wants to merge 14 commits into
olcf-hackathon-2026-devfrom
PhilipFackler/cecj-test
Draft

WIP: Equality constraint Jacobian test#38
PhilipFackler wants to merge 14 commits into
olcf-hackathon-2026-devfrom
PhilipFackler/cecj-test

Conversation

@PhilipFackler
Copy link
Copy Markdown
Collaborator

Merge request type

  • New feature
  • Resolves bug
  • Documentation
  • Other

Relates to

  • OPFLOW
  • SOPFLOW
  • SCOPFLOW
  • TCOPFLOW
  • CMake build system
  • Spack configuration
  • Manual
  • Web docs
  • Other

This MR updates

  • Header files
  • Source code
  • CMake build system
  • Spack configuration
  • Web docs
  • Manual
  • Other

Summary

Summarize the MR concisely

Linked Issue(s)

Link any relevant issues. If merging into the default branch, any directly addressed issues will be closed when merging into the default branch (develop).

Since GitHub is specific on language, make sure to include direct language if you want to have the issue closed:

  • Closes #issue
  • Resolves #issue

You can also reference issues, but this will not close the issue when the merge request is merged:

  • Partly related to #issue
  • #issue
  • Partially addresses #issue

nkoukpaizan and others added 5 commits April 13, 2026 11:34
* Fix line constraint bug in HiOp MDS module.
---------

Co-authored-by: pelesh <pelesh@users.noreply.github.com>
…ns (#31)

* test_acopf with PBPOLRAJAHIOPSPARSE (verify equality constraint Jacobian) + bug fix for PBPOL.

Co-authored-by: William A Perkins <william.perkins@pnnl.gov>

* Cleanup changes to RAJAHIOPSPARSE nnz computation.

* Workaround for RAJAHIOPSPARSE inequality constraint verification.

* Handling cases where IPOPT or HIOP are not available in test_acopt + bug fixes.

* HiOp-compatible checks for constraint Jacobian allocations. Will need a
smarter way to verify the stacked inequality constraints.

* Fix for inequality constraint offsets.

---------

Co-authored-by: William A Perkins <william.perkins@pnnl.gov>
Co-authored-by: nkoukpaizan <nkoukpaizan@users.noreply.github.com>
@PhilipFackler PhilipFackler force-pushed the PhilipFackler/cecj-test branch 5 times, most recently from 0231794 to fef36fa Compare April 20, 2026 15:22
* Add more comments to HIOPRAJASPARSE implementation.

* [skip ci] Add headers to the matpower file for Jacobian test.

---------

Co-authored-by: pelesh <pelesh@users.noreply.github.com>
@PhilipFackler PhilipFackler force-pushed the PhilipFackler/cecj-test branch from fef36fa to 9aab0bb Compare April 20, 2026 19:37
pelesh and others added 4 commits April 20, 2026 16:59
* I am not going to lie, Cursor agent heavily helped me with this.

Replace PETSc-based inequality Jacobian with GPU RAJA kernels

Move the inequality constraint Jacobian computation for the HiOp sparse
GPU solver entirely to the device, eliminating the per-iteration host
back and forth (copy to host, PETSc compute, MatGetRow extraction, values
copy back to device). Elimiate PETSc use from this part of the code.

Three RAJA kernels now compute directly into device memory:
- Generator set-point constraints (AGC)
- Voltage-reactive-power bounds (FIXED_WITHIN_QBOUNDS)
- Line flow limits (Sf^2/St^2 derivatives + slack variables)

Supporting changes:
- Analytical NNZ counting replaces PETSc MatGetInfo at solver setup
- New device-side parameter fields (apf, vs, xpdevidx, xslackidx,
  bus-to-gen mapping) added to *ParamsRajaHiop structs
- Sparse position indices assigned at model setup for all three
  contribution types

Includes validation test (test_ineqjac_gpu) that solves with IPOPT,
then compares PETSc and GPU Jacobian values at the converged solution.
Optional -benchmark flag for performance comparison.

Made-with: Cursor


---------

Co-authored-by: kswirydo <kasia.swirydowicz@gmail.com>
Co-authored-by: pelesh <pelesh@users.noreply.github.com>
Co-authored-by: Nicholson Koukpaizan <koukpaizannk@ornl.gov>
@PhilipFackler PhilipFackler force-pushed the PhilipFackler/cecj-test branch from 9aab0bb to cd1cb8e Compare April 23, 2026 16:21
@PhilipFackler PhilipFackler force-pushed the PhilipFackler/cecj-test branch from cd1cb8e to e71c2d2 Compare April 23, 2026 16:36
@PhilipFackler
Copy link
Copy Markdown
Collaborator Author

@nkoukpaizan nkoukpaizan mentioned this pull request May 18, 2026
20 tasks
@nkoukpaizan nkoukpaizan force-pushed the olcf-hackathon-2026-dev branch from b332272 to d023534 Compare May 28, 2026 21:12
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.

3 participants