Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cut the backtrace displayed from sthread to the sthread_create to hide useless cruft
[simgrid.git] / teshsuite / smpi / coll-allgather / coll-allgather.c
index a6955de..2ca914c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2023. 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. */
@@ -17,8 +17,7 @@ int main(int argc, char *argv[])
   int size;
   int status;
 
-  srand(sg_actor_self_get_pid());
-  int randomTime = rand() %5;
+  int randomTime = sg_actor_self_get_pid() % 5;
   sleep(randomTime);
 
   MPI_Init(&argc, &argv);