Skip to content

Commit

Permalink
mpi: fix detection of local messages in receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Feb 26, 2024
1 parent 4d738ad commit 65cd6af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/mpi/MpiWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ void MpiWorld::doRecv(std::shared_ptr<MPIMessage>& m,
assert(m->count() <= count);

const std::string otherHost = getHostForRank(m->destination());
bool isLocal = otherHost == thisHost;
bool isLocal =
getHostForRank(m->destination()) == getHostForRank(m->sender());

if (m->count() > 0) {
if (isLocal) {
Expand Down
5 changes: 4 additions & 1 deletion src/planner/Planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ void Planner::setMessageResult(std::shared_ptr<faabric::Message> msg)

// Release the slot only once
if (!state.hostMap.contains(msg->executedhost())) {
SPDLOG_ERROR("Host Map does not contain: {}", msg->executedhost());
SPDLOG_ERROR("Host Map does not contain: {}. We have:", msg->executedhost());
for (auto [ip, host] : state.hostMap) {
SPDLOG_ERROR("{} ({}/{})", ip, host->usedslots(), host->slots());
}
}
assert(state.hostMap.contains(msg->executedhost()));
if (!state.appResults[appId].contains(msgId)) {
Expand Down

0 comments on commit 65cd6af

Please sign in to comment.