]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/allreduce-rab2.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[EXAMPLES] Added an example for the HostLoad plugin
[simgrid.git] / src / smpi / colls / allreduce-rab2.cpp
index 7e239e3f3930b864c741c2f1c5dcbcdbbb3e7aab..d11b9f20bbee371953f7f56a5c9758ccf764bd51 100644 (file)
@@ -30,7 +30,7 @@ int smpi_coll_tuned_allreduce_rab2(void *sbuff, void *rbuff,
   nprocs = comm->size();
 
 
-  s_extent = smpi_datatype_get_extent(dtype);
+  s_extent = dtype->get_extent();
 
   // uneven count
   if (count % nprocs) {
@@ -51,7 +51,7 @@ int smpi_coll_tuned_allreduce_rab2(void *sbuff, void *rbuff,
     memcpy(tmp, recv, nbytes);
 
     for (i = 1, s_offset = nbytes; i < nprocs; i++, s_offset = i * nbytes)
-      if(op!=MPI_OP_NULL) op->apply( (char *) recv + s_offset, tmp, &send_size, &dtype);
+      if(op!=MPI_OP_NULL) op->apply( (char *) recv + s_offset, tmp, &send_size, dtype);
 
     mpi_coll_allgather_fun(tmp, send_size, dtype, recv, send_size, dtype, comm);
     memcpy(rbuff, recv, count * s_extent);
@@ -73,7 +73,7 @@ int smpi_coll_tuned_allreduce_rab2(void *sbuff, void *rbuff,
 
     for (i = 1, s_offset = nbytes; i < nprocs; i++, s_offset = i * nbytes)
       if(op!=MPI_OP_NULL) op->apply( (char *) recv + s_offset, (char *) rbuff + r_offset,
-                     &send_size, &dtype);
+                     &send_size, dtype);
 
     mpi_coll_allgather_fun((char *) rbuff + r_offset, send_size, dtype, rbuff, send_size,
                   dtype, comm);