Skip to content
Snippets Groups Projects

Give user option to dump task levels at a given time step frequency

Merged Mladen Ivkovic requested to merge task_level_dump_with_step_number into master
All threads resolved!

This merge request adds the option to call the scheduler_write_task_level function multiple times during a run and to generate individual files, defined by the current time step number. The default behaviour remains unchanged: When called, as it is in the current master, the resulting file will be task_level.txt. When passed on an integer time step (currently not done anywhere), it will be task_level_XXXX.txt.

Edited by Mladen Ivkovic

Merge request reports

Merged by Matthieu SchallerMatthieu Schaller 4 years ago (Dec 18, 2020 7:38pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Following a private discussion with @lhausammann, it would probably be best to include @matthieu in the discussion.

    My idea was to do a quick change to the scheduler_write_task_level function to enable to write the task level output at multiple time steps without overwriting the output file. By default, this function is not called outside the place where it is currently called in the master branch. Loic thinks it might not really be worth it.

    Possibilities I see to extend this merge request:

    • add a cmdline flag to set the output frequency for the task levels, similar to e.g. cell-dumps
    • dump the task levels automatically (only when in debug mode?) e.g. after every rebuild
    • enable scheduler_write_task_dependencies to be written out with a step including file name as well, apply same frequency to it as for write_task_level

    @matthieu, what are your thoughts on this?

  • Can you describe what is the practical use case or problem you are trying to solve?

  • Is that still something we want to discuss?

  • Sorry, things kept piling up and this escaped my attention.

    I used this to check how the task levels were behaving between steps and between different runs each time step, similarly to how we can dump the cell hierarchy every step. I thought it was a good idea to have this option around, Loic though that it should be extended for general users, not just the people that are aware of the existence of this function and option.

    So I'd still like to discuss this: Would we want to have this kind of option, and if yes, in what form? Arguably the solution Loic is using in !1249 (merged) is probably best, where we keep the default dump at time step 0 and allow the user to specify a frequency. I'll be happy to add that functionality, but first we should agree on whether we want this, and if we do, in what way.

  • Don't worry. Just wanted to make sure I am not blocking useful things you guys would need.

    This is not a tool I have used much myself (probably because it did not exist when designing the main tasks!) but if you think it's useful to have more information optionally written out to help debug things, then, yes, we should go ahead. Using the same mechanism sounds good to me. By default only step 0 and if the user wants then every n step. Only step 0 is often enough as if you have a problem, you can always start a run with the exact configuration we are trying to debug. However, I can see scenarios where we want more outputs as well, like the debugging you are doing now.

  • BTW, that business of passing a pointer is weird. Please use -1. As such when seeing the function I am somehow assuming that we are passing in an array of integers.

  • No worries, this thing will get an overhaul today and mirror what was done for the dependency graphs.

  • Mladen Ivkovic mentioned in merge request !1249 (merged)

    mentioned in merge request !1249 (merged)

  • Mladen Ivkovic added 54 commits

    added 54 commits

    Compare with previous version

  • Mladen Ivkovic changed title from added 'optional' step number to scheduler_write_task_level output filename to Give user option to dump task levels at a given time step frequency

    changed title from added 'optional' step number to scheduler_write_task_level output filename to Give user option to dump task levels at a given time step frequency

  • Mladen Ivkovic changed the description

    changed the description

  • Here we go. Just like in !1249 (merged) for the task dependencies, the task levels can now be dumped at a frequency set in the parameter file. The default behaviour is unchanged, the task levels will always be dumped at the zeroth step.

    Additionally, when run with MPI, every rank will write its own file. The tools/plot_task_level.py tool was extended to accept any number of files as input, and will sum up their contents before generating a plot.

  • Mladen Ivkovic added 8 commits

    added 8 commits

    Compare with previous version

  • Mladen Ivkovic added 1 commit

    added 1 commit

    • 794ae44d - only rank 0 writes task levels at zeroth step

    Compare with previous version

  • Mladen Ivkovic resolved all threads

    resolved all threads

  • mentioned in commit fd12f13c

  • Please register or sign in to reply
    Loading