Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove algorithm bcast-TSB.
[simgrid.git] / src / smpi / colls / allreduce-smp-binomial.c
index c73a6c6..cf68dfb 100644 (file)
@@ -1,4 +1,4 @@
-#include "colls.h"
+#include "colls_private.h"
 /* IMPLEMENTED BY PITCH PATARASUK 
    Non-topoloty-specific (however, number of cores/node need to be changed) 
    all-reduce operation designed for smp clusters
@@ -51,7 +51,7 @@ int smpi_coll_tuned_allreduce_smp_binomial(void *send_buf, void *recv_buf,
   rank=smpi_comm_rank(comm);
   MPI_Aint extent, lb;
   smpi_datatype_extent(dtype, &lb, &extent);
-  tmp_buf = (void *) malloc(count * extent);
+  tmp_buf = (void *) xbt_malloc(count * extent);
 
   /* compute intra and inter ranking */
   int intra_rank, inter_rank;
@@ -73,7 +73,7 @@ int smpi_coll_tuned_allreduce_smp_binomial(void *send_buf, void *recv_buf,
       src = (inter_rank * num_core) + (intra_rank | mask);
       if (src < comm_size) {
         smpi_mpi_recv(tmp_buf, count, dtype, src, tag, comm, &status);
-        star_reduction(op, tmp_buf, recv_buf, &count, &dtype);
+        smpi_op_apply(op, tmp_buf, recv_buf, &count, &dtype);
       }
     } else {
       dst = (inter_rank * num_core) + (intra_rank & (~mask));
@@ -92,7 +92,7 @@ int smpi_coll_tuned_allreduce_smp_binomial(void *send_buf, void *recv_buf,
         src = (inter_rank | mask) * num_core;
         if (src < comm_size) {
           smpi_mpi_recv(tmp_buf, count, dtype, src, tag, comm, &status);
-          star_reduction(op, tmp_buf, recv_buf, &count, &dtype);
+          smpi_op_apply(op, tmp_buf, recv_buf, &count, &dtype);
         }
       } else {
         dst = (inter_rank & (~mask)) * num_core;