Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stop using internal header files from the examples, it won't work for users
[simgrid.git] / examples / msg / chord / chord.c
index e916d85..9995fb6 100644 (file)
@@ -9,9 +9,7 @@
 #include "msg/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
-#include "mc/modelchecker.h"
-#include "mc/mc.h"
-#include "xbt/xbt_os_time.h"
+#include "simgrid/modelchecker.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_chord,
                              "Messages specific for this msg example");
@@ -145,7 +143,7 @@ static int normalize(int id)
 }
 
 /**
- * \brief Returns whether a id belongs to the interval [start, end].
+ * \brief Returns whether an id belongs to the interval [start, end].
  *
  * The parameters are noramlized to make sure they are between 0 and nb_keys - 1).
  * 1 belongs to [62, 3]
@@ -876,14 +874,13 @@ static void random_lookup(node_t node)
  */
 int main(int argc, char *argv[])
 {
+  MSG_global_init(&argc, argv);
   if (argc < 3) {
     printf("Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n", argv[0]);
     printf("example: %s ../msg_platform.xml chord.xml\n", argv[0]);
     exit(1);
   }
 
-  MSG_global_init(&argc, argv);
-
   char **options = &argv[1];
   while (!strncmp(options[0], "-", 1)) {
 
@@ -911,7 +908,6 @@ int main(int argc, char *argv[])
 
   chord_initialize();
 
-  MSG_set_channel_number(0);
   MSG_create_environment(platform_file);
 
   MSG_function_register("node", node);