Skip to content

Commit

Permalink
Attempt omp parallel for
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 3, 2025
1 parent 9d2b1af commit ed071f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Base/AMReX_Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ InitRandom (ULong cpu_seed, int nprocs, ULong gpu_seed)
#endif

#ifdef AMREX_USE_OMP
#pragma omp parallel firstprivate(cpu_seed, nprocs)
#pragma omp parallel for
#endif
for (int tid = 0; tid < nthreads; tid++) {
{
int tid = OpenMP::get_thread_num();
ULong init_seed = cpu_seed + tid*nprocs;
generators[tid].seed(init_seed);
}
Expand Down

0 comments on commit ed071f4

Please sign in to comment.