X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0c13871d73e933c1847faf8debea7b7745a3ff44..61e948b810774df0ab0a52dd60ca1fb16af658c5:/examples/simdag/sd_avail.c?ds=sidebyside diff --git a/examples/simdag/sd_avail.c b/examples/simdag/sd_avail.c index 096bc08892..d0ff07815b 100644 --- a/examples/simdag/sd_avail.c +++ b/examples/simdag/sd_avail.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012. The SimGrid Team. +/* Copyright (c) 2012-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" @@ -45,13 +45,13 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(sd_avail, int main(int argc, char **argv) { unsigned int ctr; - const SD_workstation_t *workstations; + const sg_host_t *workstations; SD_task_t t1, c1, t2, c2, t3, c3, t4, task; xbt_dynar_t changed_tasks; SD_init(&argc, argv); SD_create_environment(argv[1]); - workstations = SD_workstation_get_list(); + workstations = sg_host_list(); t1 = SD_task_create_comp_seq("t1", NULL, 25000000); c1 = SD_task_create_comm_e2e("c1", NULL, 125000000); @@ -87,14 +87,14 @@ int main(int argc, char **argv) while (!xbt_dynar_is_empty((changed_tasks = SD_simulate(-1.0)))) { XBT_INFO("link1: bw=%.0f, lat=%f", - SD_route_get_current_bandwidth(workstations[0], workstations[1]), - SD_route_get_current_latency(workstations[0], workstations[1])); - XBT_INFO("Jupiter: power=%.0f", - SD_workstation_get_power(workstations[0])* - SD_workstation_get_available_power(workstations[0])); - XBT_INFO("Tremblay: power=%.0f", - SD_workstation_get_power(workstations[1])* - SD_workstation_get_available_power(workstations[1])); + SD_route_get_bandwidth(workstations[0], workstations[1]), + SD_route_get_latency(workstations[0], workstations[1])); + XBT_INFO("Jupiter: speed=%.0f", + sg_host_speed(workstations[0])* + sg_host_get_available_speed(workstations[0])); + XBT_INFO("Tremblay: speed=%.0f", + sg_host_speed(workstations[1])* + sg_host_get_available_speed(workstations[1])); xbt_dynar_foreach(changed_tasks, ctr, task) { XBT_INFO("Task '%s' start time: %f, finish time: %f", SD_task_get_name(task),