Skip to content

Commit

Permalink
Try fence
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Dec 17, 2020
1 parent 93fc655 commit c46b5cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion core/src/Cabana_Halo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ void sendBuffer( const Halo_t& halo, AoSoA_t& aosoa, View_t& send_buffer )
auto steering = halo.getExportSteering();

// Gather from the local data into a tuple-contiguous send buffer.
// Pass send buffer to user modification functor class to add shifts.
auto gather_send_buffer_func = KOKKOS_LAMBDA( const std::size_t i )
{
send_buffer( i ) = aosoa.getTuple( steering( i ) );
Expand Down
3 changes: 2 additions & 1 deletion core/src/Cabana_ParticleGridCommunication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void getHaloIds( const LocalGridType& local_grid, CountView& send_count,
for ( int j = -1; j < 2; ++j )
for ( int i = -1; i < 2; ++i, ++nr )
{
auto neighbor_rank = topology.at( nr );
const int neighbor_rank = topology.at( nr );
if ( neighbor_rank == unique_topology.at( ar ) )
{
auto sis = local_grid.sharedIndexSpace(
Expand Down Expand Up @@ -556,6 +556,7 @@ void getHaloIds( const LocalGridType& local_grid, CountView& send_count,
};
Kokkos::parallel_for( "get_halo_ids", policy,
halo_ids_func );
Kokkos::fence();
}
}
}
Expand Down

0 comments on commit c46b5cb

Please sign in to comment.