Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Continuing work on datatypes
[simgrid.git] / src / smpi / colls / allreduce-smp-rsag.cpp
index bee18b2..1af6949 100644 (file)
@@ -42,7 +42,7 @@ int smpi_coll_tuned_allreduce_smp_rsag(void *send_buf, void *recv_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;
@@ -71,7 +71,7 @@ int smpi_coll_tuned_allreduce_smp_rsag(void *send_buf, void *recv_buf,
       //      if (src < ((inter_rank + 1) * num_core)) {
       if (src < comm_size) {
         Request::recv(tmp_buf, count, dtype, src, tag, comm, &status);
-        if(op!=MPI_OP_NULL) op->apply( tmp_buf, recv_buf, &count, &dtype);
+        if(op!=MPI_OP_NULL) op->apply( tmp_buf, recv_buf, &count, dtype);
         //printf("Node %d recv from node %d when mask is %d\n", rank, src, mask);
       }
     } else {
@@ -112,7 +112,7 @@ int smpi_coll_tuned_allreduce_smp_rsag(void *send_buf, void *recv_buf,
 
       // result is in rbuf
       if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *) recv_buf + recv_offset, &seg_count,
-                     &dtype);
+                     dtype);
     }
 
     // INTER: allgather