From 048a3355190f73463484685b439cd34ff6d4182f Mon Sep 17 00:00:00 2001 From: Niklas Schnierstein <schni@draco01.mpcdf.mpg.de> Date: Wed, 4 Dec 2019 14:18:49 +0100 Subject: [PATCH] made seed time dependent --- cpp/full_code/ornstein_uhlenbeck_process.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/full_code/ornstein_uhlenbeck_process.cpp b/cpp/full_code/ornstein_uhlenbeck_process.cpp index 3a095047..5dd95ebc 100644 --- a/cpp/full_code/ornstein_uhlenbeck_process.cpp +++ b/cpp/full_code/ornstein_uhlenbeck_process.cpp @@ -54,7 +54,9 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process( for(int thread=0;thread<omp_get_max_threads();thread++) { - int current_seed = + assert(omp_get_wtime() != 0); + unsigned int current_seed = omp_get_wtime() * + this->ou_field->clayout->nprocs*omp_get_max_threads() + this->ou_field->clayout->myrank*omp_get_max_threads() + thread; gen[thread].seed(current_seed); -- GitLab