Abstract
The gpu-ISTL framework provides Dune-ISTL compatible sparse linear operations on the GPU for the OPM Flow simulator (Rasmussen et al., 2021). OPM Flow is an open-source fully implicit simulator for subsurface reservoir simulation of industrial complexity, where efficient linear solvers are critical for computational performance. It is written in C++ and relies on the Distributed and Unified Numerics Environment (Dune) (Bastian et al., 2021) for several numerical algorithms. In particular, templated linear-solver algorithms provided by the Dune Iterative Solver Template Library (Dune-ISTL) (Blatt & Bastian, 2007) are essential in the simulator. To GPU-accelerate the simulator with minimal effort, gpu-ISTL provides classes that can instantiate Dune-ISTL algorithms with types that automatically runs the algorithms provided on the GPU. Both AMD and Nvidia GPUs are supported in the same source code by utilizing hipify-perl (Advanced Micro Devices, Inc., 2024b) to generate HIP code (Advanced Micro Devices, Inc., 2024a) from the existing CUDA code (NVIDIA et al., 2023) when compiling OPM Flow.