From b3e6487cbebfaada40d407ac8d98daf9e370153c Mon Sep 17 00:00:00 2001 From: Fred Suter Date: Thu, 3 Nov 2022 21:50:46 -0400 Subject: [PATCH 1/1] fix deadlock found by hcasanova in case of self communications --- src/surf/sio_S22.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/surf/sio_S22.cpp b/src/surf/sio_S22.cpp index 24fa3bfffb..ee3620cfb9 100644 --- a/src/surf/sio_S22.cpp +++ b/src/surf/sio_S22.cpp @@ -170,7 +170,7 @@ S22Action::S22Action(Model* model, s4u::Host* src_host, DiskImpl* src_disk, s4u: if (dst_disk_ != nullptr) disk_nb++; - if (src_host_ != dst_host_ && size_ > 0) { + if (size_ > 0) { std::unordered_set affected_links; double lat = 0.0; std::vector route; @@ -198,7 +198,7 @@ S22Action::S22Action(Model* model, s4u::Host* src_host, DiskImpl* src_disk, s4u: if (dst_disk_ != nullptr) model->get_maxmin_system()->expand(dst_disk_->get_constraint(), get_variable(), size, true); - if (src_host_ != dst_host_) { + if (link_nb > 0) { std::vector route; src_host_->route_to(dst_host_, route, nullptr); for (auto const& link : route) -- 2.20.1