Skip to content

Commit

Permalink
Merge Pull Request trilinos#11565 from ndellingwood/Trilinos/tpetra-a…
Browse files Browse the repository at this point in the history
…dd-missing-fences

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: tpetra: add missing fences for async deep_copy use
PR Author: ndellingwood
  • Loading branch information
trilinos-autotester authored Feb 21, 2023
2 parents 985f08c + 8cf1ed6 commit 6cfe139
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/tpetra/core/src/Tpetra_Details_DistributorActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ void DistributorActor::doPosts(const DistributorPlan& plan,
packOffset(sendArray, exports, sendArrayOffset, plan.getIndicesTo()[j]*numPackets, numPackets);
sendArrayOffset += numPackets;
}
typename ExpView::execution_space().fence();

ImpView tmpSend =
subview_offset(sendArray, size_t(0), plan.getLengthsTo()[p]*numPackets);

Expand Down Expand Up @@ -847,6 +849,8 @@ void DistributorActor::doPosts(const DistributorPlan& plan,
indicesOffsets[j], numExportPacketsPerLID[j]);
sendArrayOffset += numExportPacketsPerLID[j];
}
typename ExpView::execution_space().fence();

if (numPacketsTo_p > 0) {
ImpView tmpSend =
subview_offset(sendArray, size_t(0), numPacketsTo_p);
Expand Down

0 comments on commit 6cfe139

Please sign in to comment.