Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
if the deque is empty, remove it from the map
[simgrid.git] / src / smpi / internals / instr_smpi.cpp
index 00d1a46..b55f098 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2010-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -15,8 +14,8 @@
 #include <simgrid/s4u/Host.hpp>
 #include <string>
 #include <vector>
-#include "smpi_process.hpp"
 
+#include "src/smpi/include/smpi_actor.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
 
@@ -139,6 +138,8 @@ static std::string TRACE_smpi_get_key(int src, int dst, int tag, int send)
   } else {
     key = it->second->front();
     it->second->pop_front();
+    if (it->second->empty())
+      keys.erase(it);
   }
   return key;
 }