Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Requalify automatic tesh, as another algorithm is used in init_smp now.
[simgrid.git] / teshsuite / smpi / coll-allreduce / coll-allreduce.c
index a15eb60..c65fa92 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
+/* Copyright (c) 2009-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@ int main(int argc, char *argv[])
   MPI_Comm_size(MPI_COMM_WORLD, &size);
   if (maxlen > 1)
     mult = maxlen > size ? size : maxlen;
-  int* sb = (int *) xbt_malloc(size *maxlen * sizeof(int));
-  int* rb = (int *) xbt_malloc(size *maxlen * sizeof(int));
+  int* sb = xbt_new0(int, size * maxlen);
+  int* rb = xbt_new0(int, size * maxlen);
 
   for (i = 0; i < size *maxlen; ++i) {
     sb[i] = rank*size + i;