Skip to content

Commit

Permalink
Merge #6289
Browse files Browse the repository at this point in the history
6289: Re-enable compiling with HPX_WITH_NETWORKING=OFF r=hkaiser a=hkaiser

Fixes #6287

- this adds the missing #include

`@G-071` please verify whether this fixes your issues.

Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
  • Loading branch information
StellarBot and hkaiser committed Jun 26, 2023
2 parents 7ad876c + fa35858 commit 04c8ebc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .jenkins/lsu/env-gcc-11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/quickstart/custom_serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
//]
2 changes: 2 additions & 0 deletions libs/full/agas/src/addressing_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,21 @@ namespace hpx { namespace components {
#if defined(DOXYGEN)
future<hpx::id_type>
#else
inline std::enable_if_t<traits::is_component<Component>::value &&
traits::is_distribution_policy<DistPolicy>::value,
std::enable_if_t<traits::is_component_v<Component> &&
traits::is_distribution_policy_v<DistPolicy>,
future<hpx::id_type>>
#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<Component, DistPolicy>;
return hpx::detail::async_colocated<action_type>(
to_migrate, to_migrate, policy);
#else
return hpx::make_ready_future(to_migrate);
#endif
}

/// Migrate the given component to the specified target locality
Expand Down Expand Up @@ -133,8 +138,7 @@ namespace hpx { namespace components {
#if defined(DOXYGEN)
future<hpx::id_type>
#else
inline std::enable_if_t<traits::is_component<Component>::value,
future<hpx::id_type>>
std::enable_if_t<traits::is_component_v<Component>, future<hpx::id_type>>
#endif
migrate(hpx::id_type const& to_migrate, hpx::id_type const& target_locality)
{
Expand Down
1 change: 1 addition & 0 deletions libs/full/runtime_distributed/src/runtime_distributed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <hpx/functional/function.hpp>
#include <hpx/itt_notify/thread_name.hpp>
#include <hpx/modules/errors.hpp>
#include <hpx/modules/io_service.hpp>
#include <hpx/modules/logging.hpp>
#include <hpx/modules/static_reinit.hpp>
#include <hpx/modules/threadmanager.hpp>
Expand Down

0 comments on commit 04c8ebc

Please sign in to comment.