Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leaks --, for a change
authordegomme <augustin.degomme@unibas.ch>
Tue, 26 Apr 2016 23:39:42 +0000 (01:39 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Tue, 26 Apr 2016 23:39:51 +0000 (01:39 +0200)
src/smpi/smpi_base.cpp
src/smpi/smpi_comm.cpp

index 4f8742e..1b0e4f4 100644 (file)
@@ -691,6 +691,7 @@ static void finish_wait(MPI_Request * request, MPI_Status * status)
       }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);
+          xbt_free(req->buf);
       }
     }
   }
       }
     }
   }
index e5370df..c7a50b4 100644 (file)
@@ -284,14 +284,13 @@ MPI_Comm smpi_comm_split(MPI_Comm comm, int color, int key)
       for(j = 0; j < count; j++) {
         if(rankmap[2 * j] != 0) {
           group_snd[reqs]=smpi_group_copy(group_out);
       for(j = 0; j < count; j++) {
         if(rankmap[2 * j] != 0) {
           group_snd[reqs]=smpi_group_copy(group_out);
-          requests[reqs] = smpi_isend_init(&(group_snd[reqs]), 1, MPI_PTR, rankmap[2 * j], system_tag, comm);
+          requests[reqs] = smpi_mpi_isend(&(group_snd[reqs]), 1, MPI_PTR, rankmap[2 * j], system_tag, comm);
           reqs++;
         }
       }
       if(i != 0) {
         smpi_group_destroy(group_out);
       }
           reqs++;
         }
       }
       if(i != 0) {
         smpi_group_destroy(group_out);
       }
-      smpi_mpi_startall(reqs, requests);
       smpi_mpi_waitall(reqs, requests, MPI_STATUS_IGNORE);
       xbt_free(requests);
     }
       smpi_mpi_waitall(reqs, requests, MPI_STATUS_IGNORE);
       xbt_free(requests);
     }