Skip to content

Commit

Permalink
Merge Pull Request #13380 from cwpearson/Trilinos/fix/13373
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'Tpetra: missing fence in lowCommunicationMakeColMapAndReindex'
PR Author: cwpearson
  • Loading branch information
trilinos-autotester authored Aug 22, 2024
2 parents 94b60d0 + 2a11dc2 commit 95631af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tpetra/core/src/Tpetra_Import_Util2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1125,12 +1125,13 @@ lowCommunicationMakeColMapAndReindex (
bin_sort2.sort(exec, ColIndices_subview);

// Deep copy back from device to host
Kokkos::deep_copy(execution_space(), PIDList_host, PIDList_view);
Kokkos::deep_copy(exec, PIDList_host, PIDList_view);

// Stash the RemotePIDs. Once remotePIDs is changed to become a Kokkos view, we can remove this and copy directly.
// Note: If Teuchos::Array had a shrink_to_fit like std::vector,
// we'd call it here.

exec.fence("fence before setting PIDList");
Teuchos::Array<int> PIDList(NumRemoteColGIDs);
for(LO i = 0; i < NumRemoteColGIDs; ++i) {
PIDList[i] = PIDList_host[i];
Expand Down

0 comments on commit 95631af

Please sign in to comment.