Use allgather method to share number of local entities.