title: MPI: load balancing algorithm (Master-Slave model)
body: <p>I'm using MPI to parallelize a loop [0,<strong>max</strong>]. I want a master process (let's say process 0) to initially divide that loop into small sets of <strong>n</strong> tasks (n iterations) and then progressively affect a set of tasks to <strong>x</strong> slave processes whenever one finishes its previous work (previous set of task). In other words, I would like to implement a load balancing algorithm using MPI's blocking and/or non blocking Send/Receives but have no idea how I could proceed. Also, Is there a way to find the optimal size of one set of tasks (the n parameter) in function of "max" and "x" ?</p>
  
  <p>Thanks a lot for your help.</p>