Home > Back-end >  Difference between collective and non-collective mpi communications
Difference between collective and non-collective mpi communications

Time:01-16

What is the difference between collective and non-collective communications in MPI? I've tried to understand difference between MPI_File_read and MPI_File_read_all but failed. Both of these functions use the communicator that was passed to the MPI_File_open function as an argument.

CodePudding user response:

Collective calls require all rank processes in the communicator to make a matching call "together", allowing the implementation to explicitly cooperate between processes. The definition of what constitutes a "matching" call varies with the function call semantics.

In non-collective calls each process operates independently, and there is no requirement that all the ranks in a communicator participate in the call.

From MPI Spec 2.4:

collective
A procedure is collective if all processes in a process group need to invoke the procedure. A collective call may or may not be synchronizing. Collective calls over the same communicator must be executed in the same order by all members of the process group.

  • Related