diff --git a/cmake/SetupRajaConfig.cmake b/cmake/SetupRajaConfig.cmake index ea1cc049a3..a954eb8db1 100644 --- a/cmake/SetupRajaConfig.cmake +++ b/cmake/SetupRajaConfig.cmake @@ -24,8 +24,6 @@ endif() #set(RAJA_USE_PTR_CLASS OFF) ## Fault tolerance options -option(RAJA_ENABLE_FT "Enable fault-tolerance features" OFF) -option(RAJA_REPORT_FT "Report on use of fault-tolerant features" OFF) option(RAJA_ENABLE_ITERATOR_OVERFLOW_DEBUG "Enable Overflow checking during Iterator operations" OFF) ## Timer options diff --git a/docs/sphinx/user_guide/config_options.rst b/docs/sphinx/user_guide/config_options.rst index ab65709010..b2aff75744 100644 --- a/docs/sphinx/user_guide/config_options.rst +++ b/docs/sphinx/user_guide/config_options.rst @@ -335,25 +335,6 @@ in units of **bytes**. For details on the options in this section are used, please see the header file ``RAJA/include/RAJA/util/types.hpp``. -Other RAJA Features -------------------- - -RAJA contains some features that are used mainly for development or may -not be of general interest to RAJA users. These are turned off be default. -They are described here for reference and completeness. - - =========================== ======================================= - Variable Meaning - =========================== ======================================= - RAJA_ENABLE_FT Enable/disable RAJA experimental - loop-level fault-tolerance mechanism - RAJA_REPORT_FT Enable/disable a report of fault- - tolerance enabled run (e.g., number of - faults detected, recovered from, - recovery overhead, etc.) - =========================== ======================================= - - .. _configopt-raja-backends-label: =============================== diff --git a/include/RAJA/config.hpp.in b/include/RAJA/config.hpp.in index 36e4836378..8a1db016cd 100644 --- a/include/RAJA/config.hpp.in +++ b/include/RAJA/config.hpp.in @@ -114,7 +114,6 @@ static_assert(RAJA_HAS_SOME_CXX14, * ****************************************************************************** */ -#cmakedefine RAJA_ENABLE_FT #cmakedefine RAJA_ENABLE_ITERATOR_OVERFLOW_DEBUG /*! ****************************************************************************** @@ -172,7 +171,7 @@ static_assert(RAJA_HAS_SOME_CXX14, * indicate if the back-end is present when the application/library * using RAJA is compiled. An application/library can use a subset of * back-ends that are present in a RAJA install. - * + * ****************************************************************************** */ @@ -271,8 +270,8 @@ namespace RAJA { #if defined(RAJA_ENABLE_OPENMP) && !defined(__HIP_DEVICE_COMPILE__) #if defined(_OPENMP) -// RAJA build can be configured but downstream packages may not; guard OpenMP -#define RAJA_OPENMP_ACTIVE +// RAJA build can be configured but downstream packages may not; guard OpenMP +#define RAJA_OPENMP_ACTIVE #if (_OPENMP >= 200805) #if defined(RAJA_ENABLE_OPENMP_TASK) #define RAJA_ENABLE_OPENMP_TASK_INTERNAL diff --git a/include/RAJA/internal/fault_tolerance.hpp b/include/RAJA/internal/fault_tolerance.hpp deleted file mode 100644 index 6efac017c1..0000000000 --- a/include/RAJA/internal/fault_tolerance.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/*! - ****************************************************************************** - * - * \file - * - * \brief Header file containing RAJA Fault Tolerance macros. - * RAJA Fault Tolerance only works when all the lambda - * functions passed to RAJA are in idempotent form, - * meaning there are no persistent variables in the - * lambda that have read-write semantics. In other words, - * persistent lambda function variables must be consistently - * used as read-only or write-only within the lambda scope. - * - * These macros are designed to cooperate with an external - * signal handler that sets a global variable, fault_type, - * when a fault occurs. fault_type must be initialized to zero. - * - ****************************************************************************** - */ - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// -// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC -// and RAJA project contributors. See the RAJA/LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// - -#ifndef RAJA_fault_tolerance_HPP -#define RAJA_fault_tolerance_HPP - -#include "RAJA/config.hpp" - -#if defined(RAJA_ENABLE_FT) - -#if defined(RAJA_REPORT_FT) - -#include -#include "cycle.h" - -#define RAJA_FT_BEGIN \ - extern volatile int fault_type; \ - bool repeat; \ - bool do_time = false; \ - ticks start = 0, stop = 0; \ - if (fault_type != 0) \ - { \ - printf("Uncaught fault %d\n", fault_type); \ - fault_type = 0; \ - } \ - do \ - { \ - repeat = false; \ - if (do_time) \ - { \ - start = getticks(); \ - } - -#define RAJA_FT_END \ - if (do_time) \ - { \ - stop = getticks(); \ - printf("recoverable fault clock cycles = %16f\n", elapsed(stop, start)); \ - do_time = false; \ - fault_type = 0; \ - } \ - if (fault_type < 0) \ - { \ - printf("Unrecoverable fault (restart penalty)\n"); \ - fault_type = 0; \ - } \ - if (fault_type > 0) \ - { \ - /* invalidate cache */ \ - repeat = true; \ - do_time = true; \ - } \ - } \ - while (repeat == true) \ - ; - -#else -#define RAJA_FT_BEGIN \ - extern volatile int fault_type; \ - bool repeat; \ - if (fault_type == 0) \ - { \ - do \ - { \ - repeat = false; - -#define RAJA_FT_END \ - if (fault_type > 0) \ - { \ - /* invalidate cache */ \ - repeat = true; \ - fault_type = 0; \ - } \ - } \ - while (repeat == true) \ - ; \ - } \ - else \ - { \ - fault_type = 0; /* ignore for the simulation */ \ - } - -#endif // RAJA_REPORT_FT - -#else - -#define RAJA_FT_BEGIN - -#define RAJA_FT_END - -#endif // RAJA_ENABLE_FT - -#endif // closing endif for header file include guard diff --git a/include/RAJA/pattern/forall.hpp b/include/RAJA/pattern/forall.hpp index 14ec5fc60a..c2a35c2515 100644 --- a/include/RAJA/pattern/forall.hpp +++ b/include/RAJA/pattern/forall.hpp @@ -67,8 +67,6 @@ #include "RAJA/index/ListSegment.hpp" #include "RAJA/index/RangeSegment.hpp" -#include "RAJA/internal/fault_tolerance.hpp" - #include "RAJA/util/concepts.hpp" #include "RAJA/util/Span.hpp" #include "RAJA/util/types.hpp" diff --git a/include/RAJA/policy/cuda/WorkGroup/WorkRunner.hpp b/include/RAJA/policy/cuda/WorkGroup/WorkRunner.hpp index eabe606633..06ec187f8a 100644 --- a/include/RAJA/policy/cuda/WorkGroup/WorkRunner.hpp +++ b/include/RAJA/policy/cuda/WorkGroup/WorkRunner.hpp @@ -377,7 +377,6 @@ struct WorkRunner< block_size), static_cast(num_loops), 1}; - RAJA_FT_BEGIN; // // Setup shared memory buffers @@ -392,8 +391,6 @@ struct WorkRunner< RAJA::cuda::launch((const void*)func, gridSize, blockSize, func_args, shmem, r, Async); } - - RAJA_FT_END; } return run_storage; diff --git a/include/RAJA/policy/cuda/forall.hpp b/include/RAJA/policy/cuda/forall.hpp index 2af88ca941..7e1df20066 100644 --- a/include/RAJA/policy/cuda/forall.hpp +++ b/include/RAJA/policy/cuda/forall.hpp @@ -35,8 +35,6 @@ #include "RAJA/util/macros.hpp" #include "RAJA/util/types.hpp" -#include "RAJA/internal/fault_tolerance.hpp" - #include "RAJA/policy/cuda/MemUtils_CUDA.hpp" #include "RAJA/policy/cuda/policy.hpp" #include "RAJA/policy/cuda/raja_cudaerrchk.hpp" @@ -570,7 +568,6 @@ forall_impl(resources::Cuda cuda_res, internal::CudaDims dims(1); DimensionCalculator::set_dimensions(dims, len, func, shmem); - RAJA_FT_BEGIN; RAJA::cuda::detail::cudaInfo launch_info; launch_info.gridDim = dims.blocks; @@ -598,8 +595,6 @@ forall_impl(resources::Cuda cuda_res, RAJA::expt::ParamMultiplexer::parampack_resolve(pol, f_params, launch_info); } - - RAJA_FT_END; } return resources::EventProxy(cuda_res); diff --git a/include/RAJA/policy/cuda/launch.hpp b/include/RAJA/policy/cuda/launch.hpp index d9cca09216..2ed34eb418 100644 --- a/include/RAJA/policy/cuda/launch.hpp +++ b/include/RAJA/policy/cuda/launch.hpp @@ -96,7 +96,6 @@ struct LaunchExecute< blockSize.x > zero && blockSize.y > zero && blockSize.z > zero) { - RAJA_FT_BEGIN; size_t shared_mem_size = launch_params.shared_mem_size; RAJA::cuda::detail::cudaInfo launch_info; @@ -126,8 +125,6 @@ struct LaunchExecute< RAJA::expt::ParamMultiplexer::parampack_resolve(pol, launch_reducers, launch_info); } - - RAJA_FT_END; } return resources::EventProxy(res); @@ -207,7 +204,6 @@ struct LaunchExecute< blockSize.x > zero && blockSize.y > zero && blockSize.z > zero) { - RAJA_FT_BEGIN; size_t shared_mem_size = launch_params.shared_mem_size; RAJA::cuda::detail::cudaInfo launch_info; @@ -237,8 +233,6 @@ struct LaunchExecute< RAJA::expt::ParamMultiplexer::parampack_resolve(pol, launch_reducers, launch_info); } - - RAJA_FT_END; } return resources::EventProxy(res); diff --git a/include/RAJA/policy/hip/WorkGroup/WorkRunner.hpp b/include/RAJA/policy/hip/WorkGroup/WorkRunner.hpp index 1e8b9e0146..f6e3b77aac 100644 --- a/include/RAJA/policy/hip/WorkGroup/WorkRunner.hpp +++ b/include/RAJA/policy/hip/WorkGroup/WorkRunner.hpp @@ -364,7 +364,6 @@ struct WorkRunner< block_size), static_cast(num_loops), 1}; - RAJA_FT_BEGIN; // // Setup shared memory buffers @@ -379,8 +378,6 @@ struct WorkRunner< RAJA::hip::launch((const void*)func, gridSize, blockSize, func_args, shmem, r, Async); } - - RAJA_FT_END; } return run_storage; diff --git a/include/RAJA/policy/hip/forall.hpp b/include/RAJA/policy/hip/forall.hpp index 6f098a9a11..b26010ac83 100644 --- a/include/RAJA/policy/hip/forall.hpp +++ b/include/RAJA/policy/hip/forall.hpp @@ -36,8 +36,6 @@ #include "RAJA/util/macros.hpp" #include "RAJA/util/types.hpp" -#include "RAJA/internal/fault_tolerance.hpp" - #include "RAJA/policy/hip/MemUtils_HIP.hpp" #include "RAJA/policy/hip/policy.hpp" #include "RAJA/policy/hip/raja_hiperrchk.hpp" @@ -552,7 +550,6 @@ forall_impl(resources::Hip hip_res, internal::HipDims dims(1); DimensionCalculator::set_dimensions(dims, len, func, shmem); - RAJA_FT_BEGIN; RAJA::hip::detail::hipInfo launch_info; launch_info.gridDim = dims.blocks; @@ -580,8 +577,6 @@ forall_impl(resources::Hip hip_res, RAJA::expt::ParamMultiplexer::parampack_resolve(pol, f_params, launch_info); } - - RAJA_FT_END; } return resources::EventProxy(hip_res); diff --git a/include/RAJA/policy/hip/launch.hpp b/include/RAJA/policy/hip/launch.hpp index f3ae8f87c1..ce34c62b20 100644 --- a/include/RAJA/policy/hip/launch.hpp +++ b/include/RAJA/policy/hip/launch.hpp @@ -93,7 +93,6 @@ struct LaunchExecute< blockSize.x > zero && blockSize.y > zero && blockSize.z > zero) { - RAJA_FT_BEGIN; size_t shared_mem_size = launch_params.shared_mem_size; RAJA::hip::detail::hipInfo launch_info; @@ -124,8 +123,6 @@ struct LaunchExecute< RAJA::expt::ParamMultiplexer::parampack_resolve(pol, launch_reducers, launch_info); } - - RAJA_FT_END; } return resources::EventProxy(res); @@ -200,7 +197,6 @@ struct LaunchExecute> blockSize.x > zero && blockSize.y > zero && blockSize.z > zero) { - RAJA_FT_BEGIN; size_t shared_mem_size = launch_params.shared_mem_size; RAJA::hip::detail::hipInfo launch_info; @@ -231,8 +227,6 @@ struct LaunchExecute> RAJA::expt::ParamMultiplexer::parampack_resolve(pol, launch_reducers, launch_info); } - - RAJA_FT_END; } return resources::EventProxy(res); diff --git a/include/RAJA/policy/openmp/forall.hpp b/include/RAJA/policy/openmp/forall.hpp index 27b3b9760e..1d7f508a70 100644 --- a/include/RAJA/policy/openmp/forall.hpp +++ b/include/RAJA/policy/openmp/forall.hpp @@ -31,8 +31,6 @@ #include #include "RAJA/util/types.hpp" - -#include "RAJA/internal/fault_tolerance.hpp" #include "RAJA/pattern/kernel/TypeTraits.hpp" #include "RAJA/index/IndexSet.hpp" diff --git a/include/RAJA/policy/sequential/forall.hpp b/include/RAJA/policy/sequential/forall.hpp index 1fd9b08d1d..c2797e80fa 100644 --- a/include/RAJA/policy/sequential/forall.hpp +++ b/include/RAJA/policy/sequential/forall.hpp @@ -29,8 +29,6 @@ #include "RAJA/policy/sequential/policy.hpp" -#include "RAJA/internal/fault_tolerance.hpp" - #include "RAJA/pattern/detail/forall.hpp" #include "RAJA/util/resource.hpp" diff --git a/include/RAJA/policy/simd/forall.hpp b/include/RAJA/policy/simd/forall.hpp index 3f44749823..d5c4076d75 100644 --- a/include/RAJA/policy/simd/forall.hpp +++ b/include/RAJA/policy/simd/forall.hpp @@ -33,8 +33,6 @@ #include "RAJA/util/types.hpp" -#include "RAJA/internal/fault_tolerance.hpp" - #include "RAJA/policy/simd/policy.hpp" #include "RAJA/pattern/params/forall.hpp" diff --git a/include/RAJA/policy/sycl/forall.hpp b/include/RAJA/policy/sycl/forall.hpp index 061c1b47f5..ed16525140 100644 --- a/include/RAJA/policy/sycl/forall.hpp +++ b/include/RAJA/policy/sycl/forall.hpp @@ -38,8 +38,6 @@ #include "RAJA/util/macros.hpp" #include "RAJA/util/types.hpp" -#include "RAJA/internal/fault_tolerance.hpp" - #include "RAJA/policy/sycl/MemUtils_SYCL.hpp" #include "RAJA/policy/sycl/policy.hpp" diff --git a/include/RAJA/policy/sycl/launch.hpp b/include/RAJA/policy/sycl/launch.hpp index 6ad06ded2c..06cf1bfcd0 100644 --- a/include/RAJA/policy/sycl/launch.hpp +++ b/include/RAJA/policy/sycl/launch.hpp @@ -84,8 +84,6 @@ struct LaunchExecute> } - RAJA_FT_BEGIN; - using LOOP_BODY = camp::decay; LOOP_BODY* lbody = nullptr; // @@ -176,8 +174,6 @@ struct LaunchExecute> q->wait(); } } - RAJA_FT_END; - return resources::EventProxy(res); }