X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/906984c33ede60c163c8ea919304e5d0a1548b4a..fa222c38f9b796be07ab4351ffc810a61a8fd705:/examples/msg/masterslave/masterslave_failure_platfgen.c diff --git a/examples/msg/masterslave/masterslave_failure_platfgen.c b/examples/msg/masterslave/masterslave_failure_platfgen.c index 718acd3acd..cec29c9258 100644 --- a/examples/msg/masterslave/masterslave_failure_platfgen.c +++ b/examples/msg/masterslave/masterslave_failure_platfgen.c @@ -1,11 +1,11 @@ -/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007-2010, 2012-2015. 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 -#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */ +#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */ #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ @@ -41,8 +41,8 @@ void promoter_1(context_node_t node) { static int master_choosen = FALSE; host_parameters.id = NULL; - host_parameters.power_peak = 25000000; - + host_parameters.power_peak = xbt_dynar_new(sizeof(double), NULL); + xbt_dynar_push_as(host_parameters.power_peak, double, 25000000.0); host_parameters.core_amount = 1; host_parameters.power_scale = 1; host_parameters.power_trace = NULL; @@ -125,7 +125,7 @@ int master(int argc, char *argv[]) slaves = xbt_new0(msg_host_t, slaves_count); for (i = 0; i < argc; i++) { - slaves[i] = MSG_get_host_by_name(argv[i]); + slaves[i] = MSG_host_by_name(argv[i]); if (slaves[i] == NULL) { XBT_INFO("Unknown host %s. Stopping Now! ", argv[i]); abort(); @@ -320,7 +320,7 @@ int main(int argc, char *argv[]) MSG_process_auto_restart_set(process, TRUE); hostname_list[i] = (char*) MSG_host_get_name(host); } - host_master = MSG_get_host_by_name("host_master"); + host_master = MSG_host_by_name("host_master"); MSG_process_create_with_arguments("master", master, NULL, host_master, xbt_dynar_length(host_dynar), hostname_list);