Commit Graph
879 Commits
Author SHA1 Message Date
David Landa-Marbán 2d327a6d32 Merge pull request #6424 from lechevaa/HybridNewton_flag
Hybrid newton flag
2025-10-06 09:51:37 +02:00
Tobias Meyer Andersen 44a1037acb Use Generic API when available
Introduce a wrapper that handles whether
we should use the generic or old CUDA/HIP API
based on what versions are present
during compilation
2025-09-30 10:24:09 +02:00
Svenn Tveit d0c08c4382 Python wrapper of single phase (water) simulator 2025-09-23 12:52:46 +02:00
Atgeirr Flø Rasmussen 6e9d33abc4 Merge pull request #6308 from jakobtorben/cpr_amg_fully_on_gpu_istl_solver_gpu_istl
CPR-AMG fully on the GPU with GpuIstl
2025-09-19 13:21:12 +02:00
jakobtorben fc3e9209ef Implement CPR weight calculation for gpu-ISTL 2025-09-18 16:25:49 +02:00
Tor Harald Sandve 26c7835f08 Merge pull request #6462 from daavid00/biostore2025
BIOFILM effects for gas-water systems
2025-09-18 14:19:43 +02:00
David Landa Marban d3101a9c80 BIOFILM effects for gas-water systems 2025-09-18 11:15:48 +02:00
jakobtorben cea8d4c87f Introduce GpuPressureTransferPolicy and gpu operations for CPR-AMG 2025-09-18 11:00:54 +02:00
Tobias Meyer Andersen df807606a7 Merge pull request #6472 from jakobtorben/fix_mpi_parallel_ISTLSolverGPUISTL
Fix MPI parallel ISTLSolverGPUISTL and register parallel GPU preconditioners
2025-09-18 09:40:28 +02:00
Svenn Tveit 32dd09c78f Add Python gas-water simulator and refactor to template base class
Extend the Python blackoil simulator to support two-phase gas-water
simulations by extracting common functionality into a template base
class and implementing proper module separation.

- Extract PyBaseSimulator<TypeTag> template base class containing all
  common simulator functionality (20+ methods including advance, run,
  step, property access, and MPI handling)
- Add PyGasWaterSimulator for two-phase gas-water simulations using
  FlowGasWaterProblem TypeTag with oil phase disabled
- Split Python modules to avoid ODR violations:
  - BlackOil.so for PyBlackOilSimulator (FlowProblemTPFA)
  - GasWater.so for PyGasWaterSimulator (FlowGasWaterProblem)
- Implement proper template instantiation control with explicit
  instantiations per module

- Eliminate ~400 lines of code duplication between simulators
- Clean inheritance hierarchy: derived classes contain only constructors
- Type-safe specialization through OPM's TypeTag property system
- Separate docstring generation for each simulator type
- Independent build targets with shared infrastructure

- Update CMakeLists.txt to support multiple pybind11 modules
- Add docstrings_gw_simulators.json for gas-water simulator documentation
- Remove centralized Pybind11Exporter.cpp in favor of distributed exports
- Implement proper build dependencies and custom targets

This establishes a scalable foundation for extending OPM's Python
bindings to support additional simulator types (thermal, polymer,
solvent) while maintaining type safety and avoiding symbol conflicts.

