Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
extra check on actions
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 20 Feb 2018 21:20:33 +0000 (22:20 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 20 Feb 2018 21:20:33 +0000 (22:20 +0100)
if another model than ptaskL07 is used, it appears that some actions
are seen that are not attached to tasks. skipped them, simdag does
nothing with it.

src/simdag/sd_global.cpp

index 88656c0..44767bc 100644 (file)
@@ -57,7 +57,7 @@ std::set<SD_task_t>* 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) {
+      while (action != nullptr && action->getData() != nullptr) {
         SD_task_t task = static_cast<SD_task_t>(action->getData());
         XBT_VERB("Task '%s' done", SD_task_get_name(task));
         SD_task_set_state(task, SD_DONE);