Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove another algorithm
[simgrid.git] / src / smpi / colls / allreduce-rab-rdb.c
index 0496c87..2c7b49b 100644 (file)
@@ -24,11 +24,7 @@ int smpi_coll_tuned_allreduce_rab_rdb(void *sbuff, void *rbuff, int count,
   MPI_Comm_rank(comm, &rank);
 
   MPI_Type_extent(dtype, &extent);
-  tmp_buf = (void *) malloc(count * extent);
-  if (!tmp_buf) {
-    printf("Could not allocate memory for tmp_buf\n");
-    return 1;
-  }
+  tmp_buf = (void *) xbt_malloc(count * extent);
 
   MPIR_Localcopy(sbuff, count, dtype, rbuff, count, dtype);
 
@@ -200,5 +196,5 @@ int smpi_coll_tuned_allreduce_rab_rdb(void *sbuff, void *rbuff, int count,
   }
 
   free(tmp_buf);
-  return 0;
+  return MPI_SUCCESS;
 }