X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/697e297f282dd1c06b0848d7bcbefd087f8d8730..985cb4f936f5d78428b12093010b8a99a6c31187:/src/simdag/sd_global.cpp?ds=sidebyside diff --git a/src/simdag/sd_global.cpp b/src/simdag/sd_global.cpp index 44767bcff1..cf67f8cc1f 100644 --- a/src/simdag/sd_global.cpp +++ b/src/simdag/sd_global.cpp @@ -1,12 +1,13 @@ -/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2018. 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 "simdag_private.hpp" +#include "simgrid/kernel/resource/Action.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/sg_config.h" -#include "src/include/instr/instr_interface.h" +#include "simgrid/sg_config.hpp" +#include "src/include/instr/instr_interface.hpp" #include "src/surf/surf_interface.hpp" XBT_LOG_NEW_CATEGORY(sd, "Logging specific to SimDag"); @@ -56,9 +57,9 @@ std::set* simulate(double how_long){ /* let's see which tasks are done */ for (auto const& model : *all_existing_models) { - surf_action_t action = surf_model_extract_done_action_set(model); - while (action != nullptr && action->getData() != nullptr) { - SD_task_t task = static_cast(action->getData()); + simgrid::kernel::resource::Action* action = surf_model_extract_done_action_set(model); + while (action != nullptr && action->get_data() != nullptr) { + SD_task_t task = static_cast(action->get_data()); XBT_VERB("Task '%s' done", SD_task_get_name(task)); SD_task_set_state(task, SD_DONE); @@ -108,7 +109,7 @@ std::set* simulate(double how_long){ /* let's see which tasks have just failed */ action = surf_model_extract_failed_action_set(model); while (action != nullptr) { - SD_task_t task = static_cast(action->getData()); + SD_task_t task = static_cast(action->get_data()); XBT_VERB("Task '%s' failed", SD_task_get_name(task)); SD_task_set_state(task, SD_FAILED); sd_global->return_set->insert(task); @@ -160,8 +161,8 @@ void SD_init_nocheck(int *argc, char **argv) surf_init(argc, argv); - xbt_cfg_setdefault_string("host/model", "ptask_L07"); - if(xbt_cfg_get_boolean("clean-atexit")) + simgrid::config::set_default("host/model", "ptask_L07"); + if (simgrid::config::get_value("clean-atexit")) atexit(SD_exit); if (_sg_cfg_exit_asap) { exit(0);