wowonline
wowonline

Reputation: 1500

Difference between collective and non-collective mpi communications

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.

Upvotes: 0

Views: 205

Answers (1)

Dan Bonachea
Dan Bonachea

Reputation: 2477

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.

Upvotes: 1

Related Questions