Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[EXAMPLES] Added an example for the HostLoad plugin
[simgrid.git] / src / smpi / colls / allreduce-smp-binomial-pipeline.cpp
index efc2f27..d0255a5 100644 (file)
@@ -59,7 +59,7 @@ int smpi_coll_tuned_allreduce_smp_binomial_pipeline(void *send_buf,
   comm_size = comm->size();
   rank = comm->rank();
   MPI_Aint extent;
-  extent = smpi_datatype_get_extent(dtype);
+  extent = dtype->get_extent();
   tmp_buf = (void *) smpi_get_tmp_sendbuffer(count * extent);
 
   int intra_rank, inter_rank;
@@ -99,7 +99,7 @@ int smpi_coll_tuned_allreduce_smp_binomial_pipeline(void *send_buf,
           if (src < comm_size) {
             recv_offset = phase * pcount * extent;
             Request::recv(tmp_buf, pcount, dtype, src, tag, comm, &status);
-            smpi_op_apply(op, tmp_buf, (char *)recv_buf + recv_offset, &pcount, &dtype);
+            if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *)recv_buf + recv_offset, &pcount, dtype);
           }
         } else {
           send_offset = phase * pcount * extent;
@@ -123,7 +123,7 @@ int smpi_coll_tuned_allreduce_smp_binomial_pipeline(void *send_buf,
             if (src < comm_size) {
               recv_offset = (phase - 1) * pcount * extent;
               Request::recv(tmp_buf, pcount, dtype, src, tag, comm, &status);
-              smpi_op_apply(op, tmp_buf, (char *)recv_buf + recv_offset, &pcount, &dtype);
+              if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *)recv_buf + recv_offset, &pcount, dtype);
             }
           } else {
             dst = (inter_rank & (~mask)) * num_core;