Skip to content

Commit

Permalink
Silence Thread Sanitizer in InitRandom
Browse files Browse the repository at this point in the history
Either making the shared variables constant (not sensible in
the function signature) or using `firstprivate` should silence
the warnings we see.
  • Loading branch information
ax3l committed Jan 2, 2025
1 parent d9c5760 commit 9d2b1af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Base/AMReX_Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ InitRandom (ULong cpu_seed, int nprocs, ULong gpu_seed)
#endif

#ifdef AMREX_USE_OMP
#pragma omp parallel
#pragma omp parallel firstprivate(cpu_seed, nprocs)
#endif
{
int tid = OpenMP::get_thread_num();
Expand Down

0 comments on commit 9d2b1af

Please sign in to comment.