Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
avoid warning by checking index in the right order
[simgrid.git] / src / smpi / colls / allreduce-rab2.c
index ca1dee9..3643321 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "colls_private.h"
 //#include <star-reduction.c>
 
@@ -45,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)
-      star_reduction(op, (char *) recv + s_offset, tmp, &send_size, &dtype);
+      smpi_op_apply(op, (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);
@@ -66,7 +72,7 @@ int smpi_coll_tuned_allreduce_rab2(void *sbuff, void *rbuff,
     memcpy((char *) rbuff + r_offset, recv, nbytes);
 
     for (i = 1, s_offset = nbytes; i < nprocs; i++, s_offset = i * nbytes)
-      star_reduction(op, (char *) recv + s_offset, (char *) rbuff + r_offset,
+      smpi_op_apply(op, (char *) recv + s_offset, (char *) rbuff + r_offset,
                      &send_size, &dtype);
 
     mpi_coll_allgather_fun((char *) rbuff + r_offset, send_size, dtype, rbuff, send_size,