Skip to content

Port ILU to GPU - #2858

Open
pcarruscag wants to merge 19 commits into
developfrom
pedro/ilu_gpu
Open

Port ILU to GPU#2858
pcarruscag wants to merge 19 commits into
developfrom
pedro/ilu_gpu

Conversation

@pcarruscag

Copy link
Copy Markdown
Member

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

pcarruscag and others added 3 commits August 3, 2026 22:21
Colored-iterative forward/backward substitution needed too many sweeps
to be useful on stiffer systems (e.g. large RANS cases with highly
anisotropic near-wall cells), so the triangular solves go back to
exact, level-scheduled kernels (one pass, no sweep count). The
factorization stays colored/iterative, which converges quickly
regardless of matrix stiffness.

LINEAR_SOLVER_ILU_GPU_SWEEPS is now a single scalar (build sweeps
only) instead of a 3-entry array, since the solves no longer sweep.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Consolidates LINEAR_SOLVER_ILU_FILL_IN, LINEAR_SOLVER_ILU_LEVEL_SCHEDULING,
and LINEAR_SOLVER_ILU_GPU_SWEEPS behind one struct/getter (GetIluOptions),
following the same pattern already used for other option families
(e.g. CMGOptions). Config keys and defaults are unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread Common/include/linear_algebra/CSysMatrix.hpp Outdated
Comment thread Common/include/linear_algebra/CSysMatrix.hpp Outdated
Comment thread Common/include/linear_algebra/CSysMatrix.hpp Outdated
Comment thread Common/include/linear_algebra/CSysMatrix.hpp Outdated
Comment thread Common/include/linear_algebra/CSysMatrix.hpp Outdated
Comment thread Common/src/linear_algebra/CSysMatrix.cpp Outdated
Comment thread Common/src/linear_algebra/CSysMatrix.cpp Outdated
Comment thread Common/src/linear_algebra/CSysMatrix.cpp
Comment thread Common/src/linear_algebra/CSysMatrixGPU.cu Outdated
Comment thread Common/src/linear_algebra/CSysMatrixGPU.cu Outdated
pcarruscag and others added 2 commits August 8, 2026 12:35
- CSysMatrix.hpp: trim member-doc comments down to what the members
  are, drop design/alternatives narrative and CUDA-graph rationale
  duplicated at the call sites.
- CSysMatrix.cpp: factor repeated GPU LDU free/alloc sequences into
  local helper lambdas (freeLDU, reused GPUAllocAndInit/GPUAllocAndCopy);
  factor the repeated "GPU dispatch unavailable" error into one
  GPUNotAvailable(CURRENT_FUNCTION) helper.
- Move the static nVar==nEqn / nVar*nVar<=1024 validity checks for the
  GPU Jacobi/ILU/SpMV paths from every Build/Compute call into
  Initialize(), where CUDA and the block size are already known and
  the check only needs to run once.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant