From 8d28cf630ebb620a2e68cc4bec117870623263dd Mon Sep 17 00:00:00 2001 From: Vivek Kale <11766050+vlkale@users.noreply.github.com> Date: Thu, 2 May 2024 11:01:38 -0700 Subject: [PATCH] kp_sampler_skip.cpp: invoke kokkos tools fence --- common/kokkos-sampler/kp_sampler_skip.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/common/kokkos-sampler/kp_sampler_skip.cpp b/common/kokkos-sampler/kp_sampler_skip.cpp index ce0cb4a9d..e456195c9 100644 --- a/common/kokkos-sampler/kp_sampler_skip.cpp +++ b/common/kokkos-sampler/kp_sampler_skip.cpp @@ -53,20 +53,17 @@ uint32_t getDeviceID(uint32_t devid_in) { void invoke_ktools_fence(uint32_t devID) { if (tpi_funcs.fence != nullptr) { + tpi_funcs.fence(devID); if (tool_verbosity > 1) { - std::cout << "KokkosP: Sampler attempting to invoke tool-induced fence " - "on device " - << getDeviceID(devID) << '\n'; - } - (tpi_funcs.fence)(devID); - if (tool_verbosity > 1) { - std::cout << "KokkosP: Sampler sucessfully invoked tool-induced fence on " - "device " - << getDeviceID(devID) << '\n'; + std::cout << "KokkosP: Sampler utility sucessfully invoked tool-induced " + "fence on device " + << getDeviceID(devID) << ".\n"; } } else { std::cout << "KokkosP: FATAL: Kokkos Tools Programming Interface's " "tool-invoked Fence is NULL!\n"; + std::abort(); + exit(-1); } }