SPRNG
SPRNG is a scalable parallel pseudorandom number generator especially suited to large-scale, parallel Monte Carlo applications.
SPRNG includes five different random number generators. The generators available are:
- Combined Multiple Recursive Generator
- 48 Bit Linear Congruential Generator
- 64 Bit Linear Congruential Generator
- Modified Lagged Fibonacci Generator
- Multiplicative Lagged Fibonacci Generator
In SPRNG version 2.0, all the random number generators are in one library. They can all be used in a single program during the same time.
In SPRNG version 1.0, each generator has its own library. Switching between them only involves changing which library is linked to and does not involve changes to source code.
In version 1.0, the libraries corresponding to each generator are:
| Generator | library |
|---|---|
| Combined Multiple Recursive Generator | cmrg |
| 48 Bit Linear Congruential Generator | lcg |
| 64 Bit Linear Congruential Generator | lcg64 |
| Modified Lagged Fibonacci Generator | lfg |
| Multiplicative Lagged Fibonacci Generator | mlfg |
Installed on: Big Ben.
Big Ben
Only version 2.0 is available.
Usage:
- Define the necessary environment variables:
setenv $SPRNG_INC /usr/local/packages/sprng2.0/include setenv $SPRNG_LIB /usr/local/packages/sprng2.0/lib setenv $GMP_LIB /usr/local/packages/gmp-4.1.4/lib
- Compile with a command like:
ftn -o test -I$SPRNG_LIB test.F -L$SPRNG_LIB -L$GMP_LIB -lsprng -lgmp
- Run the executable;
pbsyod ./test
See the example.
Other SPRNG documentation:
See also:
- Other mathematical and statistical software or utility software installed at PSC.