Skip to content

Testing for RAJAHIOPSPARSE equality and inequality constraint Jacobians#31

Merged
pelesh merged 10 commits into
olcf-hackathon-2026-devfrom
nicholson/constraint-jacobian-testing
Apr 15, 2026
Merged

Testing for RAJAHIOPSPARSE equality and inequality constraint Jacobians#31
pelesh merged 10 commits into
olcf-hackathon-2026-devfrom
nicholson/constraint-jacobian-testing

Conversation

@nkoukpaizan
Copy link
Copy Markdown
Collaborator

@nkoukpaizan nkoukpaizan commented Apr 13, 2026

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

This adds a way to test equality and inequality constraint Jacobians with RAJAHIOPSPARSE models.
Still need to do the same thing for the hessians.

@nkoukpaizan nkoukpaizan requested a review from pelesh April 13, 2026 21:43
@nkoukpaizan nkoukpaizan self-assigned this Apr 13, 2026
@nkoukpaizan nkoukpaizan marked this pull request as ready for review April 14, 2026 01:37
@nkoukpaizan nkoukpaizan marked this pull request as draft April 14, 2026 19:48
@nkoukpaizan nkoukpaizan changed the title Equality constraint Jacobian testing Testing for RAJAHIOPSPARSE equality and inequality constraint Jacobians Apr 14, 2026
@nkoukpaizan nkoukpaizan force-pushed the nicholson/constraint-jacobian-testing branch from db4f6b4 to 50a4b41 Compare April 14, 2026 21:45
@pelesh
Copy link
Copy Markdown
Collaborator

pelesh commented Apr 14, 2026

I am getting test failures for 9-bus and 200-bus systems. IEEE 118-bus works fine.

3: Failed for index (-1071, 465) : 22.5783 != -2.00284e-14
3: Failed for index (-1071, 468) : 22.5783 != 1.60222e-17
3: Failed for index (-1071, 469) : 22.5783 != 2.00284e-14
3: --- FAIL: Test computeConstraintJacobian on rank 0

Full output for the 9-bus system:

Details
   Start 1: UNIT_TESTS_OPFLOW_case9mod.m

