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

Public GIT Repository
[EXAMPLES] Added an example for the HostLoad plugin
[simgrid.git] / src / smpi / colls / alltoall-bruck.cpp
index 903931ba37b08b5e443c4640c0368782e44a4284..9c0e30cd2ae6117303e246401b6e1935a01df69c 100644 (file)
@@ -46,18 +46,18 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count,
   num_procs = comm->size();
   rank = comm->rank();
 
-  extent = smpi_datatype_get_extent(recv_type);
+  extent = recv_type->get_extent();
 
   tmp_buff = (char *) smpi_get_tmp_sendbuffer(num_procs * recv_count * extent);
   disps = (int *) xbt_malloc(sizeof(int) * num_procs);
   blocks_length = (int *) xbt_malloc(sizeof(int) * num_procs);
 
-  smpi_mpi_sendrecv(send_ptr + rank * send_count * extent,
+  Request::sendrecv(send_ptr + rank * send_count * extent,
                (num_procs - rank) * send_count, send_type, rank, tag,
                recv_ptr, (num_procs - rank) * recv_count, recv_type, rank,
                tag, comm, &status);
 
-  smpi_mpi_sendrecv(send_ptr, rank * send_count, send_type, rank, tag,
+  Request::sendrecv(send_ptr, rank * send_count, send_type, rank, tag,
                recv_ptr + (num_procs - rank) * recv_count * extent,
                rank * recv_count, recv_type, rank, tag, comm, &status);
 
@@ -84,9 +84,9 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count,
     position = 0;
     MPI_Pack(recv_buff, 1, new_type, tmp_buff, pack_size, &position, comm);
 
-    smpi_mpi_sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1,
+    Request::sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1,
                  new_type, src, tag, comm, &status);
-    smpi_datatype_unuse(new_type);
+    Datatype::unref(new_type);
 
     pof2 *= 2;
   }
@@ -94,18 +94,18 @@ smpi_coll_tuned_alltoall_bruck(void *send_buff, int send_count,
   free(disps);
   free(blocks_length);
 
-  smpi_mpi_sendrecv(recv_ptr + (rank + 1) * recv_count * extent,
+  Request::sendrecv(recv_ptr + (rank + 1) * recv_count * extent,
                (num_procs - rank - 1) * recv_count, send_type,
                rank, tag, tmp_buff, (num_procs - rank - 1) * recv_count,
                recv_type, rank, tag, comm, &status);
 
-  smpi_mpi_sendrecv(recv_ptr, (rank + 1) * recv_count, send_type, rank, tag,
+  Request::sendrecv(recv_ptr, (rank + 1) * recv_count, send_type, rank, tag,
                tmp_buff + (num_procs - rank - 1) * recv_count * extent,
                (rank + 1) * recv_count, recv_type, rank, tag, comm, &status);
 
 
   for (i = 0; i < num_procs; i++)
-    smpi_mpi_sendrecv(tmp_buff + i * recv_count * extent, recv_count, send_type,
+    Request::sendrecv(tmp_buff + i * recv_count * extent, recv_count, send_type,
                  rank, tag,
                  recv_ptr + (num_procs - i - 1) * recv_count * extent,
                  recv_count, recv_type, rank, tag, comm, &status);