From 2a11dc21d4b1ae8dd105b1f311c6312555e74909 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Wed, 21 Aug 2024 10:29:50 -0600 Subject: [PATCH] Tpetra: missing fence in lowCommunicationMakeColMapAndReindex --- packages/tpetra/core/src/Tpetra_Import_Util2.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tpetra/core/src/Tpetra_Import_Util2.hpp b/packages/tpetra/core/src/Tpetra_Import_Util2.hpp index 85df6e0a2eab..bf97cb5d1527 100644 --- a/packages/tpetra/core/src/Tpetra_Import_Util2.hpp +++ b/packages/tpetra/core/src/Tpetra_Import_Util2.hpp @@ -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 PIDList(NumRemoteColGIDs); for(LO i = 0; i < NumRemoteColGIDs; ++i) { PIDList[i] = PIDList_host[i];