Cactus Code Thorn ParaRand Authors : Julian Borrill, John Shalf CVS info : $Header$ -------------------------------------------------------------------------- Purpose of the thorn: A parallel random number generator. Generates consistent/repeatable random number fields regardless of the number of processors involved in distributed memory runs. The problem with random number generation using unix drand() is that if you provide the same seed for each processor you end up with the same set of random numbers for each processor-local domain (which means you get a lattice of reapeated results when you run your simulation). However, if you seed each processor differently, you will get different results depending on the number of processors you use. Ideally you want to have repeatable results when you use the same global domain size regardless of the number of processors you use. This generator accomplishes this by splicing into the correct portion of a well known random number sequence so that each cell in the computational domain gets the same part of the overall random number sequence regardless of the domain decomposition. Also includes utilities for different random number distributions (spherical,gaussian etc...) suitable for QFT intial data.