]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/mpi/smpi_comm.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Superfluous blank lines.
[simgrid.git] / src / smpi / mpi / smpi_comm.cpp
index 115b798de61eee768f6bb95913d70e590c09672e..017d010a792622d4a1af20902a91c48caa59743e 100644 (file)
@@ -65,8 +65,10 @@ void Comm::destroy(Comm* comm)
     Comm::destroy(smpi_process()->comm_world());
     return;
   }
-  if(comm != MPI_COMM_WORLD)
+  if (comm != MPI_COMM_WORLD && not comm->deleted()) {
+    comm->cleanup_attr<Comm>();
     comm->mark_as_deleted();
+  }
   Comm::unref(comm);
 }
 
@@ -474,7 +476,7 @@ void Comm::init_smp(){
   int my_local_size=comm_intra->size();
   if(comm_intra->rank()==0) {
     int is_uniform       = 1;
-    int* non_uniform_map = xbt_new0(int,leader_group_size);
+    auto* non_uniform_map = xbt_new0(int, leader_group_size);
     allgather__ring(&my_local_size, 1, MPI_INT,
         non_uniform_map, 1, MPI_INT, leader_comm);
     for(i=0; i < leader_group_size; i++) {
@@ -562,9 +564,6 @@ void Comm::finish_rma_calls() const
 
 MPI_Info Comm::info()
 {
-  if (info_ == MPI_INFO_NULL)
-    info_ = new Info();
-  info_->ref();
   return info_;
 }