Algorithm 947

An algorithm for parallel generation of a random permutation of a large set of distinct integers is presented. This algorithm is designed for massively parallel systems with distributed memory architectures and the MPI-based runtime environments. Scalability of the algorithm is analyzed according to the memory and communication requirements. An implementation of the algorithm in a form of a software library based on the C++ programming language and the MPI application programming interface is further provided. Finally, performed experiments are described and their results discussed. The biggest of these experiments resulted in a generation of a random permutation of 241 integers in slightly more than four minutes using 131072 CPU cores.

[1]  Michael T. Goodrich,et al.  Randomized fully-scalable BSP techniques for multi-searching and convex hull construction , 1997, SODA '97.

[2]  Michael T. Goodrich,et al.  Communication-efficient parallel sorting (preliminary version) , 1996, STOC '96.

[3]  Alexander Tiskin,et al.  BSP (Bulk Synchronous Parallelism) , 2011, Encyclopedia of Parallel Computing.

[4]  Martin Reddy Chapter 4 – Design , 2011 .

[5]  Joseph JáJá PRAM (Parallel Random Access Machines) , 2011, Encyclopedia of Parallel Computing.

[6]  Donald E. Knuth,et al.  The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .

[7]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[8]  Peter Sanders,et al.  Random Permutations on Distributed, External and Hierarchical Memory , 1998, Inf. Process. Lett..

[9]  Jens Gustedt Engineering Parallel In-Place Random Generation of Integer Permutations , 2008, WEA.

[10]  Herb Sutter Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions , 1999 .

[11]  Srinivas Aluru,et al.  Bulk Synchronous Parallelism (BSP) , 2011, Encyclopedia of Parallel Computing.

[12]  Richard J. Anderson Parallel algorithms for generating random permutations on a shared memory machine , 1990, SPAA '90.

[13]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[14]  Oded Goldreich,et al.  A Primer on Pseudorandom Generators , 2010 .

[15]  Nicolai M. Josuttis The C++ Standard Library: A Tutorial and Reference , 2012 .

[16]  Torben Hagerup Fast Parallel Generation of Random Permutations , 1991, ICALP.

[17]  Jack Dongarra,et al.  MPI - The Complete Reference: Volume 1, The MPI Core , 1998 .

[18]  Isabelle Guérin Lassous,et al.  Generating Random Permutation in the Framework of Coarse Grained Models , 2000, OPODIS.

[19]  Jack Dongarra,et al.  MPI: The Complete Reference , 1996 .

[20]  William Gropp,et al.  Mpi - The Complete Reference: Volume 2, the Mpi Extensions , 1998 .

[21]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[22]  Björn Karlsson,et al.  Beyond the C++ Standard Library: An Introduction to Boost , 2005 .

[23]  Björn Karlsson,et al.  Beyond the C++ Standard Library , 2005 .

[24]  John H. Reif,et al.  An optimal parallel algorithm for integer sorting , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[25]  Andrew Rau-Chaplin,et al.  Scalable parallel geometric algorithms for coarse grained multicomputers , 1993, SCG '93.

[26]  Gary L. Miller,et al.  Parallel tree contraction and its application , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[27]  Stéphane Vialle,et al.  The parXXL Environment: Scalable Fine Grained Development for Large Coarse Grained Platforms , 2006, PARA.

[28]  David A. Bader,et al.  An Empirical Analysis of Parallel Random Permutation Algorithms ON SMPs , 2006, PDCS.

[29]  Rudolf Eigenmann,et al.  Parallel Random Access Machines (PRAM) , 2011, Encyclopedia of Parallel Computing.

[30]  Artur Czumaj,et al.  Fast Generation of Random Permutations Via Networks Simulation , 1998, Algorithmica.

[31]  Herb Sutter,et al.  C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (C++ in Depth Series) , 2004 .

[32]  Helmut G. Katzgraber,et al.  Random Numbers in Scientific Computing: An Introduction , 2010, ArXiv.

[33]  Martin Reddy,et al.  API Design for C , 2011 .

[34]  David Abrahams,et al.  C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ In-Depth Series) , 2004 .