ACM Transactions on Mathematical Software

A lattice Boltzmann formulation using fixed-point arithmetic for CPUs and GPUs

Paul J. Dellar

Key points

From the paper's conclusion
  • Performance is roughly unchanged for 32-bit and 64-bit numbers on L40s GPUs, while simulations using 128-bit fixed-point numbers on CPUs run about 15 times faster than those using emulated 128-bit floating-point numbers.

Abstract

The lattice Boltzmann method computes solutions to a stylised version of the Boltzmann equation with a small discrete velocity space. All spatial derivatives can be integrated exactly along characteristics. Solutions of this Boltzmann equation approach solutions of the Navier–Stokes equations provided they evolve much more slowly than the timescale of collisions. The particle distributions then deviate ony slightly from a global equilibrium. These deviations can be effectively represented using fixed-point numbers. The memory capacity and bandwidth otherwise occupied by floating-point exponents can be reused to perform more accurate simulations. Fixed-point numbers can be manipulated simply and cleanly using mixed-language programming to combine C _BitInt types with modern Fortran generic functions, infix operators, and automatic parallelisation. The resulting source code is easily switchable to use different sized fixed- or floating-point numbers at compile time. Accumulated round-off errors in isothermal simulations of the three-dimensional Taylor–Green vortex reduce by factors of 5, 62 and 960 on changing from floating-point to fixed-point numbers with 32, 64 and 128 bits respectively. Performance is roughly unchanged for 32-bit and 64-bit numbers on L40s GPUs, while simulations using 128-bit fixed-point numbers on CPUs run about 15 times faster than those using emulated 128-bit floating-point numbers.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers