Skip to content

Commit

Permalink
nits: run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Aug 28, 2023
1 parent f3b489e commit b948c90
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/mpi/MpiWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ void MpiWorld::prepareMigration(int thisRank)
"Migrating with pending async messages is not supported");
}

// Update local records
// Update local records
if (thisRank == localLeader) {
// TODO: we may be able to just initLocalRemote here?
initLocalRemoteLeaders();
Expand Down
3 changes: 2 additions & 1 deletion src/planner/Planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ Planner::callBatch(std::shared_ptr<BatchExecuteRequest> req)
}
}

auto decision = batchScheduler->makeSchedulingDecision(hostMapCopy, state.inFlightReqs, req);
auto decision = batchScheduler->makeSchedulingDecision(
hostMapCopy, state.inFlightReqs, req);
#ifndef NDEBUG
// Here we make sure the state hasn't changed here (we pass const, but they
// are const pointers)
Expand Down
12 changes: 10 additions & 2 deletions src/util/batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,16 @@ bool isBatchExecRequestValid(std::shared_ptr<faabric::BatchExecuteRequest> ber)
if (msg.user() != user || msg.function() != func ||
msg.appid() != appId) {
SPDLOG_ERROR("Malformed message in BER");
SPDLOG_ERROR("Got: (id: {} - user: {} - func: {} - app: {})", msg.id(), msg.user(), msg.function(), msg.appid());
SPDLOG_ERROR("Expected: (id: {} - user: {} - func: {} - app: {})", msg.id(), user, func, appId);
SPDLOG_ERROR("Got: (id: {} - user: {} - func: {} - app: {})",
msg.id(),
msg.user(),
msg.function(),
msg.appid());
SPDLOG_ERROR("Expected: (id: {} - user: {} - func: {} - app: {})",
msg.id(),
user,
func,
appId);
return false;
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/test/scheduler/test_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ TEST_CASE_METHOD(TestExecutorFixture,
REQUIRE(res.returnvalue() == 0);

for (int mid : faabric::util::getChainedFunctions(msg)) {
auto chainedRes = plannerCli.getMessageResult(msg.appid(), mid, LONG_TEST_TIMEOUT_MS);
auto chainedRes = plannerCli.getMessageResult(
msg.appid(), mid, LONG_TEST_TIMEOUT_MS);
REQUIRE(chainedRes.returnvalue() == 0);
}

Expand Down
12 changes: 6 additions & 6 deletions tests/test/scheduler/test_function_migration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ class FunctionMigrationTestFixture
setExecutorFactory(fac);
}

~FunctionMigrationTestFixture()
{
faabric::util::setMockMode(false);
}
~FunctionMigrationTestFixture() { faabric::util::setMockMode(false); }

protected:
std::string mainHost = faabric::util::getSystemConfig().endpointHost;
Expand All @@ -53,7 +50,9 @@ class FunctionMigrationTestFixture
if (i == 0) {
sch.setThisHostResources(resources);
} else {
sch.addHostToGlobalSet(registeredHosts.at(i), std::make_shared<faabric::HostResources>(resources));
sch.addHostToGlobalSet(
registeredHosts.at(i),
std::make_shared<faabric::HostResources>(resources));
}
}
}
Expand Down Expand Up @@ -214,7 +213,8 @@ TEST_CASE_METHOD(FunctionMigrationTestFixture,
msg.set_appid(appId);
msg.set_groupid(groupId);
msg.set_groupidx(i);
auto expectedMigration = sch.checkForMigrationOpportunities(msg, newGroupId);
auto expectedMigration =
sch.checkForMigrationOpportunities(msg, newGroupId);
if (mustMigrate) {
REQUIRE(expectedMigration != nullptr);
REQUIRE(expectedMigration->appid() == appId);
Expand Down
3 changes: 2 additions & 1 deletion tests/test/scheduler/test_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ TEST_CASE_METHOD(DummyExecutorTestFixture,
int nSlotsOtherHost = 2;
faabric::HostResources resourcesOtherHost;
resourcesOtherHost.set_slots(nSlotsOtherHost);
sch.addHostToGlobalSet(otherHost, std::make_shared<HostResources>(resourcesOtherHost));
sch.addHostToGlobalSet(otherHost,
std::make_shared<HostResources>(resourcesOtherHost));

// Set up request
int numMessages = 4;
Expand Down

0 comments on commit b948c90

Please sign in to comment.