Skip to content

Add benchmark timing for CPU-only evaluation.#44

Closed
nkoukpaizan wants to merge 4 commits intokasia/inequality-jacobianfrom
nicholson/kasia/inequality-jacobian
Closed

Add benchmark timing for CPU-only evaluation.#44
nkoukpaizan wants to merge 4 commits intokasia/inequality-jacobianfrom
nicholson/kasia/inequality-jacobian

Conversation

@nkoukpaizan
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

This adds a CPU-compute-only component to the inequality constraint Jacobian (CPU vs GPU) benchmark. The idea is to isolate the kernel costs from data transfers.

kswirydo and others added 3 commits April 16, 2026 17:00
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
@nkoukpaizan nkoukpaizan self-assigned this Apr 20, 2026
@nkoukpaizan nkoukpaizan requested review from kswirydo and pelesh April 20, 2026 18:56
@pelesh pelesh force-pushed the kasia/inequality-jacobian branch from 62a86d9 to 580192c Compare April 20, 2026 20:11
@pelesh
Copy link
Copy Markdown
Collaborator

pelesh commented Apr 20, 2026

Cherry-picked in #40

@pelesh pelesh closed this Apr 20, 2026
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