Commit ec1571bc authored by thomas.forbriger's avatar thomas.forbriger

ts/croposp/tests [TASK]: adjust random number generator

parent 2dd54dbe
......@@ -3,7 +3,7 @@
#
# Copyright (c) 2019 by Thomas Forbriger (BFO Schiltach)
#
# compile croposp
# test suite for croposp
#
# ----
# This program is free software; you can redistribute it and/or modify
......@@ -75,20 +75,74 @@ CPSD_DUR=8640.
#
CPSD_SIGGENOPT=-v -o -d $(CPSD_DT) -T $(CPSD_DUR) -ot bin
# set random number generator type
# --------------------------------
#
# Quotation from
# https://www.gnu.org/software/gsl/doc/html/index.html
# https://www.gnu.org/software/gsl/doc/html/rng.html#random-number-generator-algorithms
#
# The following generators are recommended for use in simulation. They have
# extremely long periods, low correlation and pass most statistical tests.
# For the most reliable source of uncorrelated numbers, the second-generation
# RANLUX generators have the strongest proof of randomness.
#
# gsl_rng_ranlxd1
# gsl_rng_ranlxd2
#
# These generators produce double precision output (48 bits) from the
# RANLXS generator. The library provides two luxury levels ranlxd1 and
# ranlxd2, in increasing order of strength.
#
# gsl_rng_ranlux
# gsl_rng_ranlux389
#
# The ranlux generator is an implementation of the original algorithm
# developed by Luscher. It uses a lagged-fibonacci-with-skipping
# algorithm to produce “luxury random numbers”. It is a 24-bit
# generator, originally designed for single-precision IEEE floating
# point numbers. This implementation is based on integer arithmetic,
# while the second-generation versions RANLXS and RANLXD described
# above provide floating-point implementations which will be faster
# on many platforms. The period of the generator is about 10^{171}.
# The algorithm has mathematically proven properties and it can
# provide truly decorrelated numbers at a known level of randomness.
# The default level of decorrelation recommended by Luscher is
# provided by gsl_rng_ranlux, while gsl_rng_ranlux389 gives the
# highest level of randomness, with all 24 bits decorrelated. Both
# types of generator use 24 words of state per generator.
#
# For more information see,
#
# * M. Luscher, “A portable high-quality random number generator for
# lattice field theory calculations”, Computer Physics Communications,
# 79 (1994) 100–110.
# * F. James, “RANLUX: A Fortran implementation of the high-quality
# pseudo-random number generator of Luscher”, Computer Physics
# Communications, 79 (1994) 111–114
#
RNGTYPE=ranlux
# Choose:
RNGTYPE=ranlxd2
cpsd1raw.bin:
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
export GSL_RNG_TYPE=$(RNGTYPE); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
cpsd2raw.bin:
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
export GSL_RNG_TYPE=$(RNGTYPE); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
cpsd3raw.bin:
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
export GSL_RNG_TYPE=$(RNGTYPE); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
cpsd4raw.bin:
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
export GSL_RNG_TYPE=$(RNGTYPE); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
# create time series for common noise signal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment