Work

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

Year: 2026
Type: article
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.
Language: English
Open Access status: hybrid
Estimated APC paid: $2,712
OpenAlex ID: W4416932234
FWCI:
Cites: 15
Cited by:
Related to: