Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Src/Particle/AMReX_ParticleReduce.H
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ ReduceSum (PC const& pc, int lev_min, int lev_max, F const& f)
grid_tile_ids.push_back(kv.first);
ptile_ptrs.push_back(&(kv.second));
}

// We avoid ParIter here to allow reductions after grids change but prior to calling Redistribute()
#ifdef AMREX_USE_OMP
#pragma omp parallel for if (!system::regtest_reduction) reduction(+:sm)
#endif
Expand Down Expand Up @@ -418,6 +420,8 @@ ReduceMax (PC const& pc, int lev_min, int lev_max, F const& f)
grid_tile_ids.push_back(kv.first);
ptile_ptrs.push_back(&(kv.second));
}

// We avoid ParIter here to allow reductions after grids change but prior to calling Redistribute()
#ifdef AMREX_USE_OMP
#pragma omp parallel for if (!system::regtest_reduction) reduction(max:r)
#endif
Expand Down Expand Up @@ -619,6 +623,8 @@ ReduceMin (PC const& pc, int lev_min, int lev_max, F const& f)
grid_tile_ids.push_back(kv.first);
ptile_ptrs.push_back(&(kv.second));
}

// We avoid ParIter here to allow reductions after grids change but prior to calling Redistribute()
#ifdef AMREX_USE_OMP
#pragma omp parallel for if (!system::regtest_reduction) reduction(min:r)
#endif
Expand Down Expand Up @@ -815,6 +821,8 @@ ReduceLogicalAnd (PC const& pc, int lev_min, int lev_max, F const& f)
grid_tile_ids.push_back(kv.first);
ptile_ptrs.push_back(&(kv.second));
}

// We avoid ParIter here to allow reductions after grids change but prior to calling Redistribute()
#ifdef AMREX_USE_OMP
#pragma omp parallel for if (!system::regtest_reduction) reduction(&&:r)
#endif
Expand Down Expand Up @@ -1012,6 +1020,8 @@ ReduceLogicalOr (PC const& pc, int lev_min, int lev_max, F const& f)
grid_tile_ids.push_back(kv.first);
ptile_ptrs.push_back(&(kv.second));
}

// We avoid ParIter here to allow reductions after grids change but prior to calling Redistribute()
#ifdef AMREX_USE_OMP
#pragma omp parallel for if (!system::regtest_reduction) reduction(||:r)
#endif
Expand Down Expand Up @@ -1247,6 +1257,8 @@ ParticleReduce (PC const& pc, int lev_min, int lev_max, F const& f, ReduceOps& r
grid_tile_ids.push_back(kv.first);
ptile_ptrs.push_back(&(kv.second));
}

// We avoid ParIter here to allow reductions after grids change but prior to calling Redistribute()
#if !defined(AMREX_USE_GPU) && defined(AMREX_USE_OMP)
#pragma omp parallel for
#endif
Expand Down
Loading