synchronous communication.
SimDag:
- * new function SD_task_dump() for debuging display
* new function SD_daxload(char*) to load a DAX file
(see http://vtcpc.isi.edu/pegasus/index.php/WorkflowGenerator)
- * SD_task_dependency_exists() can now cope with having one of its
- arguments NULL. If so, it tests whether the other argument has any
- dependency.
* Introduce typed tasks. Specify its kind and cost at creation.
At scheduling, just give where it should be placed, and the cost
for each involved resource is automatically computed.
- SD_task_create_comm_e2e() for end-to-end communication
- SD_task_create_comp_seq() for sequential computation
Use SD_task_schedulev() / SD_task_schedulel() to schedule them.
+ * new function SD_task_dump() for debuging display
+ * new function SD_task_dotty(task,FILE*) writing to file the info
+ about the task in dotty format
+ * SD_task_dependency_exists() can now cope with having one of its
+ arguments NULL. If so, it tests whether the other argument has any
+ dependency.
* Add getters on list of preceding/following tasks:
SD_task_get_parents(task) and SD_task_get_children(task)
* Add getters on amount of workstations and list:
XBT_PUBLIC(SD_workstation_t*) SD_task_get_workstation_list(SD_task_t task);
XBT_PUBLIC(void) SD_task_destroy(SD_task_t task);
XBT_PUBLIC(void) SD_task_dump(SD_task_t task);
+XBT_PUBLIC(void) SD_task_dotty(SD_task_t task,void* out_FILE);
XBT_PUBLIC(SD_task_t) SD_task_create_comp_seq(const char*name,void *data,double amount);
XBT_PUBLIC(SD_task_t) SD_task_create_comm_e2e(const char*name,void *data,double amount);
return task->remains;
}
-/* temporary function for debbuging */
+/** @brief Displays debugging informations about a task */
void SD_task_dump(SD_task_t task)
{
unsigned int counter;
}
}
}
+/** @brief Dumps the task in dotty formalism into the FILE* passed as second argument */
+void SD_task_dotty(SD_task_t task,void* out) {
+ unsigned int counter;
+ SD_dependency_t dependency;
+ fprintf(out, " T%d [label=\"%.10s\"",(unsigned int)task,task->name);
+ switch(task->kind){
+ case SD_TASK_COMM_E2E:
+ fprintf(out,", shape=box");
+ break;
+ case SD_TASK_COMP_SEQ:
+ fprintf(out,", shape=circle");
+ break;
+ }
+ fprintf(out,"];\n");
+ xbt_dynar_foreach(task->tasks_before,counter,dependency) {
+ fprintf(out," T%d -> T%d;\n",(unsigned int)dependency->src,(unsigned int)dependency->dst);
+ }
+}
/* Destroys a dependency between two tasks.
*/