Abstract
We develop a novel multispin coded random number generator algorithm to compute bits equal to 1 with probabilityp. Compared to previously used algorithms, this generator is at least equally fast and allows for an arbitrary accuracy of the computed probability without any significant increase in time. An explicit implementation of the algorithm is given for a Cray-1 vector computer, and the modifications for other machines are discussed. Finally, the algorithm is tested by computing the magnetization of the two-dimensional Ising model. The measured speed of the program is 57 million spin-flips per second. The agreement with theoretical values is found to remain very satisfying even when quite close (∼-0.5%) to the critical temperature.
Similar content being viewed by others
References
K. Binder, inPhase Transitions and Critical Phenomena, Vol. 5b, C. Domb and H. S. Green, eds. (Academic Press, New York, 1976), p. 2.
G. F. Mazenko and O. T. Valls,Phys. Rev. B 24:1419 (1981); R. Bausch, V. Dohm, H. K. Janssen, and R. K. P. Zia,Phys. Rev. Lett. 47:1837 (1981).
R. B. Pearson, J. L. Richardson, and D. Toussaint,J. Comp. Phys. 51:241 (1983); A. Hoogland, J. Spaa, B. Selman, and A. Compagna,J. Comp. Phys. 51:250 (1983); A. F. Bakker, C. Bruin, F. van Dieren, and H. J. Hilhorst,Phys. Lett. 93A:67 (1982); N. H. Christ and A. E. Terrano,IEEE Trans. Comp. C 33:344 (1984).
R. H. Swendsen, inReal Space Renormalization (Topics in Current Physics, Vol. 30), T. W. Burkhardt and J. M. T. van Leeuwen, eds. (Springer-Verlag, 1982), p. 57.
R. Friedberg and J. E. Cameron,J. Chem. Phys. 52:6049 (1970); L. Jacobs and C. Rebbi,J. Comp. Phys. 41:203 (1981); C. Kalle and V. Winkelmann,J. Stat. Phys. 28:639 (1982).
G. O. Williams and M. H. Kalos,J. Stat. Phys. 37:283 (1984).
S. Wansleben, J. G. Zabolitzky, and C. Kalle,J. Stat. Phys. 37:271 (1984).
N. Metropolis, A. W. Rosenbluth, A. H. Teller, and E. Teller,J. Chem. Phys. 22:881 (1954).
Cray-1 Hardware Reference Manual.
C. N. Yang,Phys. Rev. 85:809 (1952).
S. Kirkpatrick and E. P. Stoll,J. Comp. Phys. 40:517 (1981); R. C. Tausworthe,Math. Comput. 19:201 (1965); S. W. Golomb,Shift Register Sequences (Holden Day, San Francisco, 1967).
N. Zierler and J. Brillhart,Inform. Contrib. 14:566 (1969).
D. Huse,Phys. Rev. B 24:5180 (1981); S. Ostlund,Phys. Rev. B 24:398 (1981).
D. E. Knuth and A. C. Yao, The complexity of nonuniform random number generation, inAlgorithms and Complexity, J. F. Traub, ed. (Academic Press, 1976), pp. 357–428.
A. J. Guttmann,J. Phys.A 8:1236 (1976).
E. Stoll, K. Binder, and T. Schneider,Phys. Rev. B 8:3266 (1973).
Le Monde de l'Informatique (summer 1986).
G. Bhanot, D. Duke, and R. Salvador,Phys. Rev. B 33:7841 (1986);J. Stat. Phys. 44:985 (1986).
Y. O. Kabe and M. Kikuchi, Contrib. CP 5093 at the 16th International Conference on Thermodynamics and Statistical Mechanics. (Boston, August 1986).
S. F. Reddaway, D. M. Scott, and K. A. Smith,Comp. Phys. Comm. 37:351 (1985).
H. J. Herrmann, preprint.
M. Creutz,Phys. Rev. Lett. 50:1411 (1983).
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Pierre, L., Giamarchi, T. & Schulz, H.J. A new random-number generator for multispin Monte Carlo algorithms. J Stat Phys 48, 135–149 (1987). https://doi.org/10.1007/BF01010404
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01010404