From bc5251fd5dcc30bf69857ea27246b18f4a37545e Mon Sep 17 00:00:00 2001 From: eagiem Date: Thu, 17 Oct 2024 13:11:04 -0700 Subject: [PATCH] Fixed cmake macro bug --- src/resilience/openMP/OpenMPResParallel.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/resilience/openMP/OpenMPResParallel.hpp b/src/resilience/openMP/OpenMPResParallel.hpp index bcec4d1..4a2fff2 100644 --- a/src/resilience/openMP/OpenMPResParallel.hpp +++ b/src/resilience/openMP/OpenMPResParallel.hpp @@ -117,8 +117,7 @@ class ParallelFor< FunctorType using LaunchBounds = typename Policy::launch_bounds; using Member = typename Policy::member_type; - //const FunctorType & m_functor; - const FunctorType m_functor; + const FunctorType & m_functor; const Policy m_policy; ParallelFor() = delete ; @@ -126,6 +125,7 @@ class ParallelFor< FunctorType using surrogate_policy = Kokkos::RangePolicy < Kokkos::OpenMP, WorkTag, LaunchBounds>; +#ifdef KR_ENABLE_WRAPPER auto MakeWrapper (int64_t work_size, int64_t offset, const FunctorType &m_functor_0, const FunctorType &m_functor_1) const{ if constexpr (std::is_void_v){ std::cout << "In MakeWrapper void WorkTag branch." << std::endl; @@ -164,6 +164,7 @@ class ParallelFor< FunctorType return wrapper_functor; } } +#endif public: inline void execute() const { @@ -239,7 +240,7 @@ class ParallelFor< FunctorType const auto start{std::chrono::steady_clock::now()}; - KokkosResilience::inject_error_duplicates(); + //KokkosResilience::inject_error_duplicates(); const auto stop{std::chrono::steady_clock::now()}; KokkosResilience::ETimer::elapsed_seconds = KokkosResilience::ETimer::elapsed_seconds + (std::chrono::duration_cast(stop - start)); KokkosResilience::ETimer::total_error_time = KokkosResilience::ETimer::total_error_time + KokkosResilience::ETimer::elapsed_seconds;