Skip to content

Commit

Permalink
Tpetra: Error handling for packCrsMatrix race condition fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Siefert committed Sep 25, 2024
1 parent c556693 commit 777c71e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/tpetra/core/src/Tpetra_Details_packCrsMatrix_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,12 @@ class NumPacketsAndOffsetsFunctor {

//! Host function for getting the error.
int getError () const {
typedef typename device_type::execution_space execution_space;
auto error_h = Kokkos::create_mirror_view (error_);
// DEEP_COPY REVIEW - DEVICE-TO-HOSTMIRROR
Kokkos::deep_copy (execution_space(), error_h, error_);
// Note: In the UVM case, this would otherwise be a no-op
// and thus not fence, so the value might not be correct on return
// In the non-UVM case, create_mirror_view will block for the allocation
Kokkos::deep_copy (error_h, error_);
return error_h ();
}

Expand Down

0 comments on commit 777c71e

Please sign in to comment.