Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / examples / c / platform-failures / platform-failures.c
index 527048a..0478d6e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -10,9 +10,9 @@
 #include "simgrid/host.h"
 #include "simgrid/mailbox.h"
 
-#include "xbt/asserts.h"
 #include "xbt/log.h"
 #include "xbt/str.h"
+#include "xbt/sysdep.h"
 
 #include <stdio.h> /* snprintf */
 
@@ -23,10 +23,10 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(platform_failures, "Messages specific for this exam
 static void master(int argc, char* argv[])
 {
   xbt_assert(argc == 5);
-  long number_of_tasks  = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
-  double task_comp_size = xbt_str_parse_double(argv[2], "Invalid computational size: %s");
-  long task_comm_size   = xbt_str_parse_int(argv[3], "Invalid communication size: %s");
-  long workers_count    = xbt_str_parse_int(argv[4], "Invalid amount of workers: %s");
+  long number_of_tasks  = xbt_str_parse_int(argv[1], "Invalid amount of tasks");
+  double task_comp_size = xbt_str_parse_double(argv[2], "Invalid computational size");
+  long task_comm_size   = xbt_str_parse_int(argv[3], "Invalid communication size");
+  long workers_count    = xbt_str_parse_int(argv[4], "Invalid amount of workers");
 
   XBT_INFO("Got %ld workers and %ld tasks to process", workers_count, number_of_tasks);
 
@@ -90,7 +90,7 @@ static void worker(int argc, char* argv[])
 {
   xbt_assert(argc == 2);
   char mailbox_name[80];
-  long id = xbt_str_parse_int(argv[1], "Invalid argument %s");
+  long id = xbt_str_parse_int(argv[1], "Invalid argument");
 
   snprintf(mailbox_name, 79, "worker-%ld", id);
   sg_mailbox_t mailbox = sg_mailbox_by_name(mailbox_name);
@@ -123,7 +123,7 @@ int main(int argc, char* argv[])
   simgrid_init(&argc, argv);
   xbt_assert(argc > 2,
              "Usage: %s platform_file deployment_file\n"
-             "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+             "\tExample: %s platform.xml deployment.xml\n",
              argv[0], argv[0]);
 
   simgrid_load_platform(argv[1]);