diff --git a/cpp/full_code/ornstein_uhlenbeck_process.cpp b/cpp/full_code/ornstein_uhlenbeck_process.cpp index 3a0950472e958551ff93498a1e98c043854fe73d..5dd95ebcdedb94c15f59995ba9debd91e85d0fc7 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);