From 132d91993d5791f4d81488b00c8a570a557eb39d Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Tue, 14 May 2024 15:39:54 -0500 Subject: [PATCH] Ensure TCP parcelport is deactivated if not needed --- docs/sphinx/releases/whats_new_1_10_0.rst | 1 + .../command_line_handling/src/command_line_handling.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/releases/whats_new_1_10_0.rst b/docs/sphinx/releases/whats_new_1_10_0.rst index 898efb1da532..19f4abc79c99 100644 --- a/docs/sphinx/releases/whats_new_1_10_0.rst +++ b/docs/sphinx/releases/whats_new_1_10_0.rst @@ -99,6 +99,7 @@ Closed pull requests * :hpx-pr:`6491` - More fixes to handling bool arguments for collective operations * :hpx-pr:`6490` - Remove the default max cpu count +* :hpx-pr:`6489` - Ensure TCP parcelport is deactivated if not needed * :hpx-pr:`6488` - Fixing handling of bool value type for collective operations * :hpx-pr:`6485` - Destructive interference size * :hpx-pr:`6484` - Improve performance counter error handling diff --git a/libs/full/command_line_handling/src/command_line_handling.cpp b/libs/full/command_line_handling/src/command_line_handling.cpp index b8b7abbf5743..a3c018f293f7 100644 --- a/libs/full/command_line_handling/src/command_line_handling.cpp +++ b/libs/full/command_line_handling/src/command_line_handling.cpp @@ -383,7 +383,7 @@ namespace hpx::util { node != static_cast(-1) && vm.count("hpx:debug-clp"); // create host name mapping - [[maybe_unused]] bool const have_tcp = + [[maybe_unused]] bool have_tcp = rtcfg_.get_entry("hpx.parcel.tcp.enable", "1") != "0"; util::map_hostnames mapnames(debug_clp); @@ -550,9 +550,14 @@ namespace hpx::util { run_agas_server = vm.count("hpx:run-agas-server") != 0; if (node == static_cast(-1)) node = env.retrieve_node_number(); + + // make sure that TCP parcelport will only be enabled if necessary + if (num_localities_ == 1 && !expect_connections) + have_tcp = false; #else num_localities_ = 1; node = 0; + have_tcp = false; #endif // If the user has not specified an explicit runtime mode we retrieve it