triqs.utility.dist_on_nodes.DistributionOnNodesOneStack

class triqs.utility.dist_on_nodes.DistributionOnNodesOneStack(the_stack)[source]

Bases: DistributionOnNodes

Concrete DistributionOnNodes consuming a fixed stack of inputs.

Stores the inputs internally as a (reversed) list so that __next__() returns them in the original order. Each result returned by a worker is collected as a (node, value) tuple and can be retrieved via result(). Subclasses only need to override the_function().

Parameters:
the_stacklist

Sequence of inputs to dispatch. Consumed destructively: the list is reversed in place and popped from the end.

Methods

finished()

Return True once every input has been consumed.

result()

Return the collected list of (node, value) result tuples.

run()

Run the dispatch loop and return result().

treate(x, node)

Append the worker result as (node, x) to the result list.