From 6ade5b4f8e9382bb194743a7322ecc28a177464a Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Tue, 19 Dec 2023 12:12:54 +0000 Subject: [PATCH] conf: remove obsolete configuration entries --- include/faabric/mpi/MpiWorld.h | 1 - include/faabric/util/config.h | 4 ---- src/batch-scheduler/SchedulingDecision.cpp | 6 ------ src/mpi/MpiWorld.cpp | 1 - src/util/config.cpp | 8 -------- .../batch-scheduler/test_scheduling_decisions.cpp | 12 ------------ tests/test/scheduler/test_executor.cpp | 15 +-------------- tests/test/util/test_config.cpp | 8 -------- 8 files changed, 1 insertion(+), 54 deletions(-) diff --git a/include/faabric/mpi/MpiWorld.h b/include/faabric/mpi/MpiWorld.h index 51f3963fe..adee54137 100644 --- a/include/faabric/mpi/MpiWorld.h +++ b/include/faabric/mpi/MpiWorld.h @@ -207,7 +207,6 @@ class MpiWorld int id = -1; int size = -1; std::string thisHost; - int basePort; faabric::util::TimePoint creationTime; std::atomic_flag isDestroyed = false; diff --git a/include/faabric/util/config.h b/include/faabric/util/config.h index d5acdd73f..5902e3aab 100644 --- a/include/faabric/util/config.h +++ b/include/faabric/util/config.h @@ -26,10 +26,7 @@ class SystemConfig std::string redisPort; // Scheduling - int noScheduler; int overrideCpuCount; - std::string noTopologyHints; - int noSingleHostOptimisations; std::string batchSchedulerMode; // Worker-related timeouts @@ -39,7 +36,6 @@ class SystemConfig // MPI int defaultMpiWorldSize; - int mpiBasePort; // Endpoint std::string endpointInterface; diff --git a/src/batch-scheduler/SchedulingDecision.cpp b/src/batch-scheduler/SchedulingDecision.cpp index 5439068f6..b4a4a6fdf 100644 --- a/src/batch-scheduler/SchedulingDecision.cpp +++ b/src/batch-scheduler/SchedulingDecision.cpp @@ -13,12 +13,6 @@ bool SchedulingDecision::isSingleHost() { auto& conf = faabric::util::getSystemConfig(); - // Always return false if single-host optimisations are switched off - // TODO(thread-opt): remove this flag - if (conf.noSingleHostOptimisations == 1) { - return false; - } - std::string thisHost = conf.endpointHost; std::set hostSet(hosts.begin(), hosts.end()); return hostSet.size() == 1; diff --git a/src/mpi/MpiWorld.cpp b/src/mpi/MpiWorld.cpp index 148690052..91e7f1e88 100644 --- a/src/mpi/MpiWorld.cpp +++ b/src/mpi/MpiWorld.cpp @@ -44,7 +44,6 @@ std::vector> getMpiMockedMessages(int sendRank) MpiWorld::MpiWorld() : thisHost(faabric::util::getSystemConfig().endpointHost) - , basePort(faabric::util::getSystemConfig().mpiBasePort) , creationTime(faabric::util::startTimer()) , cartProcsPerDim(2) , broker(faabric::transport::getPointToPointBroker()) diff --git a/src/util/config.cpp b/src/util/config.cpp index 731e63fa7..89797b020 100644 --- a/src/util/config.cpp +++ b/src/util/config.cpp @@ -33,11 +33,7 @@ void SystemConfig::initialise() // Scheduling // TODO(planner-scheduler): remove some of this - noScheduler = this->getSystemConfIntParam("NO_SCHEDULER", "0"); overrideCpuCount = this->getSystemConfIntParam("OVERRIDE_CPU_COUNT", "0"); - noTopologyHints = getEnvVar("NO_TOPOLOGY_HINTS", "off"); - noSingleHostOptimisations = - this->getSystemConfIntParam("NO_SINGLE_HOST", "0"); batchSchedulerMode = getEnvVar("BATCH_SCHEDULER_MODE", "bin-pack"); // Worker-related timeouts (all in seconds) @@ -50,7 +46,6 @@ void SystemConfig::initialise() // MPI defaultMpiWorldSize = this->getSystemConfIntParam("DEFAULT_MPI_WORLD_SIZE", "5"); - mpiBasePort = this->getSystemConfIntParam("MPI_BASE_PORT", "10800"); // Endpoint endpointInterface = getEnvVar("ENDPOINT_INTERFACE", ""); @@ -115,9 +110,7 @@ void SystemConfig::print() SPDLOG_INFO("REDIS_PORT {}", redisPort); SPDLOG_INFO("--- Scheduling ---"); - SPDLOG_INFO("NO_SCHEDULER {}", noScheduler); SPDLOG_INFO("OVERRIDE_CPU_COUNT {}", overrideCpuCount); - SPDLOG_INFO("NO_TOPOLOGY_HINTS {}", noTopologyHints); SPDLOG_INFO("--- Timeouts ---"); SPDLOG_INFO("GLOBAL_MESSAGE_TIMEOUT {}", globalMessageTimeout); @@ -125,7 +118,6 @@ void SystemConfig::print() SPDLOG_INFO("--- MPI ---"); SPDLOG_INFO("DEFAULT_MPI_WORLD_SIZE {}", defaultMpiWorldSize); - SPDLOG_INFO("MPI_BASE_PORT {}", mpiBasePort); SPDLOG_INFO("--- Endpoint ---"); SPDLOG_INFO("ENDPOINT_INTERFACE {}", endpointInterface); diff --git a/tests/test/batch-scheduler/test_scheduling_decisions.cpp b/tests/test/batch-scheduler/test_scheduling_decisions.cpp index 710c590c8..473df719e 100644 --- a/tests/test/batch-scheduler/test_scheduling_decisions.cpp +++ b/tests/test/batch-scheduler/test_scheduling_decisions.cpp @@ -44,18 +44,6 @@ TEST_CASE_METHOD(ConfFixture, "Test building scheduling decisions", "[util]") expectedUniqueHosts = { thisHost }; } - SECTION("All this host single host optimisations off") - { - conf.noSingleHostOptimisations = 1; - - hostA = thisHost; - hostB = thisHost; - hostC = thisHost; - - expectSingleHost = false; - expectedUniqueHosts = { thisHost }; - } - auto req = faabric::util::batchExecFactory("foo", "bar", 3); SchedulingDecision decision(appId, groupId); diff --git a/tests/test/scheduler/test_executor.cpp b/tests/test/scheduler/test_executor.cpp index d770fcf44..bc518ea2f 100644 --- a/tests/test/scheduler/test_executor.cpp +++ b/tests/test/scheduler/test_executor.cpp @@ -492,12 +492,6 @@ TEST_CASE_METHOD(TestExecutorFixture, SECTION("Underloaded") { nThreads = 10; } - SECTION("Underloaded no single host optimisation") - { - nThreads = 10; - conf.noSingleHostOptimisations = 1; - } - // Set resources HostResources localHost; localHost.set_slots(nThreads); @@ -532,14 +526,7 @@ TEST_CASE_METHOD(TestExecutorFixture, "Test executing chained threads", "[executor]") { - int nThreads; - SECTION("Underloaded") { nThreads = 8; } - - SECTION("Underloaded no single host optimisation") - { - nThreads = 10; - conf.noSingleHostOptimisations = 1; - } + int nThreads = 8; // Set resources HostResources localHost; diff --git a/tests/test/util/test_config.cpp b/tests/test/util/test_config.cpp index 584484eb6..c9aa11cce 100644 --- a/tests/test/util/test_config.cpp +++ b/tests/test/util/test_config.cpp @@ -20,16 +20,12 @@ TEST_CASE("Test default system config initialisation", "[util]") REQUIRE(conf.redisPort == "6379"); - REQUIRE(conf.noScheduler == 0); - REQUIRE(conf.noTopologyHints == "off"); - REQUIRE(conf.noSingleHostOptimisations == 0); REQUIRE(conf.batchSchedulerMode == "bin-pack"); REQUIRE(conf.globalMessageTimeout == 60000); REQUIRE(conf.boundTimeout == 30000); REQUIRE(conf.defaultMpiWorldSize == 5); - REQUIRE(conf.mpiBasePort == 10800); REQUIRE(conf.dirtyTrackingMode == "segfault"); @@ -83,10 +79,7 @@ TEST_CASE("Test overriding system config initialisation", "[util]") REQUIRE(conf.redisQueueHost == "other-host"); REQUIRE(conf.redisPort == "1234"); - REQUIRE(conf.noScheduler == 1); REQUIRE(conf.overrideCpuCount == 4); - REQUIRE(conf.noTopologyHints == "on"); - REQUIRE(conf.noSingleHostOptimisations == 1); REQUIRE(conf.batchSchedulerMode == "foo-bar"); REQUIRE(conf.globalMessageTimeout == 9876); @@ -98,7 +91,6 @@ TEST_CASE("Test overriding system config initialisation", "[util]") REQUIRE(conf.pointToPointServerThreads == 444); REQUIRE(conf.defaultMpiWorldSize == 2468); - REQUIRE(conf.mpiBasePort == 9999); REQUIRE(conf.dirtyTrackingMode == "dummy-track");