A package of Linux scripts for the parallelization of Monte Carlo simulations

被引:55
作者
Badal, Andreu [1 ]
Sempau, Josep [1 ]
机构
[1] Univ Politecn Catalunya, Inst Tech Energet, E-08028 Barcelona, Spain
关键词
Monte Carlo; parallelization; pseudo-random number generator; multiplicative linear congruential generator; RANECU; PENELOPE;
D O I
10.1016/j.cpc.2006.05.009
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Despite the fact that fast computers are nowadays available at low cost, there are many situations where obtaining a reasonably low statistical uncertainty in a Monte Carlo (MC) simulation involves a prohibitively large amount of time. This limitation can be overcome by having recourse to parallel computing. Most tools designed to facilitate this approach require modification of the source code and the installation of additional software, which may be inconvenient for some users. We present a set of tools, named clonEasy, that implement a parallelization scheme of a MC simulation that is free from these drawbacks. In clonEasy, which is designed to run under Linux, a set of "clone" CPUs is governed by a.,master" computer by taking advantage of the capabilities of the Secure Shell (ssh) protocol. Any Linux computer on the Internet that can be ssh-accessed by the user can be used as a clone. A key ingredient for the parallel calculation to be reliable is the availability of an independent string of random numbers for each CPU. Many generators-such as RANLUX, RANECU or the Mersenne Twister-can readily produce these strings by initializing them appropriately and, hence, they are suitable to be used with clonEasy. This work was primarily motivated by the need to find a straightforward way to parallelize PENELOPE, a code for MC simulation of radiation transport that (in its current 2005 version) employs the generator RANECU, which uses a combination of two multiplicative linear congruential generators (MLCGs). Thus, this paper is focused on this class of generators and, in particular, we briefly present an extension of RANECU that increases its period up to similar to 5 x 10(27) and we introduce seedsMLCG, a tool that provides the information necessary to initialize disjoint sequences of an MLCG to feed different CPUs. This program, in combination with clonEasy, allows to run PENELOPE in parallel easily, without requiring specific libraries or significant alterations of the sequential code.
引用
收藏
页码:440 / 450
页数:11
相关论文
共 23 条
[1]   ANALYSIS OF RANDOM NUMBER GENERATORS USING MONTE-CARLO SIMULATION [J].
CODDINGTON, PD .
INTERNATIONAL JOURNAL OF MODERN PHYSICS C-PHYSICS AND COMPUTERS, 1994, 5 (03) :547-560
[2]   MONTE-CARLO SIMULATIONS - HIDDEN ERRORS FROM GOOD RANDOM NUMBER GENERATORS [J].
FERRENBERG, AM ;
LANDAU, DP ;
WONG, YJ .
PHYSICAL REVIEW LETTERS, 1992, 69 (23) :3382-3384
[3]   Hurst's rescaled range statistical analysis for pseudorandom number generators used in physical simulations [J].
Gammel, BM .
PHYSICAL REVIEW E, 1998, 58 (02) :2586-2597
[4]   A REVIEW OF PSEUDORANDOM NUMBER GENERATORS [J].
JAMES, F .
COMPUTER PHYSICS COMMUNICATIONS, 1990, 60 (03) :329-344
[6]  
Kalos M.H., 1986, Monte Carlo Methods, VI
[7]  
Knuth D. E., 2014, Seminumerical algorithms, V2
[8]  
Knuth Donald E., 1973, ART COMPUTER PROGRAM, V1
[9]   RANDOM NUMBERS FOR SIMULATION [J].
LECUYER, P .
COMMUNICATIONS OF THE ACM, 1990, 33 (10) :85-97
[10]   EFFICIENT AND PORTABLE COMBINED RANDOM NUMBER GENERATORS [J].
LECUYER, P .
COMMUNICATIONS OF THE ACM, 1988, 31 (06) :742-&