1: Test command: /usr/bin/srun "-n" "1" "/ccs/home/peles/src/exago/build/tests/unit/test_acopf" "-opflow_genbusvoltage" "VARIABLE_WITHIN_BOUNDS" "-validation_dir" "/ccs/home/peles/src/exago/ExaGO/datafiles/test_validation" "-netfile" "/ccs/home/peles/src/exago/ExaGO/datafiles/case9/case9mod.m"
1: Working Directory: /ccs/home/peles/src/exago/build/tests/unit
1: Test timeout computed to be: 10000000
1: /ccs/home/peles/src/exago/ExaGO/datafiles/case9/case9mod.m
1: 
1: Testing custom power balance model in polar coordinates for HIOP (componentwise assembly) ... 
1: --- PASS: Test computeVariableBounds
1: --- PASS: Test computeObjective
1: --- PASS: Test computeGradient
1: --- PASS: Test computeConstraints
1: --- PASS: Test computeConstraintBounds
1: --- PASS: Test computeConstraintJacobian
1: --- PASS: Test computeHessian
1: 
1: Testing custom power balance model in polar coordinates for HIOP using RAJA (PBPOLRAJAHIOPSPARSE) ... 
1: [Warning] Detected 1 fixed variables out of a total of 24.
1: nx = 24
1: nconeq = 18
1: nconineq = 18
1: --- PASS: Test computeVariableBounds
1: --- PASS: Test computeObjective
1: --- PASS: Test computeGradient
1: --- PASS: Test computeConstraints
1: --- PASS: Test computeConstraintBounds
1: Failed for index (-54, 0) : 35.3691 != 30.605
1: Failed for index (-54, 1) : 35.3691 != 3.61568
1: Failed for index (-54, 12) : 35.3691 != -30.605
1: Failed for index (-54, 13) : 35.3691 != -1.67302
1: Failed for index (-53, 0) : 35.3691 != 30.4404
1: Failed for index (-53, 1) : 35.3691 != 2.63248
1: Failed for index (-53, 12) : 35.3691 != -30.4404
1: Failed for index (-53, 13) : 35.3691 != -0.697623
1: Failed for index (-52, 4) : 35.3691 != 43.7902
1: Failed for index (-52, 5) : 35.3691 != 0.647281
1: Failed for index (-52, 18) : 35.3691 != -43.7902
1: Failed for index (-52, 19) : 35.3691 != 4.09665
1: Failed for index (-51, 4) : 35.3691 != 44.1706
1: Failed for index (-51, 5) : 35.3691 != -1.74438
1: Failed for index (-51, 18) : 35.3691 != -44.1706
1: Failed for index (-51, 19) : 35.3691 != 6.51911
1: Failed for index (-50, 8) : 35.3691 != 32.3362
1: Failed for index (-50, 9) : 35.3691 != -7.36884
1: Failed for index (-50, 22) : 35.3691 != -32.3362
1: Failed for index (-50, 23) : 35.3691 != 9.81875
1: Failed for index (-49, 8) : 35.3691 != 33.1408
1: Failed for index (-49, 9) : 35.3691 != -8.86535
1: Failed for index (-49, 22) : 35.3691 != -33.1408
1: Failed for index (-49, 23) : 35.3691 != 11.36
1: Failed for index (-48, 12) : 35.3691 != 7.53266
1: Failed for index (-48, 13) : 35.3691 != 3.30701
1: Failed for index (-48, 14) : 35.3691 != -7.53266
1: Failed for index (-48, 15) : 35.3691 != -3.03452
1: Failed for index (-47, 12) : 35.3691 != 6.62945
1: Failed for index (-47, 13) : 35.3691 != 8.23541
1: Failed for index (-47, 14) : 35.3691 != -6.62945
1: Failed for index (-47, 15) : 35.3691 != -7.76227
1: Failed for index (-46, 12) : 35.3691 != 11.4249
1: Failed for index (-46, 13) : 35.3691 != 1.15766
1: Failed for index (-46, 16) : 35.3691 != -11.4249
1: Failed for index (-46, 17) : 35.3691 != -0.427768
1: Failed for index (-45, 12) : 35.3691 != 10.3497
1: Failed for index (-45, 13) : 35.3691 != 5.03711
1: Failed for index (-45, 16) : 35.3691 != -10.3497
1: Failed for index (-45, 17) : 35.3691 != -4.3045
1: Failed for index (-44, 14) : 35.3691 != -5.77674
1: Failed for index (-44, 15) : 35.3691 != -3.33929
1: Failed for index (-44, 18) : 35.3691 != 5.77674
1: Failed for index (-44, 19) : 35.3691 != 4.23333
1: Failed for index (-43, 14) : 35.3691 != -7.04174
1: Failed for index (-43, 15) : 35.3691 != 0.801012
1: Failed for index (-43, 18) : 35.3691 != 7.04174
1: Failed for index (-43, 19) : 35.3691 != 0.0886188
1: Failed for index (-42, 16) : 35.3691 != -5.30634
1: Failed for index (-42, 17) : 35.3691 != -2.89552
1: Failed for index (-42, 22) : 35.3691 != 5.30634
1: Failed for index (-42, 23) : 35.3691 != 3.73172
1: Failed for index (-41, 16) : 35.3691 != -6.76072
1: Failed for index (-41, 17) : 35.3691 != 1.84067
1: Failed for index (-41, 22) : 35.3691 != 6.76072
1: Failed for index (-41, 23) : 35.3691 != -0.856757
1: Failed for index (-40, 18) : 35.3691 != 21.9412
1: Failed for index (-40, 19) : 35.3691 != 3.3237
1: Failed for index (-40, 20) : 35.3691 != -21.9412
1: Failed for index (-40, 21) : 35.3691 != -1.72674
1: Failed for index (-39, 18) : 35.3691 != 20.8383
1: Failed for index (-39, 19) : 35.3691 != 7.75967
1: Failed for index (-39, 20) : 35.3691 != -20.8383
1: Failed for index (-39, 21) : 35.3691 != -6.13119
1: Failed for index (-38, 20) : 35.3691 != -7.21535
1: Failed for index (-38, 21) : 35.3691 != -4.65139
1: Failed for index (-38, 22) : 35.3691 != 7.21535
1: Failed for index (-38, 23) : 35.3691 != 5.15615
1: Failed for index (-37, 20) : 35.3691 != -8.05531
1: Failed for index (-37, 21) : 35.3691 != 0.356084
1: Failed for index (-37, 22) : 35.3691 != 8.05531
1: Failed for index (-37, 23) : 35.3691 != 0.0714458
1: --- FAIL: Test computeConstraintJacobian on rank 0
1: 
1: Testing power balance model in polar coordinates  ... 
1: --- PASS: Test computeVariableBounds
1: --- PASS: Test computeObjective
1: --- PASS: Test computeGradient
1: --- PASS: Test computeConstraints
1: --- PASS: Test computeConstraintBounds
1: opflow->Nconineq: 18
1: --- PASS: Test computeConstraintJacobian
1: --- PASS: Test computeHessian
1: srun: error: frontier05119: task 0: Exited with exit code 1
1: srun: Terminating StepId=4394624.140
1/1 Test #1: UNIT_TESTS_OPFLOW_case9mod.m .....***Failed    3.36 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   3.41 sec

The following tests FAILED:
          1 - UNIT_TESTS_OPFLOW_case9mod.m (Failed)
Run command: perl /ccs/home/peles/src/exago/ExaGO/tests/functionality/scripts/post_test.pl /ccs/home/peles/src/exago/build/tests/functionality
Errors while running CTest

@nkoukpaizan
Copy link
Copy Markdown
Collaborator Author

nkoukpaizan commented Apr 14, 2026

I am getting test failures for 9-bus and 200-bus systems. IEEE 118-bus works fine.

3: Failed for index (-1071, 465) : 22.5783 != -2.00284e-14
3: Failed for index (-1071, 468) : 22.5783 != 1.60222e-17
3: Failed for index (-1071, 469) : 22.5783 != 2.00284e-14
3: --- FAIL: Test computeConstraintJacobian on rank 0

Full output for the 9-bus system:

Details

Yes I see it as well. It comes from the inequality constraint Jacobian being stacked after the equality constraints ones. Working on a fix.

@nkoukpaizan nkoukpaizan marked this pull request as ready for review April 14, 2026 23:35
@pelesh pelesh added bug Something isn't working opflow Related to ACOPF computations labels Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@pelesh pelesh left a comment

Choose a reason for hiding this comment

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

All tests pass on multiple platforms.

@pelesh pelesh merged commit cbae7ce into olcf-hackathon-2026-dev Apr 15, 2026
10 checks passed
@nkoukpaizan nkoukpaizan deleted the nicholson/constraint-jacobian-testing branch May 21, 2026 23:52
nkoukpaizan added a commit that referenced this pull request May 28, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working opflow Related to ACOPF computations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants