/* 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"
/* 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 "src/surf/surf_interface.hpp"
XBT_LOG_NEW_CATEGORY(sd, "Logging specific to SimDag");
#include "src/surf/surf_interface.hpp"
XBT_LOG_NEW_CATEGORY(sd, "Logging specific to SimDag");
- surf_action_t action = surf_model_extract_done_action_set(model);
- while (action != nullptr) {
- SD_task_t task = static_cast<SD_task_t>(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<SD_task_t>(action->get_data());
XBT_VERB("Task '%s' done", SD_task_get_name(task));
SD_task_set_state(task, SD_DONE);
XBT_VERB("Task '%s' done", SD_task_get_name(task));
SD_task_set_state(task, SD_DONE);
/* let's see which tasks have just failed */
action = surf_model_extract_failed_action_set(model);
while (action != nullptr) {
/* let's see which tasks have just failed */
action = surf_model_extract_failed_action_set(model);
while (action != nullptr) {
XBT_VERB("Task '%s' failed", SD_task_get_name(task));
SD_task_set_state(task, SD_FAILED);
sd_global->return_set->insert(task);
XBT_VERB("Task '%s' failed", SD_task_get_name(task));
SD_task_set_state(task, SD_FAILED);
sd_global->return_set->insert(task);
- xbt_cfg_setdefault_string("host/model", "ptask_L07");
- if(xbt_cfg_get_boolean("clean-atexit"))
+ simgrid::config::set_default<std::string>("host/model", "ptask_L07");
+ if (simgrid::config::get_value<bool>("clean-atexit"))
* Do --help on any simgrid binary to see the list of currently existing configuration variables, and
* see Section @ref options.
*
* Do --help on any simgrid binary to see the list of currently existing configuration variables, and
* see Section @ref options.
*
*/
void SD_config(const char *key, const char *value){
xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");
*/
void SD_config(const char *key, const char *value){
xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");
XBT_DEBUG("Host number: %zu, link number: %d", sg_host_count(), sg_link_count());
#if SIMGRID_HAVE_JEDULE
XBT_DEBUG("Host number: %zu, link number: %d", sg_host_count(), sg_link_count());
#if SIMGRID_HAVE_JEDULE