Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try not to copy from outside of an array
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 11 Apr 2013 09:02:03 +0000 (11:02 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 11 Apr 2013 10:38:22 +0000 (12:38 +0200)
src/smpi/colls/reduce-scatter-gather.c

index 280e3e8..2c61d48 100644 (file)
@@ -41,7 +41,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
     send_ptr = (void *) xbt_malloc(new_count * extent);
     recv_ptr = (void *) xbt_malloc(new_count * extent);
     tmp_buf = (void *) xbt_malloc(new_count * extent);
-    memcpy(send_ptr, sendbuf, extent * new_count);
+    memcpy(send_ptr, sendbuf, extent * count);
 
     //if ((rank != root))
     smpi_mpi_sendrecv(send_ptr, new_count, datatype, rank, tag,