-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* used to classify tasks. When the program is executed, the tracing mechanism registers
* the resource utilization of hosts and links according to these categories. You might
* want to run this program with the following parameters:
- * --cfg=tracing:1
- * --cfg=tracing/categorized:1
- * --cfg=tracing/uncategorized:1
- * --cfg=triva/categorized:triva_cat.plist
- * --cfg=triva/uncategorized:triva_uncat.plist
+ * --cfg=tracing:yes
+ * --cfg=tracing/categorized:yes
+ * --cfg=tracing/uncategorized:yes
+ * --cfg=viva/categorized:viva_cat.plist
+ * --cfg=viva/uncategorized:viva_uncat.plist
* (See \ref tracing_tracing_options for details)
*/
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
int master(int argc, char *argv[]);
int slave(int argc, char *argv[]);
-/** Emitter function */
+/** sender function */
int master(int argc, char *argv[])
{
- long number_of_tasks = atol(argv[1]);
- long slaves_count = atol(argv[4]);
+ long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
+ long slaves_count = xbt_str_parse_int(argv[4], "Invalid amount of slaves: %s");
int i;
for (i = 0; i < number_of_tasks; i++) {