Skip to content

Commit

Permalink
Add Comm Sync to Redistribute (AMReX-Codes#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
kngott authored Jul 28, 2022
1 parent 51542c8 commit 6a47d89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Base/AMReX_FabArrayCommI.H
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FabArray<FAB>::FBEP_nowait (int scomp, int ncomp, const IntVect& nghost,
bool enforce_periodicity_only,
bool override_sync)
{
BL_PROFILE_SYNC_START_TIMED("SyncBeforeComms");
BL_PROFILE_SYNC_START_TIMED("SyncBeforeComms: FB");
BL_PROFILE("FillBoundary_nowait()");

AMREX_ASSERT_WITH_MESSAGE(!fbd, "FillBoundary_nowait() called when comm operation already in progress.");
Expand Down Expand Up @@ -316,7 +316,7 @@ FabArray<FAB>::ParallelCopy_nowait (const FabArray<FAB>& src,
const FabArrayBase::CPC * a_cpc,
bool to_ghost_cells_only)
{
BL_PROFILE_SYNC_START_TIMED("SyncBeforeComms");
BL_PROFILE_SYNC_START_TIMED("SyncBeforeComms: PC");
BL_PROFILE("FabArray::ParallelCopy_nowait()");

AMREX_ASSERT_WITH_MESSAGE(!pcd, "ParallelCopy_nowait() called when comm operation already in progress.");
Expand Down
4 changes: 4 additions & 0 deletions Src/Particle/AMReX_ParticleContainerI.H
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,8 @@ void
ParticleContainer<NStructReal, NStructInt, NArrayReal, NArrayInt, Allocator>
::Redistribute (int lev_min, int lev_max, int nGrow, int local, bool remove_negative)
{
BL_PROFILE_SYNC_START_TIMED("SyncBeforeComms: Redist");

#ifdef AMREX_USE_GPU
if ( Gpu::inLaunchRegion() )
{
Expand All @@ -1085,6 +1087,8 @@ ParticleContainer<NStructReal, NStructInt, NArrayReal, NArrayInt, Allocator>
#else
RedistributeCPU(lev_min, lev_max, nGrow, local, remove_negative);
#endif

BL_PROFILE_SYNC_STOP();
}

template <int NStructReal, int NStructInt, int NArrayReal, int NArrayInt,
Expand Down

0 comments on commit 6a47d89

Please sign in to comment.