triqs.utility.dist_on_nodes.DistributionOnNodes.run

DistributionOnNodes.run()[source]

Run the master / worker dispatch loop until finished().

On a single MPI rank the function loops sequentially over __next__(), calling the_function() and then treate() for every input. On multiple ranks the master rank dispatches inputs to the workers (and to a forked child on itself), asynchronously collects results, and calls treate() for each one; the workers loop on receive / compute / send until the master signals completion. The call is collective: every rank must enter and leave it together.