A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a small bug-inducing test, for the previous fix.
[simgrid.git]
/
teshsuite
/
smpi
/
coll-allgather
/
coll-allgather.c
diff --git
a/teshsuite/smpi/coll-allgather/coll-allgather.c
b/teshsuite/smpi/coll-allgather/coll-allgather.c
index
22f4f9f
..
a6955de
100644
(file)
--- a/
teshsuite/smpi/coll-allgather/coll-allgather.c
+++ b/
teshsuite/smpi/coll-allgather/coll-allgather.c
@@
-8,6
+8,8
@@
#include <string.h>
#include <errno.h>
#include "mpi.h"
#include <string.h>
#include <errno.h>
#include "mpi.h"
+#include <time.h>
+#include "simgrid/actor.h"
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
@@
-15,6
+17,10
@@
int main(int argc, char *argv[])
int size;
int status;
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);
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);