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
Make the pmm robust to the change of amount of slaves
[simgrid.git]
/
examples
/
gras
/
pmm
/
pmm.c
diff --git
a/examples/gras/pmm/pmm.c
b/examples/gras/pmm/pmm.c
index
624eb3b
..
7e7d35d
100644
(file)
--- a/
examples/gras/pmm/pmm.c
+++ b/
examples/gras/pmm/pmm.c
@@
-115,11
+115,11
@@
int master(int argc, char *argv[])
/* friends, we're ready. Come and play */
INFO0("Wait for peers for 2 sec");
gras_msg_handleall(2);
/* friends, we're ready. Come and play */
INFO0("Wait for peers for 2 sec");
gras_msg_handleall(2);
-
while (xbt_dynar_length(peers) < 9)
{
- INFO
1("Got only %ld pals
. Wait 2 more seconds",
-
xbt_dynar_length(peers)
);
+
do
{
+ INFO
2("Got only %ld pals (of %d)
. Wait 2 more seconds",
+
xbt_dynar_length(peers),SLAVE_COUNT
);
gras_msg_handleall(2);
gras_msg_handleall(2);
- }
+ }
while (xbt_dynar_length(peers) < SLAVE_COUNT);
INFO1("Good. Got %ld pals", xbt_dynar_length(peers));
for (i = 0; i < xbt_dynar_length(peers) && i < SLAVE_COUNT; i++) {
INFO1("Good. Got %ld pals", xbt_dynar_length(peers));
for (i = 0; i < xbt_dynar_length(peers) && i < SLAVE_COUNT; i++) {