Skip to content

Commit

Permalink
bug--?
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Dec 9, 2023
1 parent 9a0ad2c commit 29c7ebc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/wrench/simgrid_S4U_util/S4U_CommPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,23 @@ namespace wrench {
auto failed_recv = pending_receives.get_failed_activity();
if (failed_recv == mb_comm) {
mq_comm->cancel();
pending_receives.erase(mq_comm);
} else if (failed_recv == mq_comm) {
mb_comm->cancel();
pending_receives.erase(mb_comm);
}
throw ExecutionException(std::make_shared<NetworkError>(NetworkError::RECEIVING, NetworkError::TIMEOUT, this->name, ""));
} catch (simgrid::Exception &e) {
WRENCH_INFO("IN THAT TRY CATCH");
auto failed_recv = pending_receives.get_failed_activity();
if (failed_recv == mb_comm) {
mq_comm->cancel();
pending_receives.erase(mq_comm);
throw ExecutionException(std::make_shared<NetworkError>(
NetworkError::RECEIVING, NetworkError::FAILURE, this->name, ""));
} else {
mb_comm->cancel();
pending_receives.erase(mb_comm);
throw ExecutionException(std::make_shared<NetworkError>(
NetworkError::RECEIVING, NetworkError::FAILURE, this->name, ""));
}
Expand All @@ -161,11 +165,13 @@ namespace wrench {
WRENCH_INFO("IT WAS THE MB_COM");
WRENCH_INFO("CANCELING %p", mq_comm.get());
mq_comm->cancel();
pending_receives.erase(mq_comm);
WRENCH_INFO("WAITING ON %p", mb_comm.get());
// mb_comm->wait();
} else if (finished_recv == mq_comm) {
msg = msg_mq;
mb_comm->cancel();
pending_receives.erase(mb_comm);
// mq_comm->wait();
}

Expand Down

0 comments on commit 29c7ebc

Please sign in to comment.