Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning up code related to throttling scheduler #1766

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Expand Up @@ -412,7 +412,8 @@ foreach(_scheduler ${HPX_WITH_THREAD_SCHEDULERS_UC})
hpx_add_config_define(HPX_HAVE_STATIC_SCHEDULER)
set(HPX_HAVE_STATIC_SCHEDULER ON CACHE INTERNAL "")
endif()
if(HPX_WITH_APEX)
# The throttle scheduler is not supported neither on Windows nor on Mac
if(HPX_WITH_APEX AND NOT WIN32 AND NOT APPLE)
if(_scheduler STREQUAL "THROTTLE" OR _all)
hpx_add_config_define(HPX_HAVE_THROTTLE_SCHEDULER)
set(HPX_HAVE_THROTTLE_SCHEDULER ON CACHE INTERNAL "")
Expand Down
2 changes: 2 additions & 0 deletions docs/manual/build_system/cmake_variables.qbk
Expand Up @@ -109,6 +109,7 @@ The options are split into these categories:

[#build_system.cmake_variables.Thread_Manager][h3 Thread Manager Options]
* [link build_system.cmake_variables.HPX_WITH_MAX_CPU_COUNT HPX_WITH_MAX_CPU_COUNT]
* [link build_system.cmake_variables.HPX_WITH_MORE_THAN_64_THREADS HPX_WITH_MORE_THAN_64_THREADS]
* [link build_system.cmake_variables.HPX_WITH_SCHEDULER_LOCAL_STORAGE HPX_WITH_SCHEDULER_LOCAL_STORAGE]
* [link build_system.cmake_variables.HPX_WITH_STACKTRACES HPX_WITH_STACKTRACES]
* [link build_system.cmake_variables.HPX_WITH_SWAP_CONTEXT_EMULATION HPX_WITH_SWAP_CONTEXT_EMULATION]
Expand All @@ -128,6 +129,7 @@ The options are split into these categories:

[variablelist
[[[#build_system.cmake_variables.HPX_WITH_MAX_CPU_COUNT] `HPX_WITH_MAX_CPU_COUNT:STRING`][HPX applications will not use more that this number of OS-Threads (default: 64)]]
[[[#build_system.cmake_variables.HPX_WITH_MORE_THAN_64_THREADS] `HPX_WITH_MORE_THAN_64_THREADS:STRING`][HPX applications will be able to run on more than 64 cores]]
[[[#build_system.cmake_variables.HPX_WITH_SCHEDULER_LOCAL_STORAGE] `HPX_WITH_SCHEDULER_LOCAL_STORAGE:BOOL`][Enable scheduler local storage for all HPX schedulers (default: OFF)]]
[[[#build_system.cmake_variables.HPX_WITH_STACKTRACES] `HPX_WITH_STACKTRACES:BOOL`][Attach backtraces to HPX exceptions (default: ON)]]
[[[#build_system.cmake_variables.HPX_WITH_SWAP_CONTEXT_EMULATION] `HPX_WITH_SWAP_CONTEXT_EMULATION:BOOL`][Emulate SwapContext API for coroutines (default: OFF)]]
Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/executors/thread_pool_executors.hpp
Expand Up @@ -40,7 +40,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v3)
typedef threads::executors::static_queue_executor static_queue_executor;
#endif

#if defined(HPX_HAVE_THROTTLE_SCHEDULER)
#if defined(HPX_HAVE_THROTTLE_SCHEDULER) && defined(HPX_HAVE_APEX)
/// Creates a new throttle_queue_executor
///
/// \param max_punits [in] The maximum number of processing units to
Expand Down
2 changes: 1 addition & 1 deletion hpx/runtime/threads/executors/thread_pool_executors.hpp
Expand Up @@ -155,7 +155,7 @@ namespace hpx { namespace threads { namespace executors
};
#endif

#if defined(HPX_HAVE_THROTTLE_SCHEDULER)
#if defined(HPX_HAVE_THROTTLE_SCHEDULER) && defined(HPX_HAVE_APEX)
struct HPX_EXPORT throttle_queue_executor : public scheduled_executor
{
throttle_queue_executor();
Expand Down
2 changes: 1 addition & 1 deletion hpx/runtime/threads/policies/schedulers.hpp
Expand Up @@ -8,7 +8,7 @@

#include <hpx/config.hpp>

#if defined(HPX_HAVE_THROTTLE_SCHEDULER)
#if defined(HPX_HAVE_THROTTLE_SCHEDULER) && defined(HPX_HAVE_APEX)
#include <hpx/runtime/threads/policies/throttle_queue_scheduler.hpp>
#endif
#if defined(HPX_HAVE_LOCAL_SCHEDULER)
Expand Down