def mpi_local_comm():
    """Split MPI communicator based on shmem capability to produce a node-local
    communicator.

    Requires MPI implementation version >= 3
    """
    from mpi4py import MPI
    return MPI.COMM_WORLD.Split_type(MPI.COMM_TYPE_SHARED)
