-/* Copyright (c) 2010-2014. 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
*/
#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++) {