From 8f8f76af2d03714eaab97e3678acfdfc0e422cc9 Mon Sep 17 00:00:00 2001 From: Fred Suter Date: Fri, 4 Nov 2022 08:26:40 -0400 Subject: [PATCH] another attempt to avoid deadlocks in wrench when using sio host model --- src/surf/sio_S22.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/surf/sio_S22.cpp b/src/surf/sio_S22.cpp index ee3620cfb9..aae6f3060a 100644 --- a/src/surf/sio_S22.cpp +++ b/src/surf/sio_S22.cpp @@ -170,18 +170,12 @@ S22Action::S22Action(Model* model, s4u::Host* src_host, DiskImpl* src_disk, s4u: if (dst_disk_ != nullptr) disk_nb++; - if (size_ > 0) { - std::unordered_set affected_links; - double lat = 0.0; - std::vector route; - src_host_->route_to(dst_host_, route, &lat); - latency = std::max(latency, lat); - - for (auto const& link : route) - affected_links.insert(link->get_cname()); - - link_nb = affected_links.size(); - } + /* there should always be a route between src_host and dst_host (loopback_ for self communication at least) */ + double lat = 0.0; + std::vector route; + src_host_->route_to(dst_host_, route, &lat); + latency = std::max(latency, lat); + link_nb = route.size(); XBT_DEBUG("Creating a stream io (%p) with %zu disk(s) and %zu unique link(s).", this, disk_nb, link_nb); latency_ = latency; -- 2.20.1