Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some more leaks
authordegomme <augustin.degomme@unibas.ch>
Wed, 27 Apr 2016 08:54:59 +0000 (10:54 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Wed, 27 Apr 2016 08:56:41 +0000 (10:56 +0200)
smpi_datatype_free does not update refcount, use unuse instead.

src/smpi/colls/allgatherv-ompi-bruck.c
src/smpi/colls/allgatherv-ompi-neighborexchange.c
src/smpi/colls/alltoall-bruck.c

index dc5d2fb..c9491fa 100644 (file)
@@ -162,8 +162,8 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount,
                                      rbuf, 1, new_rdtype, recvfrom,
                                      COLL_TAG_ALLGATHERV,
                                      comm, MPI_STATUS_IGNORE);
                                      rbuf, 1, new_rdtype, recvfrom,
                                      COLL_TAG_ALLGATHERV,
                                      comm, MPI_STATUS_IGNORE);
-      smpi_datatype_free(&new_sdtype);
-      smpi_datatype_free(&new_rdtype);
+      smpi_datatype_unuse(new_sdtype);
+      smpi_datatype_unuse(new_rdtype);
 
    }
 
 
    }
 
index f6fc137..edf93c3 100644 (file)
@@ -205,8 +205,8 @@ smpi_coll_tuned_allgatherv_ompi_neighborexchange(void *sbuf, int scount,
 
         send_data_from = recv_data_from[i_parity];
       
 
         send_data_from = recv_data_from[i_parity];
       
-        smpi_datatype_free(&new_sdtype);
-        smpi_datatype_free(&new_rdtype);
+        smpi_datatype_unuse(new_sdtype);
+        smpi_datatype_unuse(new_rdtype);
     }
 
     return MPI_SUCCESS;
     }
 
     return MPI_SUCCESS;
index 99a93b5..10b4d9c 100644 (file)
@@ -86,7 +86,7 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count,
 
     smpi_mpi_sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1,
                  new_type, src, tag, comm, &status);
 
     smpi_mpi_sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1,
                  new_type, src, tag, comm, &status);
-    smpi_datatype_free(&new_type);
+    smpi_datatype_unuse(new_type);
 
     pof2 *= 2;
   }
 
     pof2 *= 2;
   }