Skip to content

Commit

Permalink
conf: remove obsolete configuration entries (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz authored Jan 3, 2024
1 parent c1f6509 commit 4a677aa
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 54 deletions.
1 change: 0 additions & 1 deletion include/faabric/mpi/MpiWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions include/faabric/util/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,7 +36,6 @@ class SystemConfig

// MPI
int defaultMpiWorldSize;
int mpiBasePort;

// Endpoint
std::string endpointInterface;
Expand Down
6 changes: 0 additions & 6 deletions src/batch-scheduler/SchedulingDecision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> hostSet(hosts.begin(), hosts.end());
return hostSet.size() == 1;
Expand Down
1 change: 0 additions & 1 deletion src/mpi/MpiWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ std::vector<std::shared_ptr<MPIMessage>> 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())
Expand Down
8 changes: 0 additions & 8 deletions src/util/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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", "");
Expand Down Expand Up @@ -115,17 +110,14 @@ 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);
SPDLOG_INFO("BOUND_TIMEOUT {}", boundTimeout);

SPDLOG_INFO("--- MPI ---");
SPDLOG_INFO("DEFAULT_MPI_WORLD_SIZE {}", defaultMpiWorldSize);
SPDLOG_INFO("MPI_BASE_PORT {}", mpiBasePort);

SPDLOG_INFO("--- Endpoint ---");
SPDLOG_INFO("ENDPOINT_INTERFACE {}", endpointInterface);
Expand Down
12 changes: 0 additions & 12 deletions tests/test/batch-scheduler/test_scheduling_decisions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 1 addition & 14 deletions tests/test/scheduler/test_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions tests/test/util/test_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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);
Expand All @@ -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");

Expand Down

0 comments on commit 4a677aa

Please sign in to comment.