کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
502773 863722 2006 11 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
A package of Linux scripts for the parallelization of Monte Carlo simulations
موضوعات مرتبط
مهندسی و علوم پایه شیمی شیمی تئوریک و عملی
پیش نمایش صفحه اول مقاله
A package of Linux scripts for the parallelization of Monte Carlo simulations
چکیده انگلیسی

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 ∼5×1027 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.Program summary 1Title of program:clonEasyCatalogue identifier:ADYD_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/ADYD_v1_0Program obtainable from:CPC Program Library, Queen's University of Belfast, Northern IrelandComputer for which the program is designed and others in which it is operable:Any computer with a Unix style shell (bash), support for the Secure Shell protocol and a FORTRAN compilerOperating systems under which the program has been tested:Linux (RedHat 8.0, SuSe 8.1, Debian Woody 3.1)Compilers:GNU FORTRAN g77 (Linux); g95 (Linux); Intel Fortran Compiler 7.1 (Linux)Programming language used:Linux shell (bash) script, FORTRAN 77No. of bits in a word:32No. of lines in distributed program, including test data, etc.:1916No. of bytes in distributed program, including test data, etc.:18 202Distribution format:tar.gzNature of the physical problem:There are many situations where a Monte Carlo simulation involves a huge amount of CPU time. The parallelization of such calculations is a simple way of obtaining a relatively low statistical uncertainty using a reasonable amount of time.Method of solution:The presented collection of Linux scripts and auxiliary FORTRAN programs implement Secure Shell-based communication between a “master” computer and a set of “clones”. The aim of this communication is to execute a code that performs a Monte Carlo simulation on all the clones simultaneously. The code is unique, but each clone is fed with a different set of random seeds. Hence, clonEasy effectively permits the parallelization of the calculation.Restrictions on the complexity of the program:clonEasy can only be used with programs that produce statistically independent results using the same code, but with a different sequence of random numbers. Users must choose the initialization values for the random number generator on each computer and combine the output from the different executions. A FORTRAN program to combine the final results is also provided.Typical running time:The execution time of each script largely depends on the number of computers that are used, the actions that are to be performed and, to a lesser extent, on the network connexion bandwidth.Unusual features of the program:Any computer on the Internet with a Secure Shell client/server program installed can be used as a node of a virtual computer cluster for parallel calculations with the sequential source code. The simplicity of the parallelization scheme makes the use of this package a straightforward task, which does not require installing any additional libraries.Program summary 2Title of program:seedsMLCGCatalogue identifier:ADYE_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/ADYE_v1_0Program obtainable from:CPC Program Library, Queen's University of Belfast, Northern IrelandComputer for which the program is designed and others in which it is operable:Any computer with a FORTRAN compilerOperating systems under which the program has been tested:Linux (RedHat 8.0, SuSe 8.1, Debian Woody 3.1), MS Windows (2000, XP)Compilers:GNU FORTRAN g77 (Linux and Windows); g95 (Linux); Intel Fortran Compiler 7.1 (Linux); Compaq Visual Fortran 6.1 (Windows)Programming language used:FORTRAN 77No. of bits in a word:32Memory required to execute with typical data:500 kilobytesNo. of lines in distributed program, including test data, etc.:492No. of bytes in distributed program, including test data, etc.:5582Distribution format:tar.gzNature of the physical problem:Statistically independent results from different runs of a Monte Carlo code can be obtained using uncorrelated sequences of random numbers on each execution. Multiplicative linear congruential generators (MLCG), or other generators that are based on them such as RANECU, can be adapted to produce these sequences.Method of solution:  For a given MLCG, the presented program calculates initialization values that produce disjoint, consecutive sequences of pseudo-random numbers. The calculated values initiate the generator in distant positions of the random number cycle and can be used, for instance, on a parallel simulation. The values are found using the formula SJ=(aJS0)MODm, which gives the random value that will be generated after J iterations of the MLCG.Restrictions on the complexity of the program:The 32-bit length restriction for the integer variables in standard FORTRAN 77 limits the produced seeds to be separated a distance smaller than 231, when the distance J is expressed as an integer value. The program allows the user to input the distance as a power of 10 for the purpose of efficiently splitting the sequence of generators with a very long period.Typical running time:The execution time depends on the parameters of the used MLCG and the distance between the generated seeds. The generation of 106 seeds separated 1012 units in the sequential cycle, for one of the MLCGs found in the RANECU generator, takes 3 s on a 2.4 GHz Intel Pentium 4 using the g77 compiler.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Computer Physics Communications - Volume 175, Issue 6, 15 September 2006, Pages 440–450
نویسندگان
, ,