def mpiprint(string='', end='\n', rank=0, comm=None):
    """print the given string to the given rank"""
    from pyina.mpi import world
    if comm is None:
        comm = world
    if not hasattr(rank, '__len__'):
        rank = rank,
    if comm.rank in rank:
        print((string + end,))
