Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a small bug-inducing test, for the previous fix.
[simgrid.git] / teshsuite / smpi / coll-allgather / coll-allgather.c
index 22f4f9f..a6955de 100644 (file)
@@ -8,6 +8,8 @@
 #include <string.h>
 #include <errno.h>
 #include "mpi.h"
+#include <time.h>
+#include "simgrid/actor.h"
 
 int main(int argc, char *argv[])
 {
@@ -15,6 +17,10 @@ int main(int argc, char *argv[])
   int size;
   int status;
 
+  srand(sg_actor_self_get_pid());
+  int randomTime = rand() %5;
+  sleep(randomTime);
+
   MPI_Init(&argc, &argv);
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
   MPI_Comm_size(MPI_COMM_WORLD, &size);