Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Please sonar about unsecure usage of rand().
[simgrid.git] / teshsuite / smpi / coll-allgather / coll-allgather.c
index a6955de..7134a58 100644 (file)
@@ -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);