Skip to content

blackoilintensivequantities: full property update on GPU#7029

Open
kjetilly wants to merge 4 commits into
OPM:masterfrom
kjetilly:intensive_quantities_4
Open

blackoilintensivequantities: full property update on GPU#7029
kjetilly wants to merge 4 commits into
OPM:masterfrom
kjetilly:intensive_quantities_4

Conversation

@kjetilly
Copy link
Copy Markdown
Contributor

Needs OPM/opm-common#5138

Small edits to BlackOilIntensiveQuantities so its update path is fully usable from device code (relaxed-constexpr-friendly storage, host/device-decorated helpers, moved init helpers).

Adds tests/gpuistl/test_blackoilintensivequantities_gpu.cu which exercises the GPU update path end-to-end and matches it against the CPU reference, including derivatives. The test is gated on HIP or CUDA >= 13.1.

Adds host-side allocator helpers, host/device-decorated raw-pointer
accessors and small additions to MiniVector that the rest of the GPU
intensive-quantities work depends on.  Updates test_gpu_smart_pointers.cu
to cover the new behaviour.
…) use

Decorates inline helpers in blackoil*modules.hh, blackoilprimaryvariables.hh,
directionalmobility.hh, tpfalinearizer.hh, NewTranFluxModule.hpp,
TemperatureModel.hpp and BlackOilEnergyIntensiveQuantitiesGlobalIndex.hpp
with OPM_HOST_DEVICE, replaces a few raw `throw`s with OPM_THROW, and
switches static `FluidSystem::` accesses to instance-based
`fluidState.fluidSystem()` / `getFluidSystem()` so the same code works
when the fluid system lives on the device.  Test
test_gpu_linear_two_phase_material.cu picks up the matching template
adjustments.
@kjetilly kjetilly added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Apr 30, 2026
kjetilly added 2 commits May 3, 2026 19:14
Adds the GPU-side problem and material/thermal law manager headers
(GpuFlowProblem, GpuEclMaterialLawManager, GpuEclThermalLawManager) plus
the matching GPU element-context header (fvbaseelementcontextgpu.hh) and
the FlowGasWaterEnergyTypeTag.hpp typetag.  Wires them through
FlowProblemParameters and adds a Boost test
(test_gpu_ecl_thermal_law_manager.cu) backed by tests/very_simple_deck.DATA.

The new test is gated on HIP or CUDA >= 13.1 in CMakeLists_files.cmake.
Reworks BlackOilIntensiveQuantities so its update path is fully usable
from device code (relaxed-constexpr-friendly storage, host/device-decorated
helpers, moved init helpers).  Adds tests/gpuistl/test_blackoilintensivequantities_gpu.cu
which exercises the GPU update path end-to-end and matches it against the
CPU reference, including derivatives.  The test is gated on HIP or
CUDA >= 13.1.
@kjetilly kjetilly force-pushed the intensive_quantities_4 branch from 6a72fe1 to 8b5bb96 Compare May 3, 2026 19:44
@kjetilly kjetilly marked this pull request as ready for review May 4, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant