yt.lagos.ParallelTools Parallel Helper Functions

These functions are typically not used except in the construction of new parallel objects, but are documented here for future compatibility.

class yt.lagos.ParallelAnalysisInterface
This is an interface specification providing several useful utility functions for analyzing something in parallel.
class yt.lagos.ObjectIterator(pobj, just_list=False, attr='_grids')
This is a generalized class that accepts a list of objects and then attempts to intelligently iterate over them.
class yt.lagos.ParallelObjectIterator(pobj, just_list=False, attr='_grids', round_robin=False)
This takes an object, pobj, that implements ParallelAnalysisInterface, and then does its thing, calling initliaze and finalize on the object.
class yt.lagos.ParallelDummy(name, bases, d)
This is a base class that, on instantiation, replaces all attributes that don’t start with _ with parallel_simple_proxy()-wrapped attributes. Used as a metaclass.
yt.lagos.parallel_simple_proxy(func)
This is a decorator that broadcasts the result of computation on a single processor to all other processors. To do so, it uses the _processing and _distributed flags in the object to check for blocks. Meant only to be used on objects that subclass ParallelAnalysisInterface.
yt.lagos.parallel_passthrough(func)
If we are not run in parallel, this function passes the input back as output; otherwise, the function gets called. Used as a decorator.
yt.lagos.parallel_blocking_call(func)
This decorator blocks on entry and exit of a function.
yt.lagos.parallel_splitter(f1, f2)
This function returns either the function f1 or f2 depending on whether or not we’re the root processor. Mainly used in class definitions.
yt.lagos.parallel_root_only(func)
This decorator blocks and calls the function on the root processor, but does not broadcast results to the other processors.

Comments

Feel free to leave comments! If you've got a GMail account, you can use https://www.google.com/accounts/o8/id as your OpenID URL.
comments powered by Disqus

Previous topic

yt.fido File Storage and Management

Next topic

ChangeLog

This Page