Idan Zaguri Ran Tayeb 2014 Parallel Random Number Generator.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

1 KCipher-2 KDDI R&D Laboratories Inc.. ©KDDI R&D Laboratories Inc. All rights Reserved. 2 Introduction LFSR-based stream ciphers Linear recurrence between.
FINITE WORD LENGTH EFFECTS
Bellwork If you roll a die, what is the probability that you roll a 2 or an odd number? P(2 or odd) 2. Is this an example of mutually exclusive, overlapping,
Dynamic Power Redistribution in Failure-Prone CMPs Paula Petrica, Jonathan A. Winter * and David H. Albonesi Cornell University *Google, Inc.
STATISTICS HYPOTHESES TEST (II) One-sample tests on the mean and variance Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National.
RSLAB-NTU Lab for Remote Sensing Hydrology and Spatial Modeling 1 An Introduction to R Pseudo Random Number Generation (PRNG) Prof. Ke-Sheng Cheng Dept.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
1/25 Generic and Automatic Address Configuration for Data Center Networks 1 Kai Chen, 2 Chuanxiong Guo, 2 Haitao Wu, 3 Jing Yuan, 4 Zhenqian Feng, 1 Yan.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Coordinate Plane Practice The following presentation provides practice in two skillsThe following presentation provides practice in two skills –Graphing.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Computational Complexity
Turing Machines January 2003 Part 2:. 2 TM Recap We have seen how an abstract TM can be built to implement any computable algorithm TM has components:
DCSP-17: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK
1 Symbol Tables. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
Hash Tables.
ULC: An Unified Placement and Replacement Protocol in Multi-level Storage Systems Song Jiang and Xiaodong Zhang College of William and Mary.
1 ENGG 1015 Tutorial Revision tutorial 11 Dec Learning Objectives Prepare for the examination News Examination Closed book; Need to bring calculators SETL.
O X Click on Number next to person for a question.
© S Haughton more than 3?
Application-aware Memory System for Fair and Efficient Execution of Concurrent GPGPU Applications Adwait Jog 1, Evgeny Bolotin 2, Zvika Guz 2,a, Mike Parker.
© 2003 Andrew Chang10/23/031 What Happens in a Fall? lFalling climber builds up momentum (force x time) lWhen climber is ‘stopped’ (either by rope/anchor.
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Load Balancing Parallel Applications on Heterogeneous Platforms.
PARALLEL RANDOM NUMBER GENERATION
Take from Ten First Subtraction Strategy -9 Click on a number below to go directly to that type of subtraction problems
Flexible Product Line Engineering With a Virtual Platform Michał Antkiewicz NIER Track, ICSE’14 June 5,
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
7/20/03Copyright Ed Lipinski and Mesa Community College, All rights reserved. 1 Research Methods Summer 2009 Using Between Subjects and Within.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
We will resume in: 25 Minutes.
1 Ke – Kitchen Elements Newport Ave. – Lot 13 Bethesda, MD.
O X Click on Number next to person for a question.
1 Efficient Pseudorandom Generators from Exponentially Hard One-Way Functions Iftach Haitner, Danny Harnik, Omer Reingold.
Advanced Topics in Algorithms and Data Structures
Target code Generation Made by – Siddharth Rakesh 11CS30036 Date – 12/11/2013.
The University of Adelaide, School of Computer Science
High Performance Computing 1 Random Numbers. High Performance Computing 1 What is a random number generator? Most random number generators generate a.
Generating Random Numbers
Random Number Generation. Random Number Generators Without random numbers, we cannot do Stochastic Simulation Most computer languages have a subroutine,
1 Random Number Generation H Plan: –Introduce basics of RN generation –Define concepts and terminology –Introduce RNG methods u Linear Congruential Generator.
Random Number Generation
Random-Number Generation. 2 Properties of Random Numbers Random Number, R i, must be independently drawn from a uniform distribution with pdf: Two important.
Random Number Generation Fall 2013
Fall 2011 CSC 446/546 Part 6: Random Number Generation.
ETM 607 – Random Number and Random Variates
A SCALABLE LIBRARY FOR PSEUDORANDOM NUMBER GENERATION ALGORITHM 806: SPRNG.
Random-Number Generation Andy Wang CIS Computer Systems Performance Analysis.
© 2003, Carla Ellis Simulation Techniques Overview Simulation environments emulation exec- driven sim trace- driven sim stochastic sim Workload parameters.
CPSC 531: RN Generation1 CPSC 531:Random-Number Generation Instructor: Anirban Mahanti Office: ICT Class Location:
Chapter 7 Random-Number Generation
Parallelisation of Random Number Generation in PLACET Approaches of parallelisation in PLACET Martin Blaha University of Vienna AT CERN
Random Numbers RANDOM VS PSEUDO RANDOM. Truly Random numbers  From Wolfram: “A random number is a number chosen as if by chance from some specified distribution.
Parallel Random Number Generation
1.  How does the computer generate observations from various distributions specified after input analysis?  There are two main components to the generation.
Communication and Memory Efficient Parallel Decision Tree Construction
Random-Number Generation
Resolving collisions: Open addressing
Computer Simulation Techniques Generating Pseudo-Random Numbers
Presentation transcript:

Idan Zaguri Ran Tayeb 2014 Parallel Random Number Generator

Outline  Random Numbers Why To Prefer Pseudo- Random Numbers Application Areas The Linear Congruential Generators - LGC  Approaches to the Generation of Random Numbers on Parallel Computers Centralized Replicated Distributed  GPUs  SPRNG

Random Numbers  Well-known sequential techniques exist for generating, in a deterministic fashion.  The number sequences are largely indistinguishable from true random sequences

Why To Prefer Pseudo- Random Numbers  True random numbers are rarely used in computing because: difficult to generate There is no way to reproduce the same sequence again.  Computers use pseudo-random numbers: finite sequences generated by a deterministic process but indistinguishable, by some set of statistical tests, from a random sequence.

The Linear Congruential Generators (LGC)  Generator is a function, when applied to a number, yields the next number in the sequence. For example:  X k+1 = (a X k + c) mod m X 0, a, c, and m define the generator.  The length of the repeated cycle is called the period of the generator.

LGC  Bad example: X k +1 = (3*X k + 4) mod 8 Seq. = {1, 7, 1, 7, …}  Good example: X k +1 = (7*X k + 5) mod 18 Seq. = {1, 12, 17, 16, 9, 14, 13, 6, 11, 10, 3, 8, 7, 0, 5, 4, 15, 2, 1,…}

Approaches to the Generation of Random Numbers on Parallel Computers  Centralized  Replicated  Distributed

I. Centralized Approach  A sequential generator is encapsulated in a task from which other tasks request random numbers.  Advantages: Avoids the problem of generating multiple independent random sequences  Disadvantages: Unlikely to provide good performance Makes reproducibility hard to achieve

II. Replicated Approach  Multiple instances of the same generator are created (one per task).  Each generator uses either the same seed or a unique seed, derived, for example, from a task identifier.  Advantages: Efficiency Ease of implementation  Disadvantages: Not guaranteed to be independent and, can suffer from serious correlation problems.

III. Distributed Approach  Responsibility for generating a single sequence is partitioned among many generators, which can then be parcelled out to different tasks.  Advantages: Efficiency  Disadvantages: Difficult to implement

Distributed Approaches Random Tree Method  The random tree method employs two LGCs, L and R, that differ only in the values used for a.  L k+1 = a L L k mod m  R k+1 = a R R k mod m R1 L R0 R2

 The same seed on both Left & Right Generators generates different random sequences.  By applying the right generator to elements of the left generator's sequence (or vice versa), a tree of random numbers can be generated.  By convention, the right generator R is used to generate random values for use in computation, while the left generator L is applied to values computed by R to obtain the starting points R0, R1, etc., for new right sequences.

 Advantages: Useful to generate new random sequences. This is valuable, in applications in which new tasks and hence new random generators must be created dynamically.  Disadvantages: There is no guarantee that different right sequences will not overlap. If two starting points happen to be close to each other, the two right sequences that are generated will be highly correlated. Distributed Approaches Random Tree Method

 A variant of the random tree method  Used to generate sequences that can be guaranteed not to overlap for a certain period. Distributed Approaches The Leapfrog Method

L0L0 L1L1 L2L2 L3L3 L4L4 L5L5 L6L6 L7L7 L8L8 R0R0 R1R1 R2R2 The leapfrog method with n=3. Each of the right generators selects a disjoint subsequence of the sequence constructed by the left generator’s sequence.

GPUs- Gaining Speedup Dependence on Random Number Generation

Performance on Nvidia Tesla  with-dependence-on-random-number-generation

SPRNG  A “Scalable Library for Pseudorandom Number Generation”,  Designed to use parametrized pseudorandom number generators to provide random number streams to parallel processes.  Includes Reproducibility controlled by a single “global” seed A uniform C, C++, Fortran and MPI interface

?