SearcharxivSearch

arXiv subjects

Hiroshi Haramoto

Publications and source records attributed to Hiroshi Haramoto.

5 recordsLinked to original sources

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

Massively parallel molecular simulations require pseudorandom number streams that are provably non-overlapping and reproducible across thousands of compute units in parallel computing environments. In the widely used LAMMPS package, the standard RANMAR generator lacks a mathematically exact mechanism to jump ahead; distinct seeds are typically assigned instead, which does not ensure disjoint streams. We introduce a mathematically exact jump-ahead extension for RANMAR in LAMMPS. In practice, a single random sequence can be partitioned into consecutive, non-overlapping blocks of length $J$, with one block assigned to each compute unit under formal non-overlap guarantees. In our approach, 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 while keeping memory small. 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. Computing very large jumps (e.g., $J \approx 2^{120}$) remains practical.

cs.MS

Unveiling patterns in xorshift128+ pseudorandom number generators

Xorshift128+ is a newly proposed pseudorandom number generator (PRNG), which is now the standard PRNG on a number of platforms. We demonstrate that three-dimensional plots of the random points generated by the generator have visible structures: they concentrate on particular planes in the cube. We provide a mathematical analysis of this phenomenon.

cs.MS

Study on upper limit of sample sizes for a two-level test in NIST SP800-22

NIST SP800-22 is one of the most widely used statistical testing tools for pseudorandom number generators (PRNGs). This tool consists of 15 tests (one-level tests) and two additional tests (two-level tests). Each one-level test provides one or more $p$-values. The two-level tests measure the uniformity of the obtained $p$-values for a fixed one-level test. One of the two-level tests categorizes the $p$-values into ten intervals of equal length, and apply a chi-squared goodness-of-fit test. This two-level test is often more powerful than one-level tests, but sometimes it rejects even good PRNGs when the sample size at the second level is too large, since it detects approximation errors in the computation of $p$-values. In this paper, we propose a practical upper limit of the sample size in this two-level test, for each of six tests appeared in SP800-22. These upper limits are derived by the chi-squared discrepancy between the distribution of the approximated $p$-values and the uniform distribution $U(0, 1)$. We also computed a "risky" sample size at the second level for each one-level test. Our experiments show that the two-level test with the proposed upper limit gives appropriate results, while using the risky size often rejects even good PRNGs. We also propose another improvement: to use the exact probability for the ten categories in the computation of goodness-of-fit at the two-level test. This allows us to increase the sample size at the second level, and would make the test more sensitive than the NIST's recommending usage.

stat.ME

Checking the Quality of Approximation of $p$-values in Statistical Tests for Random Number Generators by Using a Three-Level Test

Statistical tests of pseudorandom number generators (PRNGs) are applicable to any type of random number generators and are indispensable for evaluation. While several practical packages for statistical tests of randomness exist, they may suffer from a lack of reliability: for some tests, the amount of approximation error can be deemed significant. Reducing this error by finding a better approximation is necessary, but it generally requires an enormous amount of effort. In this paper, we introduce an experimental method for revealing defects in statistical tests by using a three-level test proposed by Okutomi and Nakamura. In particular, we investigate the NIST test suite and the test batteries in TestU01, which are widely used statistical packages. Furthermore, we show the efficiency of several modifications for some tests.

stat.CO