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
Enforce "Rule-of-Three/Five".
[simgrid.git]
/
examples
/
s4u
/
dht-kademlia
/
s4u-dht-kademlia.cpp
diff --git
a/examples/s4u/dht-kademlia/s4u-dht-kademlia.cpp
b/examples/s4u/dht-kademlia/s4u-dht-kademlia.cpp
index
89edd85
..
29d8d2b
100644
(file)
--- a/
examples/s4u/dht-kademlia/s4u-dht-kademlia.cpp
+++ b/
examples/s4u/dht-kademlia/s4u-dht-kademlia.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2012-201
8
. The SimGrid Team.
+/* Copyright (c) 2012-201
9
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-40,11
+40,11
@@
static int node(int argc, char* argv[])
if (join_success) {
XBT_VERB("Ok, I'm joining the network with id %u", node->getId());
// We start the main loop
if (join_success) {
XBT_VERB("Ok, I'm joining the network with id %u", node->getId());
// We start the main loop
- double next_lookup_time = simgrid::s4u::Engine::get_clock() +
random_lookup_interval
;
+ double next_lookup_time = simgrid::s4u::Engine::get_clock() +
RANDOM_LOOKUP_INTERVAL
;
XBT_VERB("Main loop start");
XBT_VERB("Main loop start");
- simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::by
N
ame(std::to_string(node->getId()));
+ simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::by
_n
ame(std::to_string(node->getId()));
while (simgrid::s4u::Engine::get_clock() < deadline) {
if (node->receive_comm == nullptr)
while (simgrid::s4u::Engine::get_clock() < deadline) {
if (node->receive_comm == nullptr)
@@
-64,7
+64,7
@@
static int node(int argc, char* argv[])
/* We search for a pseudo random node */
if (simgrid::s4u::Engine::get_clock() >= next_lookup_time) {
node->randomLookup();
/* We search for a pseudo random node */
if (simgrid::s4u::Engine::get_clock() >= next_lookup_time) {
node->randomLookup();
- next_lookup_time +=
random_lookup_interval
;
+ next_lookup_time +=
RANDOM_LOOKUP_INTERVAL
;
} else {
// Didn't get a message: sleep for a while...
simgrid::s4u::this_actor::sleep_for(1);
} else {
// Didn't get a message: sleep for a while...
simgrid::s4u::this_actor::sleep_for(1);
@@
-87,7
+87,8
@@
int main(int argc, char* argv[])
simgrid::s4u::Engine e(&argc, argv);
/* Check the arguments */
simgrid::s4u::Engine e(&argc, argv);
/* Check the arguments */
- xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n\tExample: %s cluster.xml dht-kademlia_d.xml\n",
+ xbt_assert(argc > 2,
+ "Usage: %s platform_file deployment_file\n\tExample: %s cluster_backbone.xml dht-kademlia_d.xml\n",
argv[0], argv[0]);
e.load_platform(argv[1]);
argv[0], argv[0]);
e.load_platform(argv[1]);