Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
smpi: fix issue with message IDs. In case of persistent request reused multiple times...
[simgrid.git] / src / smpi / mpi / smpi_comm.cpp
index 117f08f..ba3cf81 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. 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. */
@@ -10,8 +10,8 @@
 #include "smpi_info.hpp"
 #include "smpi_request.hpp"
 #include "smpi_win.hpp"
+#include "src/kernel/resource/HostImpl.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
-#include "src/surf/HostImpl.hpp"
 
 #include <limits>
 
@@ -33,8 +33,7 @@ MPI_Comm MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED;
 /* Support for cartesian topology was added, but there are 2 other types of topology, graph et dist graph. In order to
  * support them, we have to add a field SMPI_Topo_type, and replace the MPI_Topology field by an union. */
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 std::unordered_map<int, smpi_key_elem> Comm::keyvals_;
 int Comm::keyval_id_=0;
@@ -186,9 +185,9 @@ std::string Comm::name() const
   std::array<char, MPI_MAX_NAME_STRING + 1> name;
   this->get_name(name.data(), &size);
   if (name[0]=='\0')
-    return std::string("MPI_Comm");
+    return "MPI_Comm";
   else
-    return std::string(name.data());
+    return name.data();
 }
 
 
@@ -676,5 +675,4 @@ void Comm::increment_collectives_count()
   }
 }
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi