After a long summer of hacking, I’m happy to announce the release of OpenCurrent, an open source library of CUDA-accelerated PDE solvers over regular grids. It includes a second order accurate solver for buoyancy-driven incompressible flows, as well as building blocks from which a range of interesting solvers can be built. At the moment, OpenCurrent supports single-GPU configurations, but I am hard at work adding support for multiple GPUs. I look forward to working with the open source community to improve the code base in whatever ways people find compelling and useful in their work.
[url=“Google Code Archive - Long-term storage for Google Code Project Hosting.”]Google Code Archive - Long-term storage for Google Code Project Hosting.
A brief description of the library is below.
My hope is that OpenCurrent will be a catalyst for collaboration between groups working on structured CFD codes, as well as other PDE solvers over structured grids. I look forward to hearing your feedback.
Cheers,
Jon Cohen
OpenCurrent is an open source C++ library for solving Partial Differential Equations (PDEs) over regular grids using the CUDA platform from NVIDIA. It breaks down a PDE into 3 basic objects, “Gridsâ€, “Solvers,†and “Equations.†“Grid†data structures efficiently implement regular 1D, 2D, and 3D arrays in both double and single precision. Grids support operations like computing linear combinations, managing host-device memory transfers, interpolating values at non-grid points, and performing array-wide reductions. “Solvers†use these data structures to calculate terms arising from discretizations of PDEs, such as finite-difference based advection and diffusion schemes, and a multigrid solver for Poisson equations. These computational building blocks can be assembled into complete “Equation†objects that solve time-dependent PDEs. One such Equation solver is an incompressible Navier-Stokes solver that uses a second-order Boussinesq model. This equation solver is fully validated, and has been used to study Rayleigh-Benard convection under a variety of different regimes [1]. Benchmarks show it to perform about 8 times faster than an equivalent Fortran code running on an 8-core Xeon.
The OpenCurrent infrastructure includes support for profiling both the CPU or GPU, support for reading and writing NetCDF data files, and the ability to generate simple plots. It includes a complete validation and unit testing framework that allows for easy and automatic validation of numerical methods and solvers. OpenCurrent uses CMake for cross-platform development and has been tested on both Windows and Linux-based systems. Via a compile-time option, OpenCurrent can be configured to support older hardware (pre-GT200) that does not handle double precision, but on newer hardware all routines are available in both double and single precision.
[1] Cohen, Jonathan, and M. Jeroen Molemaker. 2009. “A Fast Double Precision CFD Code using CUDA,†Proceedings of ParCFD 2009, to appear.