Task graph
Write a 'dot' file containing the task-dependency graph at the 0th time-step of a simulation. This allows the used to see what physics model is actually being run. We also add a bash script to generate a png file from the 'dot' file.
This implements #92 (closed).
Merge request reports
Activity
Good stuff, it works neatly.
Ok, so here are a few comments (in random order of importance).
- It takes 20s to run on the EAGLE_25, which is problematic if we want to always run this (thats my goal for the issue!).
- Why do you always open and close the file? Open it once at the start and close it at the end.
- It'd be nice to follow the general style and declare variables where you need them and not just at the start of the function.
- Could you add a bash script in
/examples/
; to generate the task-plot from the dot file? - For tasks with sub-task type "none", I would not display the "none";.
- Please add a Doxygen documentation string for your functions.
added 7 commits
- b24ca8c5 - Open only once dependency file and add an option in debugging-checks mode for…
- eeafe65a - Write dependency with option -x now (moved the writing to just before printing first step message)
- 201ab915 - task dep graph: remove none when subtype is none
- 8b1bf283 - task dependency graph: use a table and not reading the file anymore
- fe347401 - Add example of task dependency graph
- c9b94e9a - Add doxygen header to scheduler_write_dependency
- 7e9b6217 - Formating
Toggle commit listEverything done.
I am using a list in order to avoid reading the file (I may initialize it a little bit too large, but in comparison to eagle_50 it takes almost no memory).
Now to enable it, you need to be in debugging-checks mode and run with the option -x (the most logical letters are already taken).
The example is in examples/task_graph
added 1 commit
- d74f024e - Just have a script to make the dependency graph and not a full run.
added 1 commit
- 84b72a8b - Only create the strings to be written when they need to be written.
Thanks!
That's much faster. Nice job.
But why all these other changes? It was nice as it was.
We don't want more options. We want the task-graph to be generated every time we run. That's why it ought to be fast. So no need to have the
-x
and no need to have it on only when using debugging checks. The call to your new function was perfect where it was (i.e. just before the secondengine_launch()
inengine_init_particles()
). It is now so fast (see below) that we can just always do it. It is a useful feature to know what we are actually running. :)Also, no need to worry about the memory requirement of your array. It's always going to be small. I have set the constant to a larger number so that we never reach the problem of having to update it.
Finally, I have moved the place where the strings are created such that they are only written if we actually write to the file. That sped-up the whole process by a factor 20x on the EAGLE_25 problem. The whole function call now takes 35ms.
I have pushed all these changes to the branch. I'll let you have a look at them. Let me know if you disagree with something.
added 1 commit
- 25b1580f - Revert the reading of the parameter string to what it is in master.
added 38 commits
-
25b1580f...bee23d1c - 37 commits from branch
master
- 05645d2a - Merge branch 'master' into task_graph
-
25b1580f...bee23d1c - 37 commits from branch
I am happy for it to be merged. Works well and is very useful. @pdraper I am handing over to you.
assigned to @pdraper