From: Marion Guthmuller Date: Mon, 5 Aug 2013 15:45:45 +0000 (+0200) Subject: disable random lookup in Chord (tesh examples fail) X-Git-Tag: v3_9_90~128^2~33 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e0692a4cd5fbd9e7ad3e2ff7a088030846421f61 disable random lookup in Chord (tesh examples fail) --- diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index a433608577..09c455f5a3 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -987,14 +987,19 @@ static void check_predecessor(node_t node) */ static void random_lookup(node_t node) { - //int id = 1337; // TODO pick a pseudorandom id - if(node->stream == NULL) + + int id = 1337; + find_successor(node, id); + + /*** Random lookup disabled for tesh examples ***/ + /*if(node->stream == NULL) node->stream = RngStream_CreateStream(""); int random_index = RngStream_RandInt (node->stream, 0, nb_bits - 1); int random_id = node->fingers[random_index].id; XBT_DEBUG("Making a lookup request for id %d", random_id); int res = find_successor(node, random_id); - XBT_DEBUG("The successor of node %d is %d", random_id, res); + XBT_DEBUG("The successor of node %d is %d", random_id, res);*/ + } /** diff --git a/examples/msg/chord/chord.tesh b/examples/msg/chord/chord.tesh index 16a5ac5a7c..e2c44d903b 100644 --- a/examples/msg/chord/chord.tesh +++ b/examples/msg/chord/chord.tesh @@ -2973,5 +2973,4 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster. > [ 987.000000] (6:node@c-5.me) 2486268 | 10874876 > [ 987.000000] (6:node@c-5.me) Predecessor: 10004760 > [1196.000000] (0:@) Messages created: 1827 -> [1196.000000] (0:@) Simulated time: 1196 - +> [1196.000000] (0:@) Simulated time: 1196 \ No newline at end of file