yt.funcs.only_on_root

yt.funcs.only_on_root(func, *args, **kwargs)[source]

This function accepts a func, a set of args and kwargs and then only on the root processor calls the function. All other processors get “None” handed back.