Reputation: 9095
The master has a large set of tasks, which it distributes to any slave that signals its ready.
The tasks are not equal in calculation time but are all calculating some value. As an output, the master needs to calculate the most minimum value of all tasks.
The problem here is that I don't want to use synchronous send-recv calls to distribute jobs as I don't want to wait for one process to finish, before sending a job to the next one.
And so, how can I collect the results? I need to know every return value in order to return the most minimum one, but I can't tell when the value will be sent back to the master, or in what order.
Thanks for any help..
Upvotes: 2
Views: 1246
Reputation: 8273
Use nonblocking sends/receives on the master, and blocking ones on the slaves. Basically:
Master:
Slave:
Upvotes: 4