Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Topo -> c++
[simgrid.git] / src / smpi / smpi_comm.cpp
index ed96ac2..19e7a8e 100644 (file)
@@ -12,8 +12,6 @@
 #include <xbt/ex.hpp>
 
 #include <simgrid/s4u/host.hpp>
-#include <src/smpi/smpi_comm.hpp>
-#include <src/smpi/smpi_group.hpp>
 
 #include "private.h"
 #include "smpi_mpi_dt_private.h"
@@ -70,7 +68,7 @@ void Comm::destroy()
 {
   if (this == MPI_COMM_UNINITIALIZED)
     return smpi_process_comm_world()->destroy();
-  smpi_topo_destroy(m_topo); // there's no use count on topos
+  delete m_topo; // there's no use count on topos
   this->unuse();
 }
 
@@ -116,9 +114,7 @@ MPI_Group Comm::group()
 }
 
 MPI_Topology Comm::topo() {
-  if (this != MPI_COMM_NULL)
-    return m_topo;
-  return nullptr;
+  return m_topo;
 }
 
 int Comm::size()