Skip to content
Snippets Groups Projects
Commit 0f94a9bd authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Fix up commenting

parent 65ddfa3a
No related branches found
No related tags found
1 merge request!459Task graph
#!/bin/bash #!/bin/bash
# Check that the required file is present # Creates a graphic from the task graph file dependency_graph.dot.
if [ ! -e dependency_graph.dot ] # Requires the graphviz command "dot".
then
echo "Missing task-graph output! Can generate figure." if [ ! -e dependency_graph.dot ]; then
echo "Missing task-graph output 'dependency_graph.dot'! Cannot generate figure."
else else
dot -Tpng dependency_graph.dot -o task_graph.png dot -Tpng dependency_graph.dot -o task_graph.png
echo "Output written to task_graph.png"
fi fi
exit
...@@ -128,7 +128,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) { ...@@ -128,7 +128,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
/* Conservative number of dependencies per task type */ /* Conservative number of dependencies per task type */
const int max_nber_dep = 128; const int max_nber_dep = 128;
/* Number of possibble relations between tasks */ /* Number of possible relations between tasks */
const int nber_relation = const int nber_relation =
2 * task_type_count * task_subtype_count * max_nber_dep; 2 * task_type_count * task_subtype_count * max_nber_dep;
...@@ -146,7 +146,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) { ...@@ -146,7 +146,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
/* Create file */ /* Create file */
char filename[200] = "dependency_graph.dot"; char filename[200] = "dependency_graph.dot";
FILE *f = fopen(filename, "w"); FILE *f = fopen(filename, "w");
if (f == NULL) error("Error opening depenency graph file."); if (f == NULL) error("Error opening dependency graph file.");
/* Write header */ /* Write header */
fprintf(f, "digraph task_dep {\n"); fprintf(f, "digraph task_dep {\n");
...@@ -159,7 +159,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) { ...@@ -159,7 +159,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
for (int i = 0; i < s->nr_tasks; i++) { for (int i = 0; i < s->nr_tasks; i++) {
const struct task *ta = &s->tasks[i]; const struct task *ta = &s->tasks[i];
/* and theirs dependencies */ /* and their dependencies */
for (int j = 0; j < ta->nr_unlock_tasks; j++) { for (int j = 0; j < ta->nr_unlock_tasks; j++) {
const struct task *tb = ta->unlock_tasks[j]; const struct task *tb = ta->unlock_tasks[j];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment