-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2023. 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. */
#include "simgrid/engine.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#include <stdio.h>
static void sender(int argc, char* argv[])
{
xbt_assert(argc == 5, "The sender function expects 4 arguments from the XML deployment file");
- long messages_count = xbt_str_parse_int(argv[1], "Invalid amount of messages: %s"); /* - number of messages */
- double message_size = xbt_str_parse_double(argv[2], "Invalid message size: %s"); /* - communication cost */
- double sleep_start_time = xbt_str_parse_double(argv[3], "Invalid sleep start time: %s"); /* - start time */
- double sleep_test_time = xbt_str_parse_double(argv[4], "Invalid test time: %s"); /* - test time */
+ long messages_count = xbt_str_parse_int(argv[1], "Invalid amount of messages"); /* - number of messages */
+ long message_size = xbt_str_parse_int(argv[2], "Invalid message size"); /* - communication cost */
+ double sleep_start_time = xbt_str_parse_double(argv[3], "Invalid sleep start time"); /* - start time */
+ double sleep_test_time = xbt_str_parse_double(argv[4], "Invalid test time"); /* - test time */
XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time, sleep_test_time);
sg_mailbox_t mailbox = sg_mailbox_by_name("receiver");
static void receiver(int argc, char* argv[])
{
xbt_assert(argc == 3, "The relay_runner function does not accept any parameter from the XML deployment file");
- double sleep_start_time = xbt_str_parse_double(argv[1], "Invalid sleep start parameter: %s"); /* - start time */
- double sleep_test_time = xbt_str_parse_double(argv[2], "Invalid sleep test parameter: %s"); /* - test time */
+ double sleep_start_time = xbt_str_parse_double(argv[1], "Invalid sleep start parameter"); /* - start time */
+ double sleep_test_time = xbt_str_parse_double(argv[2], "Invalid sleep test parameter"); /* - test time */
XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time, sleep_test_time);
sg_actor_sleep_for(sleep_start_time); /* This actor first sleeps for "start time" seconds. */
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]); /* - Load the platform description */