Skip to content

Commit

Permalink
Fix ThreadSanitizer data races
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 22, 2024
1 parent 62c2a81 commit 01583c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/Base/AMReX_Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ InitRandom (ULong cpu_seed, int nprocs, ULong gpu_seed)
{
int tid = OpenMP::get_thread_num();
ULong init_seed = cpu_seed + tid*nprocs;
generators[tid].seed(init_seed);
//generators[tid].seed(init_seed);
generators.at(tid).seed(init_seed);
}

#ifdef AMREX_USE_GPU
Expand Down

0 comments on commit 01583c0

Please sign in to comment.