Home » U++ Library support » U++ Core » CoWork::Finish() can wait in a worker thread while there are jobs to do
Re: CoWork::Finish() can wait in a worker thread while there are jobs to do [message #47133 is a reply to message #47131] |
Fri, 16 December 2016 15:27 |
|
mirek
Messages: 13976 Registered: November 2005
|
Ultimate Member |
|
|
busiek wrote on Fri, 16 December 2016 12:54I am working for a real problem. It is very difficult algorithmic problem. After reducing complexity and optimizing all possible bottlenecks the last step is parallelization. There are many dependent chunks. It looks more like DAG of jobs with low branching. Each chunk can be time consuming and because it often happens that I can distinguish just few (often two) parallel local jobs and than move forward to next part, I would loose too much time waiting in Finish(). I had to edit it. I am using Pipe also, it is really helpful. Generally U++ for algorithmic problems is just great.
OK. You might consider:
- maybe you can have single CoWork for the whole problem (but probably not)
- you can also increase the number of threads - then OS thread would be spent waiting in Finish, but not CPU core
Anyway, I am really interested how this goes. How is Pipe working for you? I have created that as sort of experiment, so it is nice to see it used.
Please let me know, after you are done: I expect you to test with 'global' stealing and without; the I shall decide based on results whether it is worth changing things.
Maybe we could allow stealing 'parent' jobs? That would solve the problem, right?
Mirek
[Updated on: Fri, 16 December 2016 15:33] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri May 10 11:40:36 CEST 2024
Total time taken to generate the page: 0.01571 seconds
|