1 / 10

LFG Tutorial

LFG Tutorial. Pat Burns, CSU FRCRC HPC Symposium August 14, 2012 See http://lamar.colostate.edu/~pburns/lfg.htm. Outline. Introductions and roles Introductory material r ng-intro.pdf (download from web site) Exercise #1, Buffon’s Needle problem

shelly
Download Presentation

LFG Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LFG Tutorial Pat Burns, CSU FRCRC HPC Symposium August 14, 2012 See http://lamar.colostate.edu/~pburns/lfg.htm

  2. Outline • Introductions and roles • Introductory material • rng-intro.pdf (download from web site) • Exercise #1, Buffon’s Needle problem • Exercise #2: average and standard deviation • Lagged Fibonacci Generators • lfg.pdf (download from web site) • Exercise #3: download, review, upload, compile and run ranlf.f90 or ranlf.c (download from web site) • Parallel implementations

  3. Advantages • Portable, no library calls • Fast • Excellent statistical properties • Use a large enough LFG to avoid issues with the ‘Birthday Spacings’ test • Easily parallelizable and scalable • Ability to checkpoint • Reproducible results

  4. Deficiencies • Low-order bits are not random

  5. In the Notes • X’s are (fixed point) integers • R’s are real (floating point) numbers • In the following slides, all are integers • Development is for signed, 32-bit integers • Could extend to unsigned 32- or 64-bit integers in C, or signed 64-bit integers in Fortran • Safest to initialize X array to 0 • Beware of masking a canonical bit

  6. LFG Approach - Scalar

  7. LFG Approach – MPI

  8. MPI Implementation Separate Memory Spaces 1 2 … nt-1 0 3 Task No. Each initialized separately via its Tausworthe generator

  9. LFG Approach – OpenMP

  10. OpenMP Implementation Each column initialized separately via its Tausworthe generator Tausworthe Array LFG 2-d Array Thread No. … 1 2 nt-1 0 3 Shared Memory Space

More Related