Skip to content

Commit

Permalink
fix gpu fillboundary
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Mar 2, 2019
1 parent 3593511 commit 6e1acca
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Src/Base/AMReX_FabArrayCommI.H
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ FabArray<FAB>::FBEP_nowait (int scomp, int ncomp, const IntVect& nghost,

if (Gpu::inLaunchRegion())
{
LayoutData<Array<Vector<FabCopyTag<FAB> >,AMREX_SPACEDIM> >
dtags(loc_copy_tags.boxArray(), loc_copy_tags.DistributionMap());
for (MFIter mfi(*this); mfi.isValid(); ++mfi)
{
FAB* dfab = this->fabPtr(mfi);
Expand All @@ -318,7 +316,7 @@ FabArray<FAB>::FBEP_nowait (int scomp, int ncomp, const IntVect& nghost,
gbx_lo.grow(jdim,nghost[jdim]);
}
const int ncells_to_hi = vbx.length(idim)+nghost[idim];
const Box gbx_hi = gbx_lo + IntVect{ncells_to_hi};
const Box gbx_hi = amrex::shift(gbx_lo, idim, ncells_to_hi);

Vector<FabCopyTag<FAB> > tags_lo, tags_hi;
for (const auto& lc_tag : lc_tags) {
Expand Down Expand Up @@ -1503,8 +1501,6 @@ FillBoundary (Vector<FabArray<FAB>*> const& mf, const Periodicity& period)

if (Gpu::inLaunchRegion())
{
LayoutData<Array<Vector<FabCopyTag<FAB> >,AMREX_SPACEDIM> >
dtags(loc_copy_tags.boxArray(), loc_copy_tags.DistributionMap());
for (MFIter mfi(fa); mfi.isValid(); ++mfi)
{
FAB* dfab = fa.fabPtr(mfi);
Expand All @@ -1520,7 +1516,7 @@ FillBoundary (Vector<FabArray<FAB>*> const& mf, const Periodicity& period)
gbx_lo.grow(jdim,ng[jdim]);
}
const int ncells_to_hi = vbx.length(idim)+ng[idim];
const Box gbx_hi = gbx_lo + IntVect{ncells_to_hi};
const Box gbx_hi = amrex::shift(gbx_lo, idim, ncells_to_hi);

Vector<FabCopyTag<FAB> > vtags_lo, vtags_hi;
for (const auto& lc_tag : lc_tags) {
Expand Down

0 comments on commit 6e1acca

Please sign in to comment.