Skip to content

Commit

Permalink
Don't use local headers or runtime in HPX backend due to deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Aug 29, 2023
1 parent d122c39 commit d813035
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 24 deletions.
22 changes: 11 additions & 11 deletions core/src/HPX/Kokkos_HPX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

#include <impl/Kokkos_ExecSpaceManager.hpp>

#include <hpx/local/condition_variable.hpp>
#include <hpx/local/init.hpp>
#include <hpx/local/runtime.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/local/mutex.hpp>
#include <hpx/condition_variable.hpp>
#include <hpx/init.hpp>
#include <hpx/mutex.hpp>
#include <hpx/runtime.hpp>
#include <hpx/thread.hpp>
#include <hpx/version.hpp>

#include <atomic>
Expand Down Expand Up @@ -207,15 +207,15 @@ int HPX::concurrency() const {
void HPX::impl_initialize(InitializationSettings const &settings) {
hpx::runtime *rt = hpx::get_runtime_ptr();
if (rt == nullptr) {
hpx::local::init_params i;
hpx::init_params i;
if (settings.has_num_threads()) {
i.cfg.emplace_back("hpx.os_threads=" +
std::to_string(settings.get_num_threads()));
}
int argc_hpx = 1;
char name[] = "kokkos_hpx";
char *argv_hpx[] = {name, nullptr};
hpx::local::start(nullptr, argc_hpx, argv_hpx, i);
hpx::start(nullptr, argc_hpx, argv_hpx, i);

m_hpx_initialized = true;
}
Expand All @@ -231,11 +231,11 @@ void HPX::impl_finalize() {
hpx::runtime *rt = hpx::get_runtime_ptr();
if (rt != nullptr) {
#if HPX_VERSION_FULL >= 0x010900
hpx::post([]() { hpx::local::finalize(); });
hpx::post([]() { hpx::finalize(); });
#else
hpx::apply([]() { hpx::local::finalize(); });
hpx::apply([]() { hpx::finalize(); });
#endif
hpx::local::stop();
hpx::stop();
} else {
Kokkos::abort(
"Kokkos::Experimental::HPX::impl_finalize: Kokkos started "
Expand Down Expand Up @@ -325,4 +325,4 @@ int g_hpx_space_factory_initialized =

#else
void KOKKOS_CORE_SRC_IMPL_HPX_PREVENT_LINK_ERROR() {}
#endif //#ifdef KOKKOS_ENABLE_HPX
#endif // #ifdef KOKKOS_ENABLE_HPX
12 changes: 6 additions & 6 deletions core/src/HPX/Kokkos_HPX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ static_assert(false,

#include <KokkosExp_MDRangePolicy.hpp>

#include <hpx/local/barrier.hpp>
#include <hpx/local/condition_variable.hpp>
#include <hpx/local/execution.hpp>
#include <hpx/local/future.hpp>
#include <hpx/local/mutex.hpp>
#include <hpx/local/thread.hpp>
#include <hpx/barrier.hpp>
#include <hpx/condition_variable.hpp>
#include <hpx/execution.hpp>
#include <hpx/future.hpp>
#include <hpx/mutex.hpp>
#include <hpx/thread.hpp>

#include <Kokkos_UniqueToken.hpp>

Expand Down
4 changes: 2 additions & 2 deletions core/src/HPX/Kokkos_HPX_Task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#include <HPX/Kokkos_HPX.hpp>

#include <hpx/local/execution.hpp>
#include <hpx/local/future.hpp>
#include <hpx/execution.hpp>
#include <hpx/future.hpp>

#include <type_traits>

Expand Down
3 changes: 1 addition & 2 deletions core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

#include <HPX/Kokkos_HPX.hpp>

#include <hpx/local/algorithm.hpp>
#include <hpx/local/execution.hpp>
#include <hpx/execution.hpp>

namespace Kokkos {
namespace Impl {
Expand Down
2 changes: 1 addition & 1 deletion core/unit_test/hpx/TestHPX_IndependentInstances.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <TestHPX_Category.hpp>

#include <hpx/config.hpp>
#include <hpx/local/future.hpp>
#include <hpx/future.hpp>

#ifndef HPX_COMPUTE_DEVICE_CODE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <Kokkos_Core.hpp>
#include <TestHPX_Category.hpp>

#include <hpx/local/execution.hpp>
#include <hpx/execution.hpp>

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <Kokkos_Core.hpp>
#include <TestHPX_Category.hpp>

#include <hpx/local/execution.hpp>
#include <hpx/execution.hpp>

namespace {

Expand Down

0 comments on commit d813035

Please sign in to comment.