X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0c56e9ba0d24d9c85d33a22556f10b5c097a6f28..ca82f90e6d610b6bb3b038cd9ee48d378cc8a909:/teshsuite/smpi/bug-17132/bug-17132.c diff --git a/teshsuite/smpi/bug-17132/bug-17132.c b/teshsuite/smpi/bug-17132/bug-17132.c index 469066b747..673f567c3b 100644 --- a/teshsuite/smpi/bug-17132/bug-17132.c +++ b/teshsuite/smpi/bug-17132/bug-17132.c @@ -1,20 +1,16 @@ -/* Copyright (c) 2014. The SimGrid Team. +/* Copyright (c) 2014-2019. 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. */ /* Bug report: https://gforge.inria.fr/tracker/index.php?func=detail&aid=17132&group_id=12&atid=165 */ - -#include "xbt/log.h" + #include #include -XBT_LOG_NEW_DEFAULT_CATEGORY(MM_mpi, "Messages for this SMPI test"); - int main(int argc, char ** argv) { - size_t err; size_t M = 8*1024; size_t N = 32*1024; @@ -27,9 +23,11 @@ int main(int argc, char ** argv) double *b = malloc(sizeof(double) * N); // A broadcast - err = MPI_Bcast(a, M, MPI_DOUBLE, 0, MPI_COMM_WORLD); + size_t err = MPI_Bcast(a, M, MPI_DOUBLE, 0, MPI_COMM_WORLD); if (err != MPI_SUCCESS) { - perror("Error Bcast A\n"); MPI_Finalize(); exit(-1); + perror("Error Bcast A\n"); + MPI_Finalize(); + exit(-1); } // Uncommenting this barrier fixes it! @@ -38,7 +36,9 @@ int main(int argc, char ** argv) // Another broadcast err = MPI_Bcast(b, N, MPI_DOUBLE, 0, MPI_COMM_WORLD ); if (err != MPI_SUCCESS) { - perror("Error Bcast B\n"); MPI_Finalize(); exit(-1); + perror("Error Bcast B\n"); + MPI_Finalize(); + exit(-1); } // Commenting out this barrier fixes it!!