algorithmparallel-processingmultiprocessinginter-process-communicat

Collective communication - some-to-all broadcasting?


I know there's broadcast mechanism where one proc sends msg to all others, and there's all-to-all broadcast where all procs send msgs to all others.

Does anyone know of any mechanism to do similar to all-to-all but only certain number of processors can do the broadcasting? Suppose I have n processors, but I only want x processors among those do the broadcasting.

Edit: I'm using MPI. There's MPI_Bcast and MPI_alltoall, but there isn't anything that let me specify a group of x number of procs that can do the broadcasting.


Solution

  • MPI has the concepts of "group" and "communicator", which you may use to define groups of processes (notice that many MPI functions take an MPI_Comm as a parameter). I don't know how to work with those, but this article seems to be a decent introduction.