Random number generators input

This page discusses how to configure random number generators (RNG) in Walker and RNGTest.

Requirements

  • Any control file setup that needs one or more RNGs must contain an rngs...end block. This is used to enable and configure one or more RNGs.
  • The rngs...end block must appear before any reference to an RNG.
  • The rngs...end block consists of a list of <rngname>...end blocks, where <rngname> is a placeholder for the name of the RNG to be enabled and configured. Currently, three different libraries are interfaced: Intel's Math Kernel Library (MKL), RNGSSE, and Random123. See also the page on RNGTest. The first part of <rngname> is the library, mkl, rngsse, or r123, followed by an underscore, _, followed by the name of the particular RNG from the given library.
  • Each <rngname>...end block expects a different syntax, depending on what options are available for (and interfaced with) the given RNG.

Configuration of MKL VSL RNGs

All RNGs provided by MKL can be configured to be initialized using a user-specified seed, and use a user-specified uniform_method, gaussian_method, beta_method, and gamma_method, each used to control the algorithm used for the various distribution generators. For more details on the available options for these keywords, see the on-screen help from the executable, e.g.,

walker -H uniform_method

Configuration of RNGSSE RNGs

All RNGs provided by the RNGSSE library can be configured to be initialized using a user-specified sequence length by the seqlen keyword. For more details on the available options for the seqlen keyword, see the on-screen help from the executable, e.g.,

walker -H seqlen
All RNGSSE2 RNGs support sampling in parallel.

Configuration of Random123 RNGs

The RNGs provided by the Random123 library that are hooked up are ThreeFry and Philox. They can be configured to be initialized using a user-specified seed with the seed keyword.

All Random123 RNGs support sampling in parallel.

Configuring random number generators

Here is an example control file block configuring multiple generators.

rngs
  mkl_mcg59
    seed 2134
    uniform_method accurate
  end

  mkl_r250 seed 1 end
  mkl_mcg31 end
  mkl_mrg32k3a seed 0 end

  rngsse_mrg32k3a end
  rngsse_gq58.4
    seqlen long
  end

  r123_threefry end
end