Making the RANMAR pseudorandom number generator in LAMMPS up to four times faster, with an implementation of jump-ahead

Read full text
Authors: Hiroshi Haramoto, Kosuke Suzuki
Cited by: 0
References: 21

Abstract

Abstract Massively parallel molecular simulations require pseudorandom number streams that are provably non-overlapping and reproducible across thousands of compute units. In LAMMPS, the standard RANMAR generator lacks exact jump-ahead; distinct seeds do not ensure disjoint streams. We introduce a mathematically exact jump-ahead for RANMAR in LAMMPS. A single sequence is partitioned into consecutive blocks of length J , assigning one block per unit with formal non-overlap guarantees. We develop an algebraic reformulation that enables efficient jump-ahead even for very large J by casting state advancement into polynomial computations over finite residue rings. We implement the extension in C++ using Number Theory Library (NTL) and integrate it into LAMMPS without altering user workflows. Beyond enabling exact partitioning, converting the 24-bit floating-point recurrence to an equivalent 24-bit integer recurrence accelerates generation itself: across diverse CPUs, generation is approximately two to four times faster than the floating-point baseline.

Fields of Study & Subjects

Cryptography and Residue Arithmetic Chaos-based Image/Signal Encryption Cryptographic Implementations and Security

Publication details

Journal / source
Monte Carlo Methods and Applications
Publisher
Walter de Gruyter GmbH
Volume
32
Issue
3
Pages
249–258
Publication date
28 July 2026
Language
EN