From fa3585850eb68a91e08e14fb8f8aad5881f12a8e Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sat, 24 Jun 2023 11:06:32 -0500 Subject: [PATCH] Re-enable compiling with HPX_WITH_NETWORKING=OFF --- .jenkins/lsu/env-gcc-11.sh | 4 +--- examples/quickstart/custom_serialization.cpp | 10 +++++++++- libs/full/agas/src/addressing_service.cpp | 2 ++ .../hpx/runtime_distributed/migrate_component.hpp | 14 +++++++++----- .../src/runtime_distributed.cpp | 1 + 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.jenkins/lsu/env-gcc-11.sh b/.jenkins/lsu/env-gcc-11.sh index e711bd7bce10..b9f7be125f7f 100644 --- a/.jenkins/lsu/env-gcc-11.sh +++ b/.jenkins/lsu/env-gcc-11.sh @@ -20,9 +20,7 @@ configure_extra_options+=" -DHPX_WITH_MALLOC=system" configure_extra_options+=" -DHPX_WITH_FETCH_ASIO=ON" configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS=ON" configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" +configure_extra_options+=" -DHPX_WITH_NETWORKING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=STD_EXPERIMENTAL_SIMD" # The pwrapi library still needs to be set up properly on rostam diff --git a/examples/quickstart/custom_serialization.cpp b/examples/quickstart/custom_serialization.cpp index 06f885e3e0b5..02253df59d35 100644 --- a/examples/quickstart/custom_serialization.cpp +++ b/examples/quickstart/custom_serialization.cpp @@ -203,8 +203,16 @@ int main() send_gravity_action gravityAction; auto gravity = planet_weight_calculator(9.81); - hpx::async(gravityAction, hpx::find_remote_localities()[0], gravity).get(); + auto remote_localities = hpx::find_remote_localities(); + if (!remote_localities.empty()) + { + hpx::async(gravityAction, remote_localities[0], gravity).get(); + } + else + { + hpx::async(gravityAction, hpx::find_here(), gravity).get(); + } return 0; } //] diff --git a/libs/full/agas/src/addressing_service.cpp b/libs/full/agas/src/addressing_service.cpp index b2b4b053a4ee..d4a7a1a0a238 100644 --- a/libs/full/agas/src/addressing_service.cpp +++ b/libs/full/agas/src/addressing_service.cpp @@ -736,8 +736,10 @@ namespace hpx::agas { naming::gid_type const id( naming::detail::get_stripped_gid_except_dont_cache(gid)); +#if defined(HPX_HAVE_NETWORKING) // migratable objects should be handled by the function below HPX_ASSERT(!naming::detail::is_migratable(gid)); +#endif // Try to resolve the address of the GID from the locally available // information. diff --git a/libs/full/runtime_distributed/include/hpx/runtime_distributed/migrate_component.hpp b/libs/full/runtime_distributed/include/hpx/runtime_distributed/migrate_component.hpp index afa025492e5e..feb59b815d28 100644 --- a/libs/full/runtime_distributed/include/hpx/runtime_distributed/migrate_component.hpp +++ b/libs/full/runtime_distributed/include/hpx/runtime_distributed/migrate_component.hpp @@ -49,16 +49,21 @@ namespace hpx { namespace components { #if defined(DOXYGEN) future #else - inline std::enable_if_t::value && - traits::is_distribution_policy::value, + std::enable_if_t && + traits::is_distribution_policy_v, future> #endif - migrate(hpx::id_type const& to_migrate, DistPolicy const& policy) + migrate(hpx::id_type const& to_migrate, + [[maybe_unused]] DistPolicy const& policy) { +#if defined(HPX_HAVE_NETWORKING) using action_type = server::perform_migrate_component_action; return hpx::detail::async_colocated( to_migrate, to_migrate, policy); +#else + return hpx::make_ready_future(to_migrate); +#endif } /// Migrate the given component to the specified target locality @@ -133,8 +138,7 @@ namespace hpx { namespace components { #if defined(DOXYGEN) future #else - inline std::enable_if_t::value, - future> + std::enable_if_t, future> #endif migrate(hpx::id_type const& to_migrate, hpx::id_type const& target_locality) { diff --git a/libs/full/runtime_distributed/src/runtime_distributed.cpp b/libs/full/runtime_distributed/src/runtime_distributed.cpp index d75b538be0fb..3555c303931f 100644 --- a/libs/full/runtime_distributed/src/runtime_distributed.cpp +++ b/libs/full/runtime_distributed/src/runtime_distributed.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include