Threadpool task plots
Adds the following:
-
--enable-threadpool-debugging
to the./configure
flags, -
-Y
tomain.c
to enable dumping threadpool timers much like the task timers.
This generates threadpool_info-step%d.dat
files every -Y
steps which contain the mapper function name, the id of the thread that executed it, the number of chunks processed, and the tic
and toc
timers for the mapper function.
Merge request reports
Activity
Added 8 commits:
-
7d140c20...a0106530 - 7 commits from branch
master
- 3bcec4cf - Merge remote-tracking branch 'origin/master' into threadpool_task_plots
-
7d140c20...a0106530 - 7 commits from branch
Knocked up some plotting scripts and came up with the following for a 4 core SedovBlast analysis. Interesting things already apparent:
http://astro.dur.ac.uk/~pdraper/swift/threadpool-plots/sedov/
Added 1 commit:
- 9fa6d93e - Add basic plotting script for threadpool timers
Added 4 commits:
- 9a634a15 - if chunk is zero, split the input into num_thread * threadpool_default_chunk_ratio chunks.
- 3984768d - take the thread id from the number of running threads, not waiting threads.
- 05943c2b - use the new default chunk size.
- e337840d - Merge branch 'threadpool_task_plots' of gitlab.cosma.dur.ac.uk:swift/swiftsim in…
Toggle commit listRepeated the SodShock this time without task debugging and with the new chunking:
We also have EAGLE_25 (x16):
Note I've let the EAGLE_25 graphics autorange the time limit so that we can see all the details...
Added 1 commit:
- 63098d78 - switch to automatic chunk size selection.
Added 1 commit:
- a7f901a4 - Read the header to recover the CPU frequency
We now have:
with all the above changes and correct times. Note autoscaling the graphics.
New versions with these fixes in place:
Added 1 commit:
- 03735423 - go back to being super-conservative in runner_do_unskip_mapper.
Added 1 commit:
- b1aa697a - make the logging work even if we're using a single thread.
New plots using latest code at:
- http://astro.dur.ac.uk/~pdraper/swift/threadpool-plots/eagle_25_4/
- http://astro.dur.ac.uk/~pdraper/swift/threadpool-plots/sedov5/
Plus a new set of plots for EAGLE_25 with a single row per thread.
New versions with fake thread plotted. This is shown as the top thread.
Sorry, seems the mysterious time was I/O to the terminal. Forgot I had
-v 1
enabled and only looked at the output not the log. All much better now.Edited by Peter W. DraperAdded 1 commit:
- 345d9c4a - make the thread that calls threadpool_map do work as well, as if it was the Nth thread in the pool.
Enjoy:
with latest fix and new background shading no fake thread.
Added 1 commit:
- d7419412 - don't hold the thread mutex while the calling thread is working.
Added 1 commit:
- d9c69983 - use pthread_barrier instead of mutexes and condvars, might be faster.
One more try: replaced our own barrier based on mutexes and cond-vars with two
pthread_barrier
s. Can you check if this improves anything? Thanks!Btw, regardless whether this works or not, we should also re-think what we're doing in
engine_barrier
.Edited by Pedro GonnetAdded 1 commit:
- 145b4377 - get rid of engine_check_sort_tasks, which is not needed in the new sorting scheme.
Looking pretty good now:
Added 1 commit:
- b82a57ba - Use shading correctly when expanding threads
mentioned in commit 58a6ff20
mentioned in commit e3309772
mentioned in merge request !383 (merged)
mentioned in commit b9389d4e