Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leaks again
authordegomme <augustin.degomme@unibas.ch>
Tue, 26 Apr 2016 14:06:57 +0000 (16:06 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Tue, 26 Apr 2016 15:15:50 +0000 (17:15 +0200)
src/smpi/smpi_base.cpp
src/smpi/smpi_rma.cpp

index 62699a1..4f8742e 100644 (file)
@@ -687,7 +687,7 @@ static void finish_wait(MPI_Request * request, MPI_Status * status)
         if(req->flags & RECV)
           subtype->unserialize(req->buf, req->old_buf, req->real_size/smpi_datatype_size(datatype) ,
                                datatype->substruct, req->op);
         if(req->flags & RECV)
           subtype->unserialize(req->buf, req->old_buf, req->real_size/smpi_datatype_size(datatype) ,
                                datatype->substruct, req->op);
-        if(req->detached == 0) free(req->buf);
+        xbt_free(req->buf);
       }else if(req->flags & RECV){//apply op on contiguous buffer for accumulate
           int n =req->real_size/smpi_datatype_size(datatype);
           smpi_op_apply(req->op, req->buf, req->old_buf, &n, &datatype);
       }else if(req->flags & RECV){//apply op on contiguous buffer for accumulate
           int n =req->real_size/smpi_datatype_size(datatype);
           smpi_op_apply(req->op, req->buf, req->old_buf, &n, &datatype);
index 98d3ae5..0514b83 100644 (file)
@@ -355,6 +355,7 @@ int smpi_mpi_win_complete(MPI_Win win){
   win->requests=xbt_dynar_new(sizeof(MPI_Request), NULL);
   smpi_mpi_waitall(size,treqs,MPI_STATUSES_IGNORE);
   xbt_free(treqs);
   win->requests=xbt_dynar_new(sizeof(MPI_Request), NULL);
   smpi_mpi_waitall(size,treqs,MPI_STATUSES_IGNORE);
   xbt_free(treqs);
+  smpi_group_unuse(win->group);
   win->opened--; //we're closed for business !
   return MPI_SUCCESS;
 }
   win->opened--; //we're closed for business !
   return MPI_SUCCESS;
 }
@@ -404,6 +405,7 @@ int smpi_mpi_win_wait(MPI_Win win){
   win->requests=xbt_dynar_new(sizeof(MPI_Request), NULL);
   smpi_mpi_waitall(size,treqs,MPI_STATUSES_IGNORE);
   xbt_free(treqs);
   win->requests=xbt_dynar_new(sizeof(MPI_Request), NULL);
   smpi_mpi_waitall(size,treqs,MPI_STATUSES_IGNORE);
   xbt_free(treqs);
+  smpi_group_unuse(win->group);
   win->opened--; //we're opened for business !
   return MPI_SUCCESS;
 }
   win->opened--; //we're opened for business !
   return MPI_SUCCESS;
 }