Skip to content

Temporary view of equality constarint changes#47

Closed
pelesh wants to merge 3 commits intokasia/branch-off-equalityfrom
ks-eq_constraints_porting
Closed

Temporary view of equality constarint changes#47
pelesh wants to merge 3 commits intokasia/branch-off-equalityfrom
ks-eq_constraints_porting

Conversation

@pelesh
Copy link
Copy Markdown
Collaborator

@pelesh pelesh commented Apr 23, 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

For changes preview only

kswirydo and others added 3 commits April 20, 2026 17:40
Replace the PETSc-based equality constraint Jacobian computation in the
PBPOLRAJAHIOPSPARSE model with direct GPU kernels using RAJA, eliminating
the D2H-compute-H2D round trip. The sparsity pattern is now computed on
the host during setup and the values are computed entirely on device.

Key changes:
- Add ComputeEqJacValuesGPU_PBPOLRAJAHIOPSPARSE in new gpu.cpp/hpp files
- Add device arrays for flat-array indices (bus eqjacsp_selfidx, line
  eqjacsp_idx/eqjacsp_diag_idx/isdcline, gen xpdevidx/xpsetidx)
- Fix nnz counting bugs (missing gen/load entries, off-by-one in line
  loop) and populate flat-array indices during model setup
- Replace PETSc MatGetRow extraction in sparsity and values phases
- Handle parallel lines by sharing off-diagonal positions with atomicAdd
- Use pre-computed nnz in get_sparse_blocks_info instead of PETSc query
- Add correctness test (test_eqjac_compare) and performance benchmark
  (test_eqjac_perf)

Made-with: Cursor
@pelesh pelesh closed this Apr 23, 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.

2 participants