refactor!: remove the CUDA and MAGMA linear solvers - #660
refactor!: remove the CUDA and MAGMA linear solvers#660leonardocarreras wants to merge 2 commits into
Conversation
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
There was a problem hiding this comment.
DPsim LLM review
Claim vs. code: matches the description.
TL;DR: One low-confidence process-compliance issue was flagged in CODEOWNERS; no functional correctness, scaling, or scheduling problems were reported for the CUDA/MAGMA solver removal itself.
Found 1 medium (0 anchored to lines below).
🔵 Optional / low-confidence (1)
- Missing SPDX header in CODEOWNERS
[medium · 35% confidence · unconfirmed]inCODEOWNERS:1
Claim vs. implementation
- Claimed: Remove the CUDA and MAGMA linear solvers, related build/config support, docs, and Rocky container GPU dependencies.
- Done: Deletes the CUDA/MAGMA solver adapters, MAGMA plugin, enum and factory support, related CMake/config/docs/workflow references, and removes the MAGMA find module and code ownership entries.
- Difference: none
How this review was produced
13 specialized finder passes raised 26 findings over the diff and the full changed sources. After de-duplication, 25 were re-checked against the current file and the base-class / interface headers it inherits (code as truth), escalating survivors to a stronger model: 24 refuted as unsupported, 1 kept (1 tentative).
Refuted by verification:
- Remove unused CUDA and MAGMA find_package calls (CMakeLists.txt): The current file has find_package(GSL) at line 144, not CUDA or MAGMA, and the CUDA/MAGMA calls were removed in the diff.
- Remove non-portable CUDA build workaround (CMakeLists.txt): Line 29 is FETCH_PYBIND, and there is no CUDA workaround block in the current file.
- Update solver implementation table in documentation (docs/hugo/content/en/docs/Developer Guide/Solvers/alternative-solvers.md): The current table lists only KLU, SparseLU, DenseLU, and Plugin; no CUDA adapter rows remain.
- Remove unused enum values from DirectLinearSolverImpl (dpsim/include/dpsim/MNASolverDirect.h): The enum on line 39 now contains only Undef, KLU, SparseLU, DenseLU, and Plugin; the CUDA values are not present in the full file.
- Remove unused includes for GPU adapters (dpsim/include/dpsim/MNASolverDirect.h): The removed GPU include block is absent from the current header, so there is no lingering include of GpuDenseAdapter.h, GpuSparseAdapter.h, or GpuMagmaAdapter.h.
- Remove dead case labels for GPU adapters in createDirectSolverImplementation (dpsim/src/MNASolverDirect.cpp): The current switch only has DenseLU, SparseLU, and KLU cases; the CUDA case labels are absent from the full source.
- Remove dead CUDA option references from feature summary (CMakeLists.txt): The feature summary section no longer contains WITH_CUDA; line 268 is add_feature_info(KLU WITH_KLU ...).
- Remove outdated CUDA references from documentation (docs/hugo/content/en/docs/Developer Guide/Solvers/alternative-solvers.md): The alert text now ends with “depends entirely on how DPsim was configured.” and no longer mentions CUDA builds.
- Remove outdated note about GPU adapters in documentation (docs/hugo/content/en/docs/Developer Guide/Solvers/alternative-solvers.md): The alert block contains no GPU adapter references in the current source.
- Replace noisy INFO log with DEBUG in stampVariableSystemMatrix (dpsim/src/MNASolverDirect.cpp): The INFO log at line 71 is present in the current file and is an intentional status message in stampVariableSystemMatrix.
- Replace noisy INFO log with DEBUG in stampVariableSystemMatrix (dpsim/src/MNASolverDirect.cpp): The INFO log at line 80 is present in the current file and logs the base matrix during matrix stamping.
- Remove WITH_CUDA and WITH_MAGMA from dpsim Config.h.in (dpsim/include/dpsim/Config.h.in): The current file no longer contains WITH_CUDA, WITH_CUDA_SPARSE, or WITH_MAGMA; only WITH_PYBIND is on line 25.
- Remove WITH_CUDA and WITH_MAGMA from dpsim-villas Config.h.in (dpsim-villas/include/dpsim-villas/Config.h.in): The current file no longer contains WITH_CUDA, WITH_CUDA_SPARSE, or WITH_MAGMA; line 15 is WITH_PYBIND instead.
- Remove WITH_CUDA_SPARSE option that is no longer referenced (CMakeLists.txt): WITH_CUDA_SPARSE does not appear anywhere in the current file.
- Update note about GPU adapters in solver documentation (docs/hugo/content/en/docs/Developer Guide/Solvers/alternative-solvers.md): The note about build configuration is generic and does not mention removed GPU backends.
Automated, non-blocking review. May be wrong. Models: find mistral-small-4-119b-2603, gpt-oss-120b → verify gpt-5.4-mini → final gpt-5.5.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #660 +/- ##
==========================================
- Coverage 72.84% 72.70% -0.15%
==========================================
Files 512 512
Lines 33068 33179 +111
Branches 17880 17929 +49
==========================================
+ Hits 24090 24124 +34
- Misses 8910 9054 +144
+ Partials 68 1 -67 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
|
Hi @n-eiling, hi @fwege, would this set of changes be okay for you? We would appreciate your input, or heads-up about your plans or any comment. Of the people I know, you are the most familiar with the GPU work in the software. Other points:
I keep it as draft for the moment. |




Closes #164, closes #646.
Context: The GPU adapters are broken and no GitHub Actions job builds them.
Removes the three adapters, the MAGMA plugin and the CUDA enum values, and drops CUDA, MAGMA and cricket from the Rocky container. dpsimpy and the C++ examples build clean; the image was not rebuilt.