Skip to main content
QUICK REVIEW

[Paper Review] Efficient pseudo-random number generators for biomolecular simulations on graphics processors

Artem Zhmurov, K. Rybnikov|arXiv (Cornell University)|Mar 4, 2010
Chaos-based Image/Signal EncryptionComputer Science37 references4 citations
TL;DR

This paper presents two GPU-optimized pseudo-random number generator (RNG) strategies—per-thread RNGs and shared RNGs—for accelerating biomolecular simulations. It implements Ran2, Hybrid Taus, and Lagged Fibonacci algorithms on GPUs, achieving high performance and statistical quality, with speedups up to 50× over CPU methods while maintaining strong randomness for Langevin dynamics simulations.

ABSTRACT

Langevin Dynamics, Monte Carlo, and all-atom Molecular Dynamics simulations in implicit solvent, widely used to access the microscopic transitions in biomolecules, require a reliable source of random numbers. Here we present the two main approaches for implementation of random number generators (RNGs) on a GPU, which enable one to generate random numbers on the fly. In the one-RNG-per-thread approach, inherent in CPU-based calculations, one RNG produces a stream of random numbers in each thread of execution, whereas the one-RNG-for-all-threads approach builds on the ability of different threads to communicate, thus, sharing random seeds across the entire GPU device. We exemplify the use of these approaches through the development of Ran2, Hybrid Taus, and Lagged Fibonacci algorithms fully implemented on the GPU. As an application-based test of randomness, we carry out LD simulations of N independent harmonic oscillators coupled to a stochastic thermostat. This model allows us to assess statistical quality of random numbers by comparing the simulation output with the exact results that would be obtained with truly random numbers. We also profile the performance of these generators in terms of the computational time, memory usage, and the speedup factor (CPU/GPU time).

Motivation & Objective

  • To address the need for high-performance, statistically robust random number generation in GPU-accelerated biomolecular simulations.
  • To overcome the limitations of CPU-based RNGs in parallel GPU architectures by designing GPU-native RNG implementations.
  • To evaluate the statistical quality and computational efficiency of GPU-optimized RNGs in molecular dynamics and Langevin dynamics simulations.
  • To compare two distinct GPU RNG strategies: one RNG per thread and one RNG shared across all threads.
  • To validate randomness quality using a benchmark model of N independent harmonic oscillators with exact analytical solutions.

Proposed method

  • Adapts the Ran2 algorithm for GPU execution using per-thread RNG state management and global memory persistence across simulation steps.
  • Implements a hybrid Tausworthe generator with three independent Tausworthe streams and a linear congruential generator (LCG) for improved statistical properties.
  • Develops a Lagged Fibonacci generator using a single shared state array across all GPU threads, with modulo indexing to simulate a circular buffer.
  • Uses thread indexing to assign each thread a unique starting position in the shared RNG state array, enabling concurrent generation of random numbers.
  • Employs a single-instruction-multiple-data (SIMD) execution model where each thread generates multiple random numbers per simulation step using local state and global memory access.
  • Applies a statistical test based on Langevin dynamics of N harmonic oscillators, comparing simulated energy distributions to exact analytical results.

Experimental results

Research questions

  • RQ1Can GPU-optimized RNGs achieve both high performance and strong statistical quality in biomolecular simulations?
  • RQ2How do the one-RNG-per-thread and one-RNG-for-all-threads approaches compare in terms of performance and randomness quality on GPU architectures?
  • RQ3To what extent do GPU-implemented RNGs like Ran2, Hybrid Taus, and Lagged Fibonacci maintain statistical properties comparable to their CPU counterparts?
  • RQ4What is the maximum achievable speedup of GPU-based RNGs over CPU-based RNGs in molecular dynamics simulations?
  • RQ5How well do the generated random numbers reproduce the exact statistical behavior predicted by theory in a test system of harmonic oscillators?

Key findings

  • The GPU-optimized Ran2, Hybrid Taus, and Lagged Fibonacci RNGs produce statistically valid random numbers, with simulation results closely matching exact analytical solutions for N harmonic oscillators.
  • The one-RNG-for-all-threads approach using the Lagged Fibonacci generator achieved the highest performance, with a reported speedup of up to 50× over CPU implementations.
  • The one-RNG-per-thread approach ensured better statistical independence between threads but incurred higher memory usage due to per-thread state storage.
  • All GPU-implemented RNGs maintained high-quality statistical properties, as confirmed by comparison with exact results from the harmonic oscillator model.
  • The computational efficiency of GPU RNGs was maximized by minimizing global memory accesses and leveraging coalesced memory access patterns.
  • The performance profile showed that GPU-based RNGs achieved up to 1 TFLOP/s on a single GPU chip, demonstrating their suitability for large-scale biomolecular simulations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.