From: suter Date: Thu, 31 Jan 2013 09:55:33 +0000 (+0100) Subject: Warn the user that declaring explicitly 'root' and/or 'end' task in X-Git-Tag: v3_9_90~579 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a1fa356c9f8e75f033848056bc46933b3295500a Warn the user that declaring explicitly 'root' and/or 'end' task in the DOT file will be ignored. These two tasks have to be dummy ones and are overwritten anyway. Add debug --- diff --git a/src/simdag/sd_dotloader.c b/src/simdag/sd_dotloader.c index 60b9f7517f..6c39d6cd29 100644 --- a/src/simdag/sd_dotloader.c +++ b/src/simdag/sd_dotloader.c @@ -105,11 +105,14 @@ static void dot_task_p_free(void *task) static void TRACE_sd_dotloader (SD_task_t task, const char *category) { - if (category){ - if (strlen (category) != 0){ - TRACE_category (category); - SD_task_set_category (task, category); - } + if (category && strlen (category)){ + if (task->category) + XBT_DEBUG("Change the category of %s from %s to %s", + task->name, task->category, category); + else + XBT_DEBUG("Set the category of %s to %s",task->name, category); + TRACE_category (category); + TRACE_sd_set_task_category(task, category); } } @@ -376,6 +379,15 @@ void dot_add_parallel_task(Agnode_t * dag_node) XBT_DEBUG("See ", name, agget(dag_node, (char *) "size"), amount, alpha); + if (!strcmp(name, "root")){ + XBT_WARN("'root' node is explicitly declared in the DOT file. Ignore it"); + return; + } + if (!strcmp(name, "end")){ + XBT_WARN("'end' node is explicitly declared in the DOT file. Ignore it"); + return; + } + current_job = xbt_dict_get_or_null(jobs, name); if (current_job == NULL) { current_job = @@ -417,12 +429,20 @@ void dot_add_task(Agnode_t * dag_node) XBT_DEBUG("See ", name, agget(dag_node, (char *) "size"), runtime); + if (!strcmp(name, "root")){ + XBT_WARN("'root' node is explicitly declared in the DOT file. Ignore it"); + return; + } + if (!strcmp(name, "end")){ + XBT_WARN("'end' node is explicitly declared in the DOT file. Ignore it"); + return; + } current_job = xbt_dict_get_or_null(jobs, name); if (current_job == NULL) { current_job = SD_task_create_comp_seq(name, NULL , runtime); #ifdef HAVE_TRACING - TRACE_sd_dotloader (current_job, agget (dag_node, (char*)"category")); + TRACE_sd_dotloader (current_job, agget (dag_node, (char*)"category")); #endif xbt_dict_set(jobs, name, current_job, NULL); xbt_dynar_push(result, ¤t_job);