From a1757b8e6b03369034f2d251bcffc37e61a3c20a Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 26 Nov 2010 14:28:56 +0000 Subject: [PATCH] small fixes to output so that RL works again git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8674 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/gras/pmm/pmm.c | 7 +++---- examples/gras/pmm/pmm.xml | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/gras/pmm/pmm.c b/examples/gras/pmm/pmm.c index 7e7d35d32d..820568951a 100644 --- a/examples/gras/pmm/pmm.c +++ b/examples/gras/pmm/pmm.c @@ -10,7 +10,7 @@ #include "xbt/matrix.h" #include "amok/peermanagement.h" -#define PROC_MATRIX_SIZE 2 +#define PROC_MATRIX_SIZE 3 #define NEIGHBOR_COUNT PROC_MATRIX_SIZE - 1 #define SLAVE_COUNT (PROC_MATRIX_SIZE*PROC_MATRIX_SIZE) @@ -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); - do { + while (xbt_dynar_length(peers) < SLAVE_COUNT) { INFO2("Got only %ld pals (of %d). Wait 2 more seconds", xbt_dynar_length(peers),SLAVE_COUNT); 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++) { @@ -415,7 +415,6 @@ int slave(int argc, char *argv[]) gras_os_sleep(0.5); } } - INFO2("Connected to master: %s:%d",gras_socket_peer_name(master),gras_socket_peer_port(master)); /* Join and run the group */ rank = amok_pm_group_join(master, "pmm"); diff --git a/examples/gras/pmm/pmm.xml b/examples/gras/pmm/pmm.xml index 687aa8e567..69e2ab2d40 100644 --- a/examples/gras/pmm/pmm.xml +++ b/examples/gras/pmm/pmm.xml @@ -10,10 +10,9 @@ - -- 2.20.1