Files changed: 21 files, 915 insertions, 428 deletions
2025-09-17 10:06:44 +02:00
jakobtorben 4aed1f7e02 Register MPI parallel GPU preconditioners 2025-09-16 14:47:02 +02:00
Kjetil Olsen Lye 4398ee56c3 Adding tests for BlackOilFluidState and ConditionalStorage on GPU 2025-09-15 13:20:54 +02:00
Tobias Meyer Andersen 165020c1ea Merge pull request #6444 from jakobtorben/add_support_for_hypre_with_gpu_input_types
Add support for Hypre with GPU input types
2025-09-08 10:30:46 +02:00
jakobtorben fe05ef6f62 Refactor HypreInterface 2025-09-05 16:16:00 +02:00
Bård Skaflestad bfe03b0a72 Fix RFT State Collection for Distributed Wells
Commit 6295bd08c (PR #6238) restricted RFT data reporting to only
those wells that are owned by the current rank.  In so doing,
however, we failed to properly account for distributed wells.  Such
wells will typically have RFT contributions from multiple MPI ranks
in a parallel run and we did not allow for this situation.
Moreover, as the simulator by default will distribute "inactive"
wells--wells that are never opened, but which exist primarily to
collect RFT-style data--the problem becomes more pronounced for
these wells.

We solve the problem by splitting the RFTContainer's "wellQuery_"
into two responsibilities.  One for determining if a particular
named well is owned by the current rank and another for determining
if the well is intersected on the current rank.  The latter will be
true for all ranks that have local well connections for the named
well.  This, in turn, means that the constructor now takes two
predicate functions instead of the one we originally used.
Furthermore, member function RFTContainer::allocate() will create
internal data structures for all potential connections on all ranks
that share a well, but RFTContainer::addToWells() will still collect
the RFT data only on the rank that owns the well.

Finally, we implement the owning vs. intersecting distinction for
the black-oil output module through a new member function

    bool BlackoilWellModelGeneric<>::hasLocalCells(name) const

while the compositional output module retains the original
owning-is-intersecting behaviour.  We do not support distributed
wells in compositional runs at the time of writing.
2025-09-05 14:45:26 +02:00
Kai Bao b3e4c4d0d0 removing BlackoilPhases and PhaseUsage
replacing it with a new PhaseUsageInfo and FluidSystem, both of which
are using the same implementation of PhaseUsageInfo, and only one set of
indices is used. Currently, it is the BlackOilDefaultFluidSystemIndices.
2025-09-02 10:19:36 +02:00
jakobtorben 8284abaef0 Add Hypre preconditioner support with GPU types and introduce backend agnostic HypreInterface 2025-09-01 20:45:26 +02:00
lechevaa 3b114d2480 HybridNewton Flag initial commit 2025-09-01 15:54:22 +02:00
jakobtorben ae721740d1 Add memory pinning and async transfer functionality for CPU memory that is used to transfer to the GPU 2025-08-28 13:19:15 +02:00
jakobtorben 2077903929 Add AMGX preconditioner support with GPU types and introduce backend agnostic AmgxInterface 2025-08-28 09:03:23 +02:00
Atgeirr Flø Rasmussen 88baa80ad7 Merge pull request #6401 from jakobtorben/make_gpusparsematrix_support_blocksize_1
Make GpuSparseMatrix support blocksize 1
2025-08-27 19:35:55 +02:00
jakobtorben 96d954f37e Add GpuSparseMatrixGeneric class using CuSparse generic API 2025-08-27 15:36:35 +02:00
Atgeirr Flø Rasmussen acb2f3186a Refactor norne_pvt test. 2025-08-21 10:51:58 +02:00
Kjetil Olsen Lye 4d82ec4292 Added --expt-relaxed-constexpr to test_gpuBlackOilFluidSystem 2025-08-18 11:16:46 +02:00
Atgeirr Flø Rasmussen 26753bf84f Merge pull request #6385 from kjetilly/testblackoilfluidsystemnonstaticbykjetil
Unit tests for the BlackOilFluidSystem on GPU
2025-08-14 16:21:43 +02:00
Tobias Meyer Andersen c88ac762f5 Merge pull request #6379 from kjetilly/gpu_mpi
MPI support for the new GPU aware ISTL Solver
2025-08-07 16:02:51 +02:00
Kjetil Olsen Lye 73aef42c1a Merge pull request #6310 from multitalentloes/precompute_diag_idx_experiment
Optimize GPU DILU update calls
2025-08-06 13:12:49 +02:00
Kjetil Olsen Lye 3b6db7aa2e Made tests amenable to copy_to_gpu without templates 2025-08-01 13:22:17 +02:00
Kjetil Olsen Lye 7df908961f Split up GpuOwnerOverlapCopy to have one class per file 2025-07-29 11:34:56 +02:00
Arne Morten Kvarving 0920f6c249 VoigtArray and SymmTensor moved to opm-common 2025-07-16 11:21:51 +02:00
Tobias Meyer Andersen a232398dd3 make dilu reordering optional
also precompute block indices of diagonal indices
2025-06-26 13:47:48 +02:00
Atgeirr Flø Rasmussen 82a523f03e Merge pull request #6270 from kjetilly/gpu_solver
Making a GPUISTL aware ISTLSolver
2025-06-23 13:48:51 +02:00
Håkon Hægland ce20b0adfd Use MPI custom datatype for potentials
Using a custom MPI datatype for the potentials, we can avoid
serialization and deserialization code.
2025-06-22 10:57:27 +02:00
Håkon Hægland 827cda4f79 Communicate group potentials
Send group potentials from the slaves to the master process, then
use the potentials in the master process to calculate guide rates.
2025-06-22 10:57:24 +02:00
Kjetil Olsen Lye 52d570c19a Added a LinearSolverAcceleratorType enum 2025-06-16 11:41:32 +02:00
Kjetil Olsen Lye 2aed86554a Now printing JSON linear solver specification to log also for GPU 2025-06-16 11:41:32 +02:00
Kjetil Olsen Lye 12bd937a26 Removing the ISTLSolverGPUISTLImplementation 2025-06-16 11:41:32 +02:00
Kjetil Olsen Lye f30036a96c Added a target for the hipification 2025-06-16 11:41:32 +02:00
Kjetil Olsen Lye ce2a7601a0 Introduced a gpu-ISTL aware ISTLSolver and a runtime selection for ISTLSolver backends 2025-06-16 11:41:32 +02:00
Kai Bao fce65d6cb4 putting the instantiation marco definition in a single file
to reduce the duplication
2025-05-14 14:23:39 +02:00
Atgeirr Flø Rasmussen 46d34a0b52 Merge pull request #6241 from kjetilly/adding_gpu_preconditioners
Instatiate preconditioners directly with GPU matrices
2025-05-13 11:26:05 +02:00
Atgeirr Flø Rasmussen 4453b85632 Rename BlackOilIndices->BlackOilVariableAndEquationIndices. 2025-05-08 19:58:52 +02:00
Kjetil Olsen Lye f8f67051dd GPU preconditioners now hold references to GPU matrices 2025-05-06 13:27:55 +02:00
Bård Skaflestad 336060778d Install is_gpu_operator.hpp Header
Otherwise, the StandardPreconditioners.hpp header is not usable from
an installed location.
2025-05-02 09:09:52 +02:00
Atgeirr Flø Rasmussen 5e4fe9863d Merge pull request #6216 from kjetilly/preconditioner_factory_split
Splitting StandardPreconditioners to make it specializable for GPU
2025-04-30 11:52:55 +02:00
Arne Morten Kvarving ab36be7f5e drop now unused mpiutil 2025-04-29 14:50:04 +02:00
Kjetil Olsen Lye d38aff6e25 Splitting StandardPreconditioners to make it specializable for GPU 2025-04-29 09:32:30 +02:00
Kai Bao 07fcb0f9dd renaming CompositionalWellModel to CompWellModel
so it is consistent with other files.
2025-04-23 16:13:01 +02:00
Bård Skaflestad 39d7dd724e Merge pull request #6124 from jakobtorben/fix_and_improve_nldd_timing_and_output_reporting
Fix and improve nldd timing and output reporting
2025-04-03 12:12:40 +02:00
Kai Bao 651478d420 adding header files from flowexperimental to CMakeLists_files
under category  MAIN_SOURCE_FILES for now.
2025-04-03 11:34:31 +02:00