GPUs for accelerated scientific computing made easy: the story of a CFD solver
→
Europe/Zurich
E13 (OHSA)
E13
OHSA
Description
In Computational Fluid Dynamics (CFD) non-linear conservation equations are solved for physical problems which are therefore discretized in space and time to allow local linearization of the equations. For each point of the grid and solving variable, a linear equation is obtained which needs to be solved for every time step. This results in a large system of linear equations, growing with the refinement of the grid and the size of the physical problem. Numerical, iterative methods reduce the problem to multiple matrix multiplications with big matrices. While commonly executed on supercomputers' CPUs, the single-instruction-multiple-data paradigm well fits the architecture of Graphical Processing Units (GPUs).
Starting with a peak at the general architecture of a GPU and its main differences with CPUs, the talk describes the porting of a numerical solver for non-symmetric linear systems of equations to GPU. PyCUDA, a Python wrapper for the NVIDIA CUDA parallel programming framework, has been used for the implementation: the readability and maintainability offered by Python are of paramount importance for researchers whose main field is not computer science. The design choices, as well as the strengths and weaknesses of PyCUDA, are illustrated and discussed with easy to read code snippets and benchmarks.
With relatively low effort, many scientific applications might benefit from the increased computational power offered by GPUs. As an example, results are shown from PyNS: a three-dimensional laminar Navier-Stokes CFD code that makes use of the aforementioned solver.