def rank_zero(self, f):
        def wrapper(f, *args, **kwargs):
            if self.comm.rank == 0:
                return f(*args, **kwargs)
        return decorator(wrapper, f)
Decorator for executing a function only on MPI rank zero.
dataset/ETHPy150Open OP2/PyOP2/pyop2/mpi.py/MPIConfig.rank_